3 |
|
// |
4 |
|
// FillerMetaInfos |
5 |
|
// |
6 |
+ |
// Implementation of a filler that stores all of the meta information, as well as the L1 and HLT |
7 |
+ |
// trigger info into the corresponding bambu objects. |
8 |
+ |
// |
9 |
|
// Authors: C.Loizides |
10 |
|
//-------------------------------------------------------------------------------------------------- |
11 |
|
|
12 |
|
#ifndef MITPROD_TREEFILLER_FILLERMETAINFOS_H |
13 |
|
#define MITPROD_TREEFILLER_FILLERMETAINFOS_H |
14 |
|
|
12 |
– |
#include "FWCore/ParameterSet/interface/ParameterSet.h" |
13 |
– |
#include "MitProd/TreeFiller/interface/BaseFiller.h" |
15 |
|
#include "HLTrigger/HLTcore/interface/HLTConfigProvider.h" |
16 |
< |
#include "MitAna/DataTree/interface/Collections.h" |
16 |
> |
#include "L1Trigger/GlobalTriggerAnalyzer/interface/L1GtUtils.h" |
17 |
> |
#include "DataFormats/L1GlobalTrigger/interface/L1GtTriggerMenuLite.h" |
18 |
> |
#include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h" |
19 |
> |
#include "MitAna/DataTree/interface/L1TriggerMaskFwd.h" |
20 |
> |
#include "MitAna/DataTree/interface/TriggerObjectBaseFwd.h" |
21 |
> |
#include "MitAna/DataTree/interface/TriggerObjectRelFwd.h" |
22 |
> |
#include "MitAna/DataTree/interface/Types.h" |
23 |
> |
#include "MitProd/TreeFiller/interface/BaseFiller.h" |
24 |
|
|
25 |
|
class THashTable; |
26 |
|
|
29 |
|
class RunInfo; |
30 |
|
class EventHeader; |
31 |
|
class LAHeader; |
32 |
+ |
class TriggerMask; |
33 |
|
|
34 |
|
class FillerMetaInfos : public BaseFiller |
35 |
|
{ |
36 |
|
public: |
37 |
< |
FillerMetaInfos(const edm::ParameterSet &cfg, bool active=1); |
37 |
> |
FillerMetaInfos(const edm::ParameterSet &cfg, const char *name="MetaInfos", bool active=1); |
38 |
|
~FillerMetaInfos(); |
39 |
|
|
40 |
< |
void BookDataBlock(TreeWriter &tws); |
41 |
< |
void FillDataBlock(const edm::Event &e, const edm::EventSetup &es); |
33 |
< |
void FillRunInfo(const edm::Event &e, const edm::EventSetup &es); |
34 |
< |
// void FillL1Info(const edm::Event &e, const edm::EventSetup &es); |
35 |
< |
// void FillL1Trig(const edm::Event &e, const edm::EventSetup &es); |
36 |
< |
void FillHltInfo(const edm::Event &e, const edm::EventSetup &es); |
37 |
< |
void FillHltTrig(const edm::Event &e, const edm::EventSetup &es); |
40 |
> |
void BookDataBlock(TreeWriter &tws); |
41 |
> |
void FillDataBlock(const edm::Event &e, const edm::EventSetup &es); |
42 |
|
|
43 |
|
private: |
44 |
< |
std::string evtName_; //event branch name |
45 |
< |
std::string runName_; //run info branch name |
46 |
< |
std::string lahName_; //look-ahead header branch name |
47 |
< |
Bool_t l1Active_; //=true if L1 info are filled |
48 |
< |
std::string l1TableName_; //L1 trigger table branch name |
49 |
< |
std::string l1BitsName_; //L1 trigger bits branch name |
50 |
< |
std::string l1ObjsName_; //L1 trigger branch name |
44 |
> |
void FillBitAMask(BitMask128 &bits, const DecisionWord &dw); |
45 |
> |
void FillBitTMask(BitMask128 &bits, const TechnicalTriggerWord &tw); |
46 |
> |
void FillHltInfo(const edm::Event &e, const edm::EventSetup &es); |
47 |
> |
void FillHltTrig(const edm::Event &e, const edm::EventSetup &es); |
48 |
> |
void FillL1Trig(const edm::Event &e, const edm::EventSetup &es); |
49 |
> |
void FillRunInfo(const edm::Event &e, const edm::EventSetup &es); |
50 |
> |
const char *Istr() const; |
51 |
> |
|
52 |
> |
std::string evtName_; //event branch name (must be unique) |
53 |
> |
std::string runTreeName_; //run info tree name (must be unique) |
54 |
> |
std::string lahTreeName_; //look-ahead header tree name (must be unique) |
55 |
> |
std::string hltTreeName_; //hlt tree name (must be unique) |
56 |
|
Bool_t hltActive_; //=true if HLT info are filled |
57 |
< |
std::string hltProcName_; //HLT process name |
57 |
> |
std::string hltProcName_; //HLT process name to be used |
58 |
|
std::string hltResName_; //HLT trigger results edm name |
59 |
|
std::string hltEvtName_; //HLT trigger event edm name |
60 |
|
std::string hltTableName_; //HLT trigger table branch name |
61 |
|
std::string hltLabelName_; //HLT trigger label branch name |
62 |
+ |
std::string hltMenuName_; //HLT trigger menu branch name |
63 |
|
std::string hltBitsName_; //HLT trigger bits branch name |
64 |
|
std::string hltObjsName_; //HLT trigger branch name |
65 |
+ |
Bool_t l1Active_; //=true if some L1 info are filled |
66 |
+ |
std::string l1GtMenuLiteName_; //L1 trigger menu lite edm name |
67 |
+ |
std::string l1GTRecName_; //L1 global trigger record edm name |
68 |
+ |
std::string l1GTRRName_; //l1 global readout trigger record edm name |
69 |
+ |
std::string l1TBitsName_; //L1 technical bit name |
70 |
+ |
std::string l1ABitsName_; //L1 algo bit name |
71 |
|
TreeWriter *tws_; //tree writer (not owned) |
72 |
|
EventHeader *eventHeader_; //event header |
73 |
|
LAHeader *evtLAHeader_; //look-ahead event header |
76 |
|
TTree *laTree_; //look ahead tree (not owned) |
77 |
|
Int_t runEntries_; //number of run info entries |
78 |
|
std::map<UInt_t,Int_t> runmap_; //map between run number and entry number |
79 |
< |
Int_t l1Entries_; //number of l1 info entries |
80 |
< |
THashTable *l1Table_; //L1 trigger table |
81 |
< |
TTree *l1Tree_; //L1 trigger tree (not owned) |
82 |
< |
BitMask256 *hltBits_; //HLT trigger bit mask |
83 |
< |
Vector<std::string> *hltTable_; //HLT trigger table |
79 |
> |
std::map<std::string,Int_t> hltmap_; //map btw hlt table name and entry number |
80 |
> |
Int_t runentry_; //current run entry |
81 |
> |
Int_t hltentry_; //current hlt entry |
82 |
> |
TriggerMask *hltBits_; //HLT trigger bit mask |
83 |
> |
std::string *hltMenu_; //HLT menu name |
84 |
> |
std::vector<std::string> *hltTable_; //HLT trigger table |
85 |
> |
std::vector<std::map<std::string,Short_t> > hltTabMaps_; //cached tablemaps |
86 |
|
std::map<std::string,Short_t> *hltTabMap_; //HLT trigger labels map |
87 |
< |
Vector<std::string> *hltLabels_; //HLT module labels |
87 |
> |
std::vector<std::string> *hltLabels_; //HLT module labels |
88 |
> |
std::vector<std::map<std::string,Short_t> > hltLabMaps_; //cached tablemaps |
89 |
|
std::map<std::string,Short_t> *hltLabMap_; //HLT module labels map |
90 |
|
TriggerObjectBaseArr *hltObjs_; //HLT trigger objects |
91 |
|
TriggerObjectRelArr *hltRels_; //HLT trigger objects relation |
93 |
|
HLTConfigProvider hltConfig_; //HLT config from provenance |
94 |
|
Int_t hltEntries_; //number of hlt info entries |
95 |
|
UShort_t fileNum_; //file number of current file |
96 |
+ |
L1GtUtils l1gtutils_; //level 1 config provider |
97 |
+ |
L1TriggerMask *l1TBits_; //L1 technical trigger bit mask |
98 |
+ |
L1TriggerMask *l1ABits_; //L1 algorithm trigger bit mask |
99 |
+ |
L1TriggerMask *l1TBits2_; //L1 technical trigger bit mask before masking |
100 |
+ |
L1TriggerMask *l1ABits2_; //L1 algorithm trigger bit mask before masking |
101 |
+ |
L1TriggerMaskArr *l1AbArr_; //L1 algorithm trigger bits |
102 |
+ |
L1TriggerMaskArr *l1TbArr_; //L1 technical trigger bits |
103 |
|
|
104 |
< |
static bool instance_; //=true when one active instance |
104 |
> |
static Int_t instance_; //counts active instances |
105 |
|
}; |
106 |
|
} |
107 |
|
#endif |