CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PATTriggerProducer.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_PatAlgos_PATTriggerProducer_h
2 #define PhysicsTools_PatAlgos_PATTriggerProducer_h
3 
4 
5 // -*- C++ -*-
6 //
7 // Package: PatAlgos
8 // Class: pat::PATTriggerProducer
9 //
10 //
41 
42 #include <string>
43 
46 
49 
54 
55 namespace pat {
56 
58 
59  public:
60 
61  explicit PATTriggerProducer( const edm::ParameterSet & iConfig );
63 
64  private:
65 
66  virtual void beginRun(const edm::Run & iRun, const edm::EventSetup& iSetup) override;
67  virtual void beginLuminosityBlock(const edm::LuminosityBlock & iLuminosityBlock, const edm::EventSetup& iSetup) override;
68  virtual void produce( edm::Event & iEvent, const edm::EventSetup& iSetup) override;
69 
70  std::string nameProcess_; // configuration
72  bool onlyStandAlone_; // configuration
74  // L1
77  bool addL1Algos_; // configuration (optional with default)
78  edm::InputTag tagL1GlobalTriggerObjectMaps_; // configuration (optional with default)
80  edm::InputTag tagL1ExtraMu_; // configuration (optional)
81 // edm::EDGetTokenT< l1extra::L1MuonParticleCollection > l1ExtraMuToken_;
82  edm::InputTag tagL1ExtraNoIsoEG_; // configuration (optional)
83 // edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1ExtraNoIsoEGToken_;
84  edm::InputTag tagL1ExtraIsoEG_; // configuration (optional)
85 // edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1ExtraIsoEGToken_;
86  edm::InputTag tagL1ExtraCenJet_; // configuration (optional)
87 // edm::EDGetTokenT< l1extra::L1JetParticleCollection > l1ExtraCenJetToken_;
88  edm::InputTag tagL1ExtraForJet_; // configuration (optional)
89 // edm::EDGetTokenT< l1extra::L1JetParticleCollection > l1ExtraForJetToken_;
90  edm::InputTag tagL1ExtraTauJet_; // configuration (optional)
91 // edm::EDGetTokenT< l1extra::L1JetParticleCollection > l1ExtraTauJetToken_;
92  edm::InputTag tagL1ExtraETM_; // configuration (optional)
93 // edm::EDGetTokenT< l1extra::L1EtMissParticleCollection > l1ExtraETMToken_;
94  edm::InputTag tagL1ExtraHTM_; // configuration (optional)
95 // edm::EDGetTokenT< l1extra::L1EtMissParticleCollection > l1ExtraHTMToken_;
104  bool mainBxOnly_; // configuration (optional with default)
105  bool saveL1Refs_; // configuration (optional with default)
106  // HLT
109  edm::InputTag tagTriggerResults_; // configuration (optional with default)
110 // edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_;
111  edm::InputTag tagTriggerEvent_; // configuration (optional with default)
112 // edm::EDGetTokenT< trigger::TriggerEvent > triggerEventToken_;
113  std::string hltPrescaleLabel_; // configuration (optional)
114  std::string labelHltPrescaleTable_; // configuration (optional)
115 // edm::EDGetTokenT< trigger::HLTPrescaleTable > hltPrescaleTableRunToken_;
116 // edm::EDGetTokenT< trigger::HLTPrescaleTable > hltPrescaleTableLumiToken_;
117 // edm::EDGetTokenT< trigger::HLTPrescaleTable > hltPrescaleTableEventToken_;
120  bool addPathModuleLabels_; // configuration (optional with default)
121  std::vector< std::string > exludeCollections_; // configuration (optional)
122  bool packPathNames_; // configuration (optional width default)
123  bool packPrescales_; // configuration (optional width default)
124 
126  public:
127  struct PathAndFlags {
128  PathAndFlags(const std::string &name, unsigned int index, bool last, bool l3) : pathName(name), pathIndex(index), lastFilter(last), l3Filter(l3) {}
131  unsigned int pathIndex;
133  bool l3Filter;
134  };
135  void init(const HLTConfigProvider &conf) ;
136  void clear() { map_.clear(); }
137  const std::vector<PathAndFlags> & operator[](const std::string & filter) const {
138  std::map<std::string,std::vector<PathAndFlags> >::const_iterator it = map_.find(filter);
139  return (it == map_.end() ? empty_ : it->second);
140  }
141  private:
142  void insert(const std::string & filter, const std::string &path, unsigned int pathIndex, bool lastFilter, bool l3Filter) {
143  map_[filter].push_back(PathAndFlags(path, pathIndex, lastFilter, l3Filter));
144  }
145  std::map<std::string,std::vector<PathAndFlags> > map_;
146  const std::vector<PathAndFlags> empty_;
147  };
149 
150  };
151 }
152 
153 
154 #endif
virtual void beginLuminosityBlock(const edm::LuminosityBlock &iLuminosityBlock, const edm::EventSetup &iSetup) override
PATTriggerProducer(const edm::ParameterSet &iConfig)
HLTConfigProvider hltConfig_
The single EDProduct containing the HLT Prescale Table.
void insert(const std::string &filter, const std::string &path, unsigned int pathIndex, bool lastFilter, bool l3Filter)
virtual void beginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
PathAndFlags(const std::string &name, unsigned int index, bool last, bool l3)
const std::vector< PathAndFlags > & operator[](const std::string &filter) const
Produces the full or stand-alone PAT trigger information collections.
int iEvent
Definition: GenABIO.cc:243
std::map< std::string, std::vector< PathAndFlags > > map_
trigger::HLTPrescaleTable hltPrescaleTableLumi_
edm::EDGetTokenT< L1GlobalTriggerObjectMaps > l1GlobalTriggerObjectMapsToken_
tuple conf
Definition: dbtoconf.py:185
edm::InputTag tagL1GlobalTriggerObjectMaps_
ModuleLabelToPathAndFlags moduleLabelToPathAndFlags_
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
trigger::HLTPrescaleTable hltPrescaleTableRun_
std::vector< std::string > exludeCollections_
edm::InputTag tagL1ExtraNoIsoEG_
Definition: Run.h:41
edm::ParameterSet * l1PSet_