50 |
Finalize(); |
Finalize(); |
51 |
|
|
52 |
} |
} |
53 |
void PamCut::Setup(PamLevel2 *events){ |
void PamCut::Setup(PamLevel2 *events) { |
54 |
_nEv = _nGood = 0; |
_nEv = _nGood = 0; |
55 |
} |
} |
56 |
|
|
62 |
_cutName = newName; |
_cutName = newName; |
63 |
} |
} |
64 |
|
|
65 |
PamCut& PamCut::operator=(const PamCut &rightValue){ |
PamCut& PamCut::operator=(const PamCut &rightValue) { |
66 |
_cutName = rightValue._cutName; |
_cutName = rightValue._cutName; |
67 |
return *this; |
return *this; |
68 |
} |
} |
69 |
|
|
70 |
/* ************************ * |
/* ************************ * |
71 |
* PAMCUTCOLLECTION |
* PAMCUTCOLLECTION |
122 |
return _cuts[iCut]; |
return _cuts[iCut]; |
123 |
} |
} |
124 |
|
|
125 |
|
PamCut *PamCutCollection::GetCut(const char *cutName) { |
126 |
|
if (_cuts.size() == 0) |
127 |
|
return NULL; |
128 |
|
for (unsigned int i = 0; i < _cuts.size(); i++){ |
129 |
|
if (strcmp(_cuts[i]->GetName(), cutName) == 0) |
130 |
|
return _cuts[i]; |
131 |
|
} |
132 |
|
|
133 |
|
return NULL; |
134 |
|
} |
135 |
|
|
136 |
unsigned int PamCutCollection::GetSize() { |
unsigned int PamCutCollection::GetSize() { |
137 |
return (unsigned int) _cuts.size(); |
return (unsigned int) _cuts.size(); |
138 |
|
|
145 |
return *this; |
return *this; |
146 |
} |
} |
147 |
|
|
148 |
|
void PamCutCollection::Setup(PamLevel2 *events) { |
|
void PamCutCollection::Setup(PamLevel2 *events){ |
|
149 |
|
|
150 |
PamCut::Setup(events); |
PamCut::Setup(events); |
151 |
|
|
152 |
for (unsigned int i = 0; i < GetSize(); i++){ |
for (unsigned int i = 0; i < GetSize(); i++) { |
153 |
_cuts[i]->Setup(events); |
_cuts[i]->Setup(events); |
154 |
} |
} |
155 |
} |
} |
156 |
|
|
157 |
void PamCutCollection::Finalize(){ |
void PamCutCollection::Finalize() { |
158 |
|
|
159 |
// PamCut::Finalize() is currently void, but in future it could contain something, so it's good to place a call here. |
// PamCut::Finalize() is currently void, but in future it could contain something, so it's good to place a call here. |
160 |
PamCut::Finalize(); |
PamCut::Finalize(); |
161 |
|
|
162 |
for (unsigned int i = 0; i < GetSize(); i++){ |
for (unsigned int i = 0; i < GetSize(); i++) { |
163 |
_cuts[i]->Finalize(); |
_cuts[i]->Finalize(); |
164 |
} |
} |
165 |
} |
} |