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 
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 );
63  ~PATTriggerProducer() override {};
64 
65  private:
66 
67  void beginRun(const edm::Run & iRun, const edm::EventSetup& iSetup) override;
68  void beginLuminosityBlock(const edm::LuminosityBlock & iLuminosityBlock, const edm::EventSetup& iSetup) override;
69  void produce( edm::Event & iEvent, const edm::EventSetup& iSetup) override;
70 
71  std::string nameProcess_; // configuration
73  bool onlyStandAlone_; // configuration
75  // L1
77  bool addL1Algos_; // configuration (optional with default)
78  edm::InputTag tagL1GlobalTriggerObjectMaps_; // configuration (optional with default)
80  edm::InputTag tagL1ExtraMu_; // configuration (optional)
82  edm::InputTag tagL1ExtraNoIsoEG_; // configuration (optional)
84  edm::InputTag tagL1ExtraIsoEG_; // configuration (optional)
86  edm::InputTag tagL1ExtraCenJet_; // configuration (optional)
88  edm::InputTag tagL1ExtraForJet_; // configuration (optional)
90  edm::InputTag tagL1ExtraTauJet_; // configuration (optional)
92  edm::InputTag tagL1ExtraETM_; // configuration (optional)
94  edm::InputTag tagL1ExtraHTM_; // configuration (optional)
104  bool mainBxOnly_; // configuration (optional with default)
105  bool saveL1Refs_; // configuration (optional with default)
106  // HLT
109  edm::InputTag tagTriggerResults_; // configuration (optional with default)
111  edm::InputTag tagTriggerEvent_; // configuration (optional with default)
113  std::string hltPrescaleLabel_; // configuration (optional)
114  std::string labelHltPrescaleTable_; // configuration (optional)
120  bool addPathModuleLabels_; // configuration (optional with default)
121  std::vector< std::string > exludeCollections_; // configuration (optional)
122  bool packPathNames_; // configuration (optional width default)
123  bool packLabels_; // 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 &) ;
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_
void beginLuminosityBlock(const edm::LuminosityBlock &iLuminosityBlock, const edm::EventSetup &iSetup) override
PATTriggerProducer(const edm::ParameterSet &iConfig)
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)
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
Produces the full or stand-alone PAT trigger information collections.
int iEvent
Definition: GenABIO.cc:224
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_
edm::GetterOfProducts< l1extra::L1EtMissParticleCollection > l1ExtraETMGetter_
edm::GetterOfProducts< trigger::HLTPrescaleTable > hltPrescaleTableRunGetter_
edm::InputTag tagL1GlobalTriggerObjectMaps_
ModuleLabelToPathAndFlags moduleLabelToPathAndFlags_
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:45
HLTPrescaleProvider hltPrescaleProvider_
edm::ParameterSet * l1PSet_