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)
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
pat::PATTriggerProducer::produce
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
Definition: PATTriggerProducer.cc:369
trigger::HLTPrescaleTable
The single EDProduct containing the HLT Prescale Table.
Definition: HLTPrescaleTable.h:20
pat::PATTriggerProducer::addL1Algos_
bool addL1Algos_
Definition: PATTriggerProducer.h:72
pat::PATTriggerProducer::tagL1ExtraNoIsoEG_
edm::InputTag tagL1ExtraNoIsoEG_
Definition: PATTriggerProducer.h:77
pat::PATTriggerProducer::tagL1ExtraCenJet_
edm::InputTag tagL1ExtraCenJet_
Definition: PATTriggerProducer.h:81
pat::PATTriggerProducer::packLabels_
bool packLabels_
Definition: PATTriggerProducer.h:118
TriggerResults.h
pat::PATTriggerProducer::exludeCollections_
std::vector< std::string > exludeCollections_
Definition: PATTriggerProducer.h:116
pat::PATTriggerProducer::ModuleLabelToPathAndFlags::PathAndFlags::l3Filter
bool l3Filter
Definition: PATTriggerProducer.h:130
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
pat::PATTriggerProducer::packPrescales_
bool packPrescales_
Definition: PATTriggerProducer.h:119
TriggerEvent.h
edm::EDGetTokenT< L1GlobalTriggerObjectMaps >
pat::PATTriggerProducer::l1ExtraHTMGetter_
edm::GetterOfProducts< l1extra::L1EtMissParticleCollection > l1ExtraHTMGetter_
Definition: PATTriggerProducer.h:90
pat::PATTriggerProducer::hltConfigInit_
bool hltConfigInit_
Definition: PATTriggerProducer.h:103
L1GlobalTriggerObjectMaps.h
GetterOfProducts.h
pat::PATTriggerProducer::nameProcess_
std::string nameProcess_
Definition: PATTriggerProducer.h:66
EDProducer.h
pat::PATTriggerProducer::autoProcessNameL1ExtraCenJet_
bool autoProcessNameL1ExtraCenJet_
Definition: PATTriggerProducer.h:94
pat::PATTriggerProducer::autoProcessName_
bool autoProcessName_
Definition: PATTriggerProducer.h:67
pat::PATTriggerProducer::ModuleLabelToPathAndFlags::empty_
const std::vector< PathAndFlags > empty_
Definition: PATTriggerProducer.h:145
pat::PATTriggerProducer::l1ExtraIsoEGGetter_
edm::GetterOfProducts< l1extra::L1EmParticleCollection > l1ExtraIsoEGGetter_
Definition: PATTriggerProducer.h:80
pat::PATTriggerProducer::ModuleLabelToPathAndFlags::map_
std::map< std::string, std::vector< PathAndFlags > > map_
Definition: PATTriggerProducer.h:144
pat::PATTriggerProducer::labelHltPrescaleTable_
std::string labelHltPrescaleTable_
Definition: PATTriggerProducer.h:109
pat::PATTriggerProducer
Produces the full or stand-alone PAT trigger information collections.
Definition: PATTriggerProducer.h:56
pat::PATTriggerProducer::hltPrescaleTableRunGetter_
edm::GetterOfProducts< trigger::HLTPrescaleTable > hltPrescaleTableRunGetter_
Definition: PATTriggerProducer.h:110
pat::PATTriggerProducer::l1PSet_
edm::ParameterSet * l1PSet_
Definition: PATTriggerProducer.h:71
pat::PATTriggerProducer::ModuleLabelToPathAndFlags::clear
void clear()
Definition: PATTriggerProducer.h:133
dqmdumpme.last
last
Definition: dqmdumpme.py:56
pat::PATTriggerProducer::hltPrescaleTableLumi_
trigger::HLTPrescaleTable hltPrescaleTableLumi_
Definition: PATTriggerProducer.h:114
pat::PATTriggerProducer::autoProcessNameL1ExtraETM_
bool autoProcessNameL1ExtraETM_
Definition: PATTriggerProducer.h:97
pat::PATTriggerProducer::l1ExtraForJetGetter_
edm::GetterOfProducts< l1extra::L1JetParticleCollection > l1ExtraForJetGetter_
Definition: PATTriggerProducer.h:84
pat::PATTriggerProducer::ModuleLabelToPathAndFlags::insert
void insert(const std::string &filter, const std::string &path, unsigned int pathIndex, bool lastFilter, bool l3Filter)
Definition: PATTriggerProducer.h:140
pat::PATTriggerProducer::autoProcessNameL1ExtraTauJet_
bool autoProcessNameL1ExtraTauJet_
Definition: PATTriggerProducer.h:96
pat::PATTriggerProducer::triggerEventGetter_
edm::GetterOfProducts< trigger::TriggerEvent > triggerEventGetter_
Definition: PATTriggerProducer.h:107
pat::PATTriggerProducer::ModuleLabelToPathAndFlags::init
void init(const HLTConfigProvider &)
Definition: PATTriggerProducer.cc:1191
pat::PATTriggerProducer::hltPrescaleProvider_
HLTPrescaleProvider hltPrescaleProvider_
Definition: PATTriggerProducer.h:102
pat::PATTriggerProducer::ModuleLabelToPathAndFlags::PathAndFlags::PathAndFlags
PathAndFlags()
Definition: PATTriggerProducer.h:126
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
pat::PATTriggerProducer::mainBxOnly_
bool mainBxOnly_
Definition: PATTriggerProducer.h:99
pat::PATTriggerProducer::tagL1ExtraTauJet_
edm::InputTag tagL1ExtraTauJet_
Definition: PATTriggerProducer.h:85
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
pat::PATTriggerProducer::ModuleLabelToPathAndFlags::PathAndFlags::lastFilter
bool lastFilter
Definition: PATTriggerProducer.h:129
pat::PATTriggerProducer::tagL1GlobalTriggerObjectMaps_
edm::InputTag tagL1GlobalTriggerObjectMaps_
Definition: PATTriggerProducer.h:73
pat::PATTriggerProducer::tagL1ExtraMu_
edm::InputTag tagL1ExtraMu_
Definition: PATTriggerProducer.h:75
pat::PATTriggerProducer::hltPrescaleTableRun_
trigger::HLTPrescaleTable hltPrescaleTableRun_
Definition: PATTriggerProducer.h:113
pat::PATTriggerProducer::moduleLabelToPathAndFlags_
ModuleLabelToPathAndFlags moduleLabelToPathAndFlags_
Definition: PATTriggerProducer.h:147
pat::PATTriggerProducer::firstInRun_
bool firstInRun_
Definition: PATTriggerProducer.h:69
edm::ParameterSet
Definition: ParameterSet.h:36
pat::PATTriggerProducer::tagL1ExtraIsoEG_
edm::InputTag tagL1ExtraIsoEG_
Definition: PATTriggerProducer.h:79
pat::PATTriggerProducer::ModuleLabelToPathAndFlags::operator[]
const std::vector< PathAndFlags > & operator[](const std::string &filter) const
Definition: PATTriggerProducer.h:134
pat::PATTriggerProducer::ModuleLabelToPathAndFlags::PathAndFlags
Definition: PATTriggerProducer.h:123
pat::PATTriggerProducer::tagL1ExtraForJet_
edm::InputTag tagL1ExtraForJet_
Definition: PATTriggerProducer.h:83
pat::PATTriggerProducer::autoProcessNameL1ExtraNoIsoEG_
bool autoProcessNameL1ExtraNoIsoEG_
Definition: PATTriggerProducer.h:92
pat::PATTriggerProducer::autoProcessNameL1ExtraIsoEG_
bool autoProcessNameL1ExtraIsoEG_
Definition: PATTriggerProducer.h:93
pat::PATTriggerProducer::hltPrescaleTableLumiGetter_
edm::GetterOfProducts< trigger::HLTPrescaleTable > hltPrescaleTableLumiGetter_
Definition: PATTriggerProducer.h:111
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::GetterOfProducts< l1extra::L1MuonParticleCollection >
pat::PATTriggerProducer::autoProcessNameL1ExtraMu_
bool autoProcessNameL1ExtraMu_
Definition: PATTriggerProducer.h:91
pat::PATTriggerProducer::tagTriggerEvent_
edm::InputTag tagTriggerEvent_
Definition: PATTriggerProducer.h:106
pat::PATTriggerProducer::l1ExtraETMGetter_
edm::GetterOfProducts< l1extra::L1EtMissParticleCollection > l1ExtraETMGetter_
Definition: PATTriggerProducer.h:88
edm::stream::EDProducer
Definition: EDProducer.h:38
HLTPrescaleProvider
Definition: HLTPrescaleProvider.h:37
pat::PATTriggerProducer::ModuleLabelToPathAndFlags::PathAndFlags::pathIndex
unsigned int pathIndex
Definition: PATTriggerProducer.h:128
edm::EventSetup
Definition: EventSetup.h:57
pat
Definition: HeavyIon.h:7
pat::PATTriggerProducer::triggerResultsGetter_
edm::GetterOfProducts< edm::TriggerResults > triggerResultsGetter_
Definition: PATTriggerProducer.h:105
HLTConfigProvider.h
pat::PATTriggerProducer::addPathModuleLabels_
bool addPathModuleLabels_
Definition: PATTriggerProducer.h:115
InputTag.h
pat::PATTriggerProducer::onlyStandAlone_
bool onlyStandAlone_
Definition: PATTriggerProducer.h:68
pat::PATTriggerProducer::hltPrescaleTableEventGetter_
edm::GetterOfProducts< trigger::HLTPrescaleTable > hltPrescaleTableEventGetter_
Definition: PATTriggerProducer.h:112
pat::PATTriggerProducer::l1ExtraMuGetter_
edm::GetterOfProducts< l1extra::L1MuonParticleCollection > l1ExtraMuGetter_
Definition: PATTriggerProducer.h:76
pat::PATTriggerProducer::beginRun
void beginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
Definition: PATTriggerProducer.cc:255
HLTConfigProvider
Definition: HLTConfigProvider.h:28
Frameworkfwd.h
pat::PATTriggerProducer::l1ExtraTauJetGetter_
edm::GetterOfProducts< l1extra::L1JetParticleCollection > l1ExtraTauJetGetter_
Definition: PATTriggerProducer.h:86
pat::PATTriggerProducer::~PATTriggerProducer
~PATTriggerProducer() override
Definition: PATTriggerProducer.h:59
pat::PATTriggerProducer::l1GlobalTriggerObjectMapsToken_
edm::EDGetTokenT< L1GlobalTriggerObjectMaps > l1GlobalTriggerObjectMapsToken_
Definition: PATTriggerProducer.h:74
pat::PATTriggerProducer::PATTriggerProducer
PATTriggerProducer(const edm::ParameterSet &iConfig)
Definition: PATTriggerProducer.cc:43
pat::PATTriggerProducer::l1ExtraCenJetGetter_
edm::GetterOfProducts< l1extra::L1JetParticleCollection > l1ExtraCenJetGetter_
Definition: PATTriggerProducer.h:82
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
HLTPrescaleProvider.h
pat::PATTriggerProducer::autoProcessNameL1ExtraForJet_
bool autoProcessNameL1ExtraForJet_
Definition: PATTriggerProducer.h:95
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
pat::PATTriggerProducer::tagTriggerResults_
edm::InputTag tagTriggerResults_
Definition: PATTriggerProducer.h:104
pat::PATTriggerProducer::saveL1Refs_
bool saveL1Refs_
Definition: PATTriggerProducer.h:100
pat::PATTriggerProducer::tagL1ExtraHTM_
edm::InputTag tagL1ExtraHTM_
Definition: PATTriggerProducer.h:89
pat::PATTriggerProducer::ModuleLabelToPathAndFlags::PathAndFlags::PathAndFlags
PathAndFlags(const std::string &name, unsigned int index, bool last, bool l3)
Definition: PATTriggerProducer.h:124
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
ParameterSet.h
pat::PATTriggerProducer::l1ExtraNoIsoEGGetter_
edm::GetterOfProducts< l1extra::L1EmParticleCollection > l1ExtraNoIsoEGGetter_
Definition: PATTriggerProducer.h:78
pat::PATTriggerProducer::ModuleLabelToPathAndFlags::PathAndFlags::pathName
std::string pathName
Definition: PATTriggerProducer.h:127
edm::Event
Definition: Event.h:73
pat::PATTriggerProducer::ModuleLabelToPathAndFlags
Definition: PATTriggerProducer.h:121
TriggerObjectStandAlone.h
pat::PATTriggerProducer::beginLuminosityBlock
void beginLuminosityBlock(const edm::LuminosityBlock &iLuminosityBlock, const edm::EventSetup &iSetup) override
Definition: PATTriggerProducer.cc:347
pat::PATTriggerProducer::tagL1ExtraETM_
edm::InputTag tagL1ExtraETM_
Definition: PATTriggerProducer.h:87
edm::InputTag
Definition: InputTag.h:15
pat::PATTriggerProducer::hltPrescaleLabel_
std::string hltPrescaleLabel_
Definition: PATTriggerProducer.h:108
pat::PATTriggerProducer::autoProcessNameL1ExtraHTM_
bool autoProcessNameL1ExtraHTM_
Definition: PATTriggerProducer.h:98
pat::PATTriggerProducer::packPathNames_
bool packPathNames_
Definition: PATTriggerProducer.h:117