23 processName_(ps.getParameter<std::
string>(
"processName")),
24 triggerName_(ps.getParameter<std::
string>(
"triggerName")),
25 triggerResultsTag_(ps.getParameter<edm::
InputTag>(
"triggerResults")),
27 triggerEventTag_(ps.getParameter<edm::
InputTag>(
"triggerEvent")),
28 triggerEventToken_(consumes<trigger::TriggerEvent>(triggerEventTag_)),
29 hltPrescaleProvider_(ps, consumesCollector(), *this)
34 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD configuration: " << endl
56 descriptions.
add(
"hltEventAnalyzerAOD", desc);
76 const unsigned int n(hltConfig.
size());
78 if (triggerIndex>=
n) {
79 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD::analyze:"
81 <<
" not available in (new) config!" << endl;
82 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"Available TriggerNames are: " << endl;
83 hltConfig.
dump(
"Triggers");
86 hltConfig.
dump(
"ProcessName");
87 hltConfig.
dump(
"GlobalTag");
88 hltConfig.
dump(
"TableName");
89 hltConfig.
dump(
"Streams");
90 hltConfig.
dump(
"Datasets");
91 hltConfig.
dump(
"PrescaleTable");
92 hltConfig.
dump(
"ProcessPSet");
95 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD::analyze:"
96 <<
" config extraction failure with process name "
113 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD::analyze: Error in getting TriggerResults product from Event!" << endl;
118 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD::analyze: Error in getting TriggerEvent product from Event!" << endl;
130 for (
unsigned int i=0;
i!=
n; ++
i) {
145 using namespace reco;
146 using namespace trigger;
153 const unsigned int triggerIndex(
hltConfig.triggerIndex(triggerName));
157 if (triggerIndex>=
n) {
158 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD::analyzeTrigger: path "
159 << triggerName <<
" - not found!" << endl;
164 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD::analyzeTrigger: path "
165 << triggerName <<
" [" << triggerIndex <<
"] "
170 for (
unsigned int i=0;
i<prescalesInDetail.first.size(); ++
i) {
171 message <<
" " <<
i <<
":" << prescalesInDetail.first[
i].first <<
"/" << prescalesInDetail.first[
i].second;
173 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD::analyzeTrigger: path "
174 << triggerName <<
" [" << triggerIndex <<
"] "
176 <<
"prescales L1T: " << prescalesInDetail.first.size() <<
message.str()
178 <<
" prescale HLT: " << prescalesInDetail.second
182 const unsigned int m(
hltConfig.size(triggerIndex));
183 const vector<string>& moduleLabels(
hltConfig.moduleLabels(triggerIndex));
186 LogVerbatim(
"HLTEventAnalyzerAOD") <<
" Trigger path status:"
192 LogVerbatim(
"HLTEventAnalyzerAOD") <<
" Last active module - label/type: "
193 << moduleLabels[moduleIndex] <<
"/" <<
hltConfig.moduleType(moduleLabels[moduleIndex])
194 <<
" [" << moduleIndex <<
" out of 0-" << (
m-1) <<
" on this path]"
200 for (
unsigned int j=0;
j<=moduleIndex; ++
j) {
201 const string& moduleLabel(moduleLabels[
j]);
202 const string moduleType(
hltConfig.moduleType(moduleLabel));
205 if (filterIndex<triggerEventHandle_->sizeFilters()) {
206 LogVerbatim(
"HLTEventAnalyzerAOD") <<
" 'L3' filter in slot " << j <<
" - label/type " << moduleLabel <<
"/" << moduleType << endl;
213 LogVerbatim(
"HLTEventAnalyzerAOD") <<
" " << n <<
" accepted 'L3' objects found: " << endl;
217 LogVerbatim(
"HLTEventAnalyzerAOD") <<
" " << i <<
" " << VIDS[
i] <<
"/" << KEYS[
i] <<
": "
218 << TO.
id() <<
" " << TO.
pt() <<
" " << TO.
eta() <<
" " << TO.
phi() <<
" " << TO.
mass()
unsigned int size() const
number of trigger paths in trigger table
void dump(const std::string &what) const
Dumping config info to cout.
virtual void analyzeTrigger(const edm::Event &, const edm::EventSetup &, const std::string &triggerName)
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
std::pair< std::vector< std::pair< std::string, int > >, int > prescaleValuesInDetail(const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const edm::InputTag triggerResultsTag_
const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const std::string triggerName_
edm::Handle< trigger::TriggerEvent > triggerEventHandle_
const std::string processName_
module config parameters
HLTPrescaleProvider hltPrescaleProvider_
triggerResultsToken_(consumes< edm::TriggerResults >(edm::InputTag("TriggerResults")))
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
Single trigger physics object (e.g., an isolated muon)
const edm::InputTag triggerEventTag_
unsigned int triggerIndex(std::string const &name) const
virtual void beginRun(edm::Run const &, edm::EventSetup const &) override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
const edm::EDGetTokenT< trigger::TriggerEvent > triggerEventToken_
edm::Handle< edm::TriggerResults > triggerResultsHandle_
additional class data memebers
virtual ~HLTEventAnalyzerAOD()
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
virtual void endRun(edm::Run const &, edm::EventSetup const &) override
std::vector< size_type > Keys
HLTEventAnalyzerAOD(const edm::ParameterSet &)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::pair< int, int > prescaleValues(const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger)
Combined L1T (pair.first) and HLT (pair.second) prescales per HLT path.
HLTConfigProvider const & hltConfigProvider() const
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)