55 |
_selCollection.AddAction(action); |
_selCollection.AddAction(action); |
56 |
} |
} |
57 |
|
|
58 |
|
void EffCollection::Setup(PamLevel2 *events){ |
59 |
|
// Base class have a single vector for cuts and another for actions. Here the cuts and actions |
60 |
|
// are not contained inside these vectors but rather inside two SmartCollection object members. |
61 |
|
// So we must call their Setup(). |
62 |
|
_selCollection.Setup(events); |
63 |
|
_detCollection.Setup(events); |
64 |
|
|
65 |
|
// We call also base class' Setup(), which will likely do nothing since _sel and _det are empty. |
66 |
|
VerboseCollection::Setup(events); |
67 |
|
|
68 |
|
} |
69 |
|
|
70 |
int EffCollection::ApplyCut(PamLevel2 *event) { |
int EffCollection::ApplyCut(PamLevel2 *event) { |
71 |
|
|
72 |
_nEv++; |
_nEv++; |
86 |
// Let's add all the cuts to the vector of the collection before calling VerboseCollection::Finalize |
// Let's add all the cuts to the vector of the collection before calling VerboseCollection::Finalize |
87 |
for (unsigned int i = 0; i < _selCollection.GetSize(); i++) |
for (unsigned int i = 0; i < _selCollection.GetSize(); i++) |
88 |
_cuts.push_back(_selCollection.GetCut(i)); |
_cuts.push_back(_selCollection.GetCut(i)); |
89 |
|
for (unsigned int i = 0; i < _selCollection.GetActionsSize(); i++) |
90 |
|
_actions.push_back(_selCollection.GetAction(i)); |
91 |
for (unsigned int i = 0; i < _detCollection.GetSize(); i++) |
for (unsigned int i = 0; i < _detCollection.GetSize(); i++) |
92 |
_cuts.push_back(_detCollection.GetCut(i)); |
_cuts.push_back(_detCollection.GetCut(i)); |
93 |
// Now all the cuts are in place, and VerboseCollection can print its report |
for (unsigned int i = 0; i < _detCollection.GetActionsSize(); i++) |
94 |
|
_actions.push_back(_detCollection.GetAction(i)); |
95 |
|
|
96 |
|
// Now all the cuts and actions are in place, and VerboseCollection can print its report and call Finalize() for |
97 |
|
// every cut and action (calling SmartCollection::Finalize(). |
98 |
VerboseCollection::Finalize(); |
VerboseCollection::Finalize(); |
99 |
|
|
100 |
// Compute the error |
// Compute the error |