6 |
|
#include "MitAna/DataUtil/interface/Debug.h" |
7 |
|
#include "MitAna/DataTree/interface/Names.h" |
8 |
|
#include "MitAna/DataTree/interface/TriggerName.h" |
9 |
< |
#include "MitAna/DataTree/interface/TriggerObject.h" |
9 |
> |
#include "MitAna/DataTree/interface/TriggerTable.h" |
10 |
> |
#include "MitAna/DataTree/interface/TriggerObjectBaseCol.h" |
11 |
> |
#include "MitAna/DataTree/interface/TriggerObjectRelCol.h" |
12 |
> |
#include "MitAna/DataTree/interface/TriggerObjectCol.h" |
13 |
> |
#include "MitAna/DataTree/interface/TriggerObjectsTable.h" |
14 |
|
|
15 |
|
using namespace mithep; |
16 |
|
|
151 |
|
if (fCurEnt<0) |
152 |
|
return kFALSE; |
153 |
|
|
150 |
– |
if ((fCurEnt==1) && (fHLTTree->GetEntries()==1)) { |
151 |
– |
if (1) |
152 |
– |
SendError(kWarning, "LoadTriggerTable", |
153 |
– |
"Loading trigger table omitted due to a bug fix for Mit_006."); |
154 |
– |
return kTRUE; |
155 |
– |
} |
156 |
– |
|
154 |
|
// delete old tables |
155 |
|
fTriggers->Delete(); |
156 |
|
fLabels->Delete(); |
160 |
|
fHLTLab = 0; |
161 |
|
Int_t ret = fHLTTree->GetEvent(fCurEnt); |
162 |
|
if (ret<0 || fHLTTab==0 || fHLTTab==0 ) { |
163 |
< |
::Error("LoadTriggerTable", "Could not get trigger data for next entry (%ld).", fCurEnt); |
163 |
> |
SendError(kAbortAnalysis, "LoadTriggerTable", |
164 |
> |
"Could not get trigger data for next entry (%ld).", fCurEnt); |
165 |
|
return kFALSE; |
166 |
|
} |
167 |
|
|
207 |
|
LoadBranch(fObjsName); |
208 |
|
LoadBranch(fRelsName); |
209 |
|
|
210 |
< |
for (UInt_t i=0; i<fRels->Entries(); ++i) { |
210 |
> |
const UInt_t n = fRels->GetEntries(); |
211 |
> |
for (UInt_t i=0; i<n; ++i) { |
212 |
|
const TriggerObjectRel *rel = fRels->At(i); |
213 |
|
if (!rel) continue; |
214 |
|
|
221 |
|
obj->SetTrigName(fHLTTab->at(rel->TrgId()).c_str()); |
222 |
|
obj->SetModuleName(fHLTLab->at(rel->ModInd()).c_str()); |
223 |
|
obj->SetFilterName(fHLTLab->at(rel->FilterInd()).c_str()); |
224 |
+ |
if (obj->TagInd()>=0) |
225 |
+ |
obj->SetTagName(fHLTLab->at(obj->TagInd()).c_str()); |
226 |
+ |
else |
227 |
+ |
obj->SetTagName("Unknown"); |
228 |
+ |
|
229 |
|
fTrigObjs->Add(obj); |
230 |
|
} |
231 |
|
} |
235 |
|
{ |
236 |
|
// Request branches for trigger objects and relation, and publish our tables. |
237 |
|
|
238 |
+ |
if (fObjsName != Names::gkHltObjBrn) |
239 |
+ |
fRelsName = Form("%sRelation",fObjsName.Data()); |
240 |
+ |
|
241 |
|
ReqBranch(fObjsName, fObjs); |
242 |
|
ReqBranch(fRelsName, fRels); |
243 |
|
|