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")),
29 hltPrescaleProvider_(ps, consumesCollector(), *this) {
33 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD configuration: " << endl
51 descriptions.
add(
"hltEventAnalyzerAOD", desc);
67 const unsigned int n(hltConfig.
size());
69 if (triggerIndex >=
n) {
71 <<
"HLTEventAnalyzerAOD::analyze:" 72 <<
" TriggerName " <<
triggerName_ <<
" not available in (new) config!" << endl;
73 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"Available TriggerNames are: " << endl;
74 hltConfig.
dump(
"Triggers");
77 hltConfig.
dump(
"ProcessName");
78 hltConfig.
dump(
"GlobalTag");
79 hltConfig.
dump(
"TableName");
80 hltConfig.
dump(
"Streams");
81 hltConfig.
dump(
"Datasets");
82 hltConfig.
dump(
"PrescaleTable");
83 hltConfig.
dump(
"ProcessPSet");
86 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD::analyze:" 87 <<
" config extraction failure with process name " <<
processName_ << endl;
102 <<
"HLTEventAnalyzerAOD::analyze: Error in getting TriggerResults product from Event!" << endl;
108 <<
"HLTEventAnalyzerAOD::analyze: Error in getting TriggerEvent product from Event!" << endl;
119 const unsigned int n(hltConfig.
size());
120 for (
unsigned int i = 0;
i !=
n; ++
i) {
135 using namespace reco;
142 const unsigned int n(hltConfig.
size());
143 const unsigned int triggerIndex(hltConfig.
triggerIndex(triggerName));
147 if (triggerIndex >=
n) {
148 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD::analyzeTrigger: path " << triggerName <<
" - not found!" 154 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD::analyzeTrigger: path " << triggerName <<
" [" 155 << triggerIndex <<
"] " 157 const std::pair<std::vector<std::pair<std::string, int> >,
int> prescalesInDetail(
159 std::ostringstream message;
160 for (
unsigned int i = 0;
i < prescalesInDetail.first.size(); ++
i) {
161 message <<
" " <<
i <<
":" << prescalesInDetail.first[
i].first <<
"/" << prescalesInDetail.first[
i].second;
163 LogVerbatim(
"HLTEventAnalyzerAOD") <<
"HLTEventAnalyzerAOD::analyzeTrigger: path " << triggerName <<
" [" 164 << triggerIndex <<
"] " << endl
165 <<
"prescales L1T: " << prescalesInDetail.first.size() << message.str() << endl
166 <<
" prescale HLT: " << prescalesInDetail.second << endl;
169 const unsigned int m(hltConfig.
size(triggerIndex));
170 const vector<string>& moduleLabels(hltConfig.
moduleLabels(triggerIndex));
173 LogVerbatim(
"HLTEventAnalyzerAOD") <<
" Trigger path status:" 178 LogVerbatim(
"HLTEventAnalyzerAOD") <<
" Last active module - label/type: " << moduleLabels[moduleIndex] <<
"/" 179 << hltConfig.
moduleType(moduleLabels[moduleIndex]) <<
" [" << moduleIndex
180 <<
" out of 0-" << (
m - 1) <<
" on this path]" << endl;
181 assert(moduleIndex <
m);
185 for (
unsigned int j = 0;
j <= moduleIndex; ++
j) {
187 const string moduleType(hltConfig.
moduleType(moduleLabel));
190 if (filterIndex < triggerEventHandle_->sizeFilters()) {
191 LogVerbatim(
"HLTEventAnalyzerAOD") <<
" 'L3' filter in slot " << j <<
" - label/type " << moduleLabel <<
"/" 192 << moduleType << endl;
199 LogVerbatim(
"HLTEventAnalyzerAOD") <<
" " << n <<
" accepted 'L3' objects found: " << endl;
203 LogVerbatim(
"HLTEventAnalyzerAOD") <<
" " << i <<
" " << VIDS[
i] <<
"/" << KEYS[
i] <<
": " << TO.
id() <<
" " 204 << TO.
pt() <<
" " << TO.
eta() <<
" " << TO.
phi() <<
" " << TO.
mass() << endl;
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.
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)
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
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
~HLTEventAnalyzerAOD() override
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
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)