/[PAMELA software]/PamCut/PamCutBase/PamCutBase.cpp
ViewVC logotype

Diff of /PamCut/PamCutBase/PamCutBase.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by pam-fi, Wed May 27 13:30:09 2009 UTC revision 1.3 by pam-fi, Wed Jun 17 12:58:00 2009 UTC
# Line 50  void PamCut::Process(PamLevel2 *events, Line 50  void PamCut::Process(PamLevel2 *events,
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    
# Line 62  void PamCut::SetName(const char *newName Line 62  void PamCut::SetName(const char *newName
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
# Line 122  PamCut *PamCutCollection::GetCut(unsigne Line 122  PamCut *PamCutCollection::GetCut(unsigne
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    
# Line 134  PamCutCollection& PamCutCollection::oper Line 145  PamCutCollection& PamCutCollection::oper
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  }  }

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.23