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 );
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
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 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 &) ;
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
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)
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_
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: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_
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:42
HLTPrescaleProvider hltPrescaleProvider_
edm::ParameterSet * l1PSet_