23 processName_(ps.getParameter<
std::
string>(
"processName")),
24 triggerName_(ps.getParameter<
std::
string>(
"triggerName")),
25 triggerResultsTag_(ps.getParameter<
edm::InputTag>(
"triggerResults")),
26 triggerResultsToken_(consumes<
edm::TriggerResults>(triggerResultsTag_)),
27 triggerEventTag_(ps.getParameter<
edm::InputTag>(
"triggerEvent")),
28 triggerEventToken_(consumes<
trigger::TriggerEvent>(triggerEventTag_)),
29 hltPrescaleProvider_(ps, consumesCollector(), *this)
34 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD configuration: " << endl
54 descriptions.
add(
"hltEventAnalyzerAOD", desc);
74 const unsigned int n(hltConfig.
size());
76 if (triggerIndex>=
n) {
77 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD::analyze:" 79 <<
" not available in (new) config!" << endl;
80 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"Available TriggerNames are: " << endl;
81 hltConfig.
dump(
"Triggers");
84 hltConfig.
dump(
"ProcessName");
85 hltConfig.
dump(
"GlobalTag");
86 hltConfig.
dump(
"TableName");
87 hltConfig.
dump(
"Streams");
88 hltConfig.
dump(
"Datasets");
89 hltConfig.
dump(
"PrescaleTable");
90 hltConfig.
dump(
"ProcessPSet");
93 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD::analyze:" 94 <<
" config extraction failure with process name " 111 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD::analyze: Error in getting TriggerResults product from Event!" << endl;
116 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD::analyze: Error in getting TriggerEvent product from Event!" << endl;
127 const unsigned int n(hltConfig.
size());
128 for (
unsigned int i=0;
i!=
n; ++
i) {
143 using namespace reco;
150 const unsigned int n(hltConfig.
size());
151 const unsigned int triggerIndex(hltConfig.
triggerIndex(triggerName));
155 if (triggerIndex>=
n) {
156 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD::analyzeTrigger: path " 157 << triggerName <<
" - not found!" << endl;
162 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD::analyzeTrigger: path " 163 << triggerName <<
" [" << triggerIndex <<
"] " 164 <<
"prescales L1T,HLT: " << prescales.first <<
"," << prescales.second
168 for (
unsigned int i=0;
i<prescalesInDetail.first.size(); ++
i) {
169 message <<
" " <<
i <<
":" << prescalesInDetail.first[
i].first <<
"/" << prescalesInDetail.first[
i].second;
171 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD::analyzeTrigger: path " 172 << triggerName <<
" [" << triggerIndex <<
"] " 174 <<
"prescales L1T: " << prescalesInDetail.first.size() << message.str()
176 <<
" prescale HLT: " << prescalesInDetail.second
180 const unsigned int m(hltConfig.
size(triggerIndex));
181 const vector<string>& moduleLabels(hltConfig.
moduleLabels(triggerIndex));
184 LogVerbatim(
"HLTEventAnalyzerAOD") <<
" Trigger path status:" 190 LogVerbatim(
"HLTEventAnalyzerAOD") <<
" Last active module - label/type: " 191 << moduleLabels[moduleIndex] <<
"/" << hltConfig.
moduleType(moduleLabels[moduleIndex])
192 <<
" [" << moduleIndex <<
" out of 0-" << (
m-1) <<
" on this path]" 194 assert (moduleIndex<
m);
198 for (
unsigned int j=0; j<=moduleIndex; ++j) {
199 const string& moduleLabel(moduleLabels[j]);
200 const string moduleType(hltConfig.
moduleType(moduleLabel));
203 if (filterIndex<triggerEventHandle_->sizeFilters()) {
204 LogVerbatim(
"HLTEventAnalyzerAOD") <<
" 'L3' filter in slot " << j <<
" - label/type " << moduleLabel <<
"/" << moduleType << endl;
211 LogVerbatim(
"HLTEventAnalyzerAOD") <<
" " << n <<
" accepted 'L3' objects found: " << endl;
215 LogVerbatim(
"HLTEventAnalyzerAOD") <<
" " << i <<
" " << VIDS[
i] <<
"/" << KEYS[
i] <<
": " 216 << 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.
bool wasrun() const
Was at least one path run?
virtual void analyzeTrigger(const edm::Event &, const edm::EventSetup &, const std::string &triggerName)
std::pair< std::vector< std::pair< std::string, int > >, int > prescaleValuesInDetail(const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger)
const std::string moduleType(const std::string &module) const
C++ class name of module.
const std::string & triggerName(unsigned int triggerIndex) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const edm::InputTag triggerResultsTag_
const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool accept() const
Has at least one path accepted the event?
const Keys & filterKeys(trigger::size_type index) const
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
const std::string triggerName_
edm::Handle< trigger::TriggerEvent > triggerEventHandle_
const std::string processName_
module config parameters
HLTPrescaleProvider hltPrescaleProvider_
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
const Vids & filterIds(trigger::size_type index) const
const edm::InputTag triggerEventTag_
unsigned int triggerIndex(std::string const &name) const
const TriggerObjectCollection & getObjects() const
unsigned int size() const
Get number of paths stored.
unsigned int index(const unsigned int i) const
Get index (slot position) of module giving the decision of the ith path.
virtual void beginRun(edm::Run const &, edm::EventSetup const &) override
bool error() const
Has any path encountered an error (exception)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
const edm::EDGetTokenT< trigger::TriggerEvent > triggerEventToken_
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
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
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)