ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/TreeMod/src/HLTFwkMod.cc
(Generate patch)

Comparing UserCode/MitAna/TreeMod/src/HLTFwkMod.cc (file contents):
Revision 1.1 by loizides, Sun Sep 28 02:38:40 2008 UTC vs.
Revision 1.5 by loizides, Mon Mar 2 13:26:45 2009 UTC

# Line 135 | Line 135 | Bool_t HLTFwkMod::LoadTriggerTable()
135    if (fCurEnt<0)
136      return kFALSE;
137  
138 +  if ((fCurEnt==1) && (fHLTTree->GetEntries()==1)) {
139 +    if (1)
140 +      SendError(kWarning, "LoadTriggerTable",
141 +                "Loading trigger table omitted due to a bug fix for Mit_006.");
142 +    return kTRUE;
143 +  }
144 +
145    // delete old tables
146    fTriggers->Delete();
147    fLabels->Delete();
# Line 149 | Line 156 | Bool_t HLTFwkMod::LoadTriggerTable()
156    }
157  
158    // check size of trigger table
159 <  if (fHLTTab->Entries()>fNMaxTriggers) {
159 >  if (fHLTTab->size()>fNMaxTriggers) {
160      SendError(kAbortAnalysis, "LoadTriggerTable",
161                "Size of trigger table (%d) larger than maximum (%d)",
162 <              fHLTTab->Entries(), fNMaxTriggers);
162 >              fHLTTab->size(), fNMaxTriggers);
163      return kFALSE;
164    }
165  
166    // add trigger names
167 <  for (UInt_t i=0; i<fHLTTab->Entries(); ++i) {
168 <    TriggerName *tname = new TriggerName(*fHLTTab->At(i),i);
167 >  for (UInt_t i=0; i<fHLTTab->size(); ++i) {
168 >    TriggerName *tname = new TriggerName(fHLTTab->at(i),i);
169      fTriggers->Add(tname);
170    }
171  
172    // add module labels
173 <  for (UInt_t i=0; i<fHLTLab->Entries(); ++i) {
174 <    TriggerName *tname = new TriggerName(*fHLTLab->At(i),i);
173 >  for (UInt_t i=0; i<fHLTLab->size(); ++i) {
174 >    TriggerName *tname = new TriggerName(fHLTLab->at(i),i);
175      fLabels->Add(tname);
176    }
177  
# Line 187 | Line 194 | void HLTFwkMod::Process()
194  
195    fTrigObjs->Delete();
196  
197 <  LoadBranch(fObjsName.Data());
198 <  LoadBranch(fRelsName.Data());
197 >  LoadBranch(fObjsName);
198 >  LoadBranch(fRelsName);
199  
200    for (UInt_t i=0; i<fRels->Entries(); ++i) {
201      const TriggerObjectRel *rel = fRels->At(i);
202 <    if(!rel) continue;
202 >    if (!rel) continue;
203  
204      const TriggerObjectBase *ob = fObjs->At(rel->ObjInd());
205 <    if(!ob) continue;
205 >    if (!ob) continue;
206  
207      TriggerObject *obj = new TriggerObject(rel->TrgId(), rel->Type(), ob->Id(),
208                                             ob->Pt(), ob->Eta(), ob->Phi(), ob->Mass());
209  
210 <    obj->SetTrigName(fHLTTab->Ref(rel->TrgId()).c_str());
211 <    obj->SetModuleName(fHLTLab->Ref(rel->ModInd()).c_str());
212 <    obj->SetFilterName(fHLTLab->Ref(rel->FilterInd()).c_str());
210 >    obj->SetTrigName(fHLTTab->at(rel->TrgId()).c_str());
211 >    obj->SetModuleName(fHLTLab->at(rel->ModInd()).c_str());
212 >    obj->SetFilterName(fHLTLab->at(rel->FilterInd()).c_str());
213      fTrigObjs->Add(obj);
214    }
215   }
# Line 212 | Line 219 | void HLTFwkMod::SlaveBegin()
219   {
220    // Request branches for trigger objects and relation, and publish our tables.
221  
222 <  ReqBranch(fObjsName.Data(), fObjs);
223 <  ReqBranch(fRelsName.Data(), fRels);
222 >  ReqBranch(fObjsName, fObjs);
223 >  ReqBranch(fRelsName, fRels);
224  
225    if (!PublishObj(fTriggers)) {
226      SendError(kAbortAnalysis, "SlaveBegin",

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines