CMS 3D CMS Logo

PATTriggerProducer.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_PatAlgos_PATTriggerProducer_h
2 #define PhysicsTools_PatAlgos_PATTriggerProducer_h
3 
4 // -*- C++ -*-
5 //
6 // Package: PatAlgos
7 // Class: pat::PATTriggerProducer
8 //
9 //
40 
41 #include <string>
42 
45 
48 
53 
54 namespace pat {
55 
57  public:
58  explicit PATTriggerProducer(const edm::ParameterSet& iConfig);
59  ~PATTriggerProducer() override{};
60 
61  private:
62  void beginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) override;
63  void beginLuminosityBlock(const edm::LuminosityBlock& iLuminosityBlock, const edm::EventSetup& iSetup) override;
64  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
65 
66  std::string nameProcess_; // configuration
68  bool onlyStandAlone_; // configuration
70  // L1
72  bool addL1Algos_; // configuration (optional with default)
73  edm::InputTag tagL1GlobalTriggerObjectMaps_; // configuration (optional with default)
75  edm::InputTag tagL1ExtraMu_; // configuration (optional)
77  edm::InputTag tagL1ExtraNoIsoEG_; // configuration (optional)
79  edm::InputTag tagL1ExtraIsoEG_; // configuration (optional)
81  edm::InputTag tagL1ExtraCenJet_; // configuration (optional)
83  edm::InputTag tagL1ExtraForJet_; // configuration (optional)
85  edm::InputTag tagL1ExtraTauJet_; // configuration (optional)
87  edm::InputTag tagL1ExtraETM_; // configuration (optional)
89  edm::InputTag tagL1ExtraHTM_; // configuration (optional)
99  bool mainBxOnly_; // configuration (optional with default)
100  bool saveL1Refs_; // configuration (optional with default)
101  // HLT
104  edm::InputTag tagTriggerResults_; // configuration (optional with default)
106  edm::InputTag tagTriggerEvent_; // configuration (optional with default)
108  std::string hltPrescaleLabel_; // configuration (optional)
109  std::string labelHltPrescaleTable_; // configuration (optional)
115  bool addPathModuleLabels_; // configuration (optional with default)
116  std::vector<std::string> exludeCollections_; // configuration (optional)
117  bool packPathNames_; // configuration (optional width default)
118  bool packLabels_; // configuration (optional width default)
119  bool packPrescales_; // configuration (optional width default)
120 
122  public:
123  struct PathAndFlags {
124  PathAndFlags(const std::string& name, unsigned int index, bool last, bool l3)
125  : pathName(name), pathIndex(index), lastFilter(last), l3Filter(l3) {}
128  unsigned int pathIndex;
130  bool l3Filter;
131  };
132  void init(const HLTConfigProvider&);
133  void clear() { map_.clear(); }
134  const std::vector<PathAndFlags>& operator[](const std::string& filter) const {
135  std::map<std::string, std::vector<PathAndFlags> >::const_iterator it = map_.find(filter);
136  return (it == map_.end() ? empty_ : it->second);
137  }
138 
139  private:
140  void insert(
141  const std::string& filter, const std::string& path, unsigned int pathIndex, bool lastFilter, bool l3Filter) {
142  map_[filter].push_back(PathAndFlags(path, pathIndex, lastFilter, l3Filter));
143  }
144  std::map<std::string, std::vector<PathAndFlags> > map_;
145  const std::vector<PathAndFlags> empty_;
146  };
148  };
149 } // namespace pat
150 
151 #endif
void beginLuminosityBlock(const edm::LuminosityBlock &iLuminosityBlock, const edm::EventSetup &iSetup) override
edm::EDGetTokenT< L1GlobalTriggerObjectMaps > l1GlobalTriggerObjectMapsToken_
PATTriggerProducer(const edm::ParameterSet &iConfig)
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)
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_
Definition: HeavyIon.h:7
const std::vector< PathAndFlags > & operator[](const std::string &filter) const
std::vector< std::string > exludeCollections_
edm::GetterOfProducts< l1extra::L1EmParticleCollection > l1ExtraNoIsoEGGetter_
edm::GetterOfProducts< trigger::HLTPrescaleTable > hltPrescaleTableEventGetter_
Produces the full or stand-alone PAT trigger information collections.
std::map< std::string, std::vector< PathAndFlags > > map_
int iEvent
Definition: GenABIO.cc:224
edm::GetterOfProducts< l1extra::L1EtMissParticleCollection > l1ExtraHTMGetter_
trigger::HLTPrescaleTable hltPrescaleTableLumi_
edm::GetterOfProducts< l1extra::L1JetParticleCollection > l1ExtraTauJetGetter_
edm::GetterOfProducts< l1extra::L1JetParticleCollection > l1ExtraCenJetGetter_
edm::GetterOfProducts< l1extra::L1EtMissParticleCollection > l1ExtraETMGetter_
edm::GetterOfProducts< l1extra::L1EmParticleCollection > l1ExtraIsoEGGetter_
edm::GetterOfProducts< trigger::TriggerEvent > triggerEventGetter_
edm::GetterOfProducts< l1extra::L1MuonParticleCollection > l1ExtraMuGetter_
edm::InputTag tagL1GlobalTriggerObjectMaps_
ModuleLabelToPathAndFlags moduleLabelToPathAndFlags_
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
trigger::HLTPrescaleTable hltPrescaleTableRun_
edm::InputTag tagL1ExtraNoIsoEG_
Definition: Run.h:45
edm::GetterOfProducts< edm::TriggerResults > triggerResultsGetter_
HLTPrescaleProvider hltPrescaleProvider_
edm::GetterOfProducts< trigger::HLTPrescaleTable > hltPrescaleTableRunGetter_
edm::ParameterSet * l1PSet_