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 //
42 
43 #include <string>
44 
47 
50 
55 
56 namespace pat {
57 
59 
60  public:
61 
62  explicit PATTriggerProducer( const edm::ParameterSet & iConfig );
64 
65  private:
66 
67  virtual void beginRun(const edm::Run & iRun, const edm::EventSetup& iSetup) override;
68  virtual void beginLuminosityBlock(const edm::LuminosityBlock & iLuminosityBlock, const edm::EventSetup& iSetup) override;
69  virtual void produce( edm::Event & iEvent, const edm::EventSetup& iSetup) override;
70 
71  std::string nameProcess_; // configuration
73  bool onlyStandAlone_; // configuration
75  // L1
78  bool addL1Algos_; // configuration (optional with default)
79  edm::InputTag tagL1GlobalTriggerObjectMaps_; // configuration (optional with default)
81  edm::InputTag tagL1ExtraMu_; // configuration (optional)
83  edm::InputTag tagL1ExtraNoIsoEG_; // configuration (optional)
85  edm::InputTag tagL1ExtraIsoEG_; // configuration (optional)
87  edm::InputTag tagL1ExtraCenJet_; // configuration (optional)
89  edm::InputTag tagL1ExtraForJet_; // configuration (optional)
91  edm::InputTag tagL1ExtraTauJet_; // configuration (optional)
93  edm::InputTag tagL1ExtraETM_; // configuration (optional)
95  edm::InputTag tagL1ExtraHTM_; // configuration (optional)
105  bool mainBxOnly_; // configuration (optional with default)
106  bool saveL1Refs_; // configuration (optional with default)
107  // HLT
110  edm::InputTag tagTriggerResults_; // configuration (optional with default)
112  edm::InputTag tagTriggerEvent_; // configuration (optional with default)
114  std::string hltPrescaleLabel_; // configuration (optional)
115  std::string labelHltPrescaleTable_; // configuration (optional)
121  bool addPathModuleLabels_; // configuration (optional with default)
122  std::vector< std::string > exludeCollections_; // configuration (optional)
123  bool packPathNames_; // configuration (optional width default)
124  bool packPrescales_; // configuration (optional width default)
125 
127  public:
128  struct PathAndFlags {
129  PathAndFlags(const std::string &name, unsigned int index, bool last, bool l3) : pathName(name), pathIndex(index), lastFilter(last), l3Filter(l3) {}
132  unsigned int pathIndex;
134  bool l3Filter;
135  };
136  void init(const HLTConfigProvider &conf) ;
137  void clear() { map_.clear(); }
138  const std::vector<PathAndFlags> & operator[](const std::string & filter) const {
139  std::map<std::string,std::vector<PathAndFlags> >::const_iterator it = map_.find(filter);
140  return (it == map_.end() ? empty_ : it->second);
141  }
142  private:
143  void insert(const std::string & filter, const std::string &path, unsigned int pathIndex, bool lastFilter, bool l3Filter) {
144  map_[filter].push_back(PathAndFlags(path, pathIndex, lastFilter, l3Filter));
145  }
146  std::map<std::string,std::vector<PathAndFlags> > map_;
147  const std::vector<PathAndFlags> empty_;
148  };
150 
151  };
152 }
153 
154 
155 #endif
edm::GetterOfProducts< l1extra::L1MuonParticleCollection > l1ExtraMuGetter_
edm::GetterOfProducts< trigger::HLTPrescaleTable > hltPrescaleTableEventGetter_
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.
edm::GetterOfProducts< trigger::TriggerEvent > triggerEventGetter_
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)
edm::GetterOfProducts< trigger::HLTPrescaleTable > hltPrescaleTableLumiGetter_
edm::GetterOfProducts< l1extra::L1JetParticleCollection > l1ExtraForJetGetter_
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:230
std::map< std::string, std::vector< PathAndFlags > > map_
edm::GetterOfProducts< l1extra::L1JetParticleCollection > l1ExtraTauJetGetter_
trigger::HLTPrescaleTable hltPrescaleTableLumi_
edm::GetterOfProducts< l1extra::L1EtMissParticleCollection > l1ExtraHTMGetter_
edm::EDGetTokenT< L1GlobalTriggerObjectMaps > l1GlobalTriggerObjectMapsToken_
edm::GetterOfProducts< l1extra::L1EmParticleCollection > l1ExtraNoIsoEGGetter_
tuple conf
Definition: dbtoconf.py:185
edm::GetterOfProducts< l1extra::L1EtMissParticleCollection > l1ExtraETMGetter_
edm::GetterOfProducts< trigger::HLTPrescaleTable > hltPrescaleTableRunGetter_
edm::InputTag tagL1GlobalTriggerObjectMaps_
ModuleLabelToPathAndFlags moduleLabelToPathAndFlags_
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
edm::GetterOfProducts< l1extra::L1EmParticleCollection > l1ExtraIsoEGGetter_
edm::GetterOfProducts< l1extra::L1JetParticleCollection > l1ExtraCenJetGetter_
edm::GetterOfProducts< edm::TriggerResults > triggerResultsGetter_
trigger::HLTPrescaleTable hltPrescaleTableRun_
std::vector< std::string > exludeCollections_
edm::InputTag tagL1ExtraNoIsoEG_
Definition: Run.h:41
edm::ParameterSet * l1PSet_