12 verbose_(ps.getUntrackedParameter<
bool>(
"verbose",
false)),
13 processName_(ps.getParameter<
std::
string>(
"processName")),
14 hltPathsOfInterest_(ps.getParameter<
std::vector<
std::
string> >(
"hltPathsOfInterest")),
15 triggerResultsTag_(ps.getUntrackedParameter<
edm::
InputTag>(
"triggerResults",
edm::
InputTag(
"TriggerResults",
"",
"HLT"))),
16 triggerEventTag_(ps.getUntrackedParameter<
edm::
InputTag>(
"triggerEvent",
edm::
InputTag(
"hltTriggerSummaryAOD",
"",
"HLT"))),
18 triggerEventToken_(consumes<
trigger::TriggerEvent>(triggerEventTag_))
31 for (
auto path: pathList) {
35 nmatch += TPRegexp(kt).Match(
path);
36 if (!nmatch)
continue;
40 if (triggerIndex >=
n) {
49 <<
" config extraction failure with process name " 56 if (!triggerResultsHandle_.
isValid()) {
57 edm::LogError(
"HLTPathSelector") <<
"Error in getting TriggerResults product from Event!";
63 if (!triggerEventHandle_.
isValid()) {
64 edm::LogError(
"HLTPathSelector") <<
"Error in getting TriggerEvent product from Event!";
73 const unsigned int triggerIndex(it.second);
79 <<
" Trigger path <" << path <<
"> status:" 80 <<
" WasRun=" << triggerResultsHandle_->
wasrun(triggerIndex)
81 <<
" Accept=" << triggerResultsHandle_->
accept(triggerIndex)
82 <<
" Error=" << triggerResultsHandle_->
error(triggerIndex);
84 if (triggerResultsHandle_->
wasrun(triggerIndex) && triggerResultsHandle_->
accept(triggerIndex)) {
92 if (flag > 0)
return true;
98 << setw(32) <<
"HLT Path" 99 << setw(9) <<
"ACCEPT";
100 for (
auto const& jt:
tmap_)
102 << setw(9) << jt.second;
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?
HLTConfigProvider hltConfig_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::map< std::string, unsigned int > hltPathsMap_
#define DEFINE_FWK_MODULE(type)
bool accept() const
Has at least one path accepted the event?
const std::vector< std::string > & triggerNames() const
names of trigger paths
bool filter(edm::Event &, edm::EventSetup const &) override
const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
const std::vector< std::string > hltPathsOfInterest_
unsigned int triggerIndex(std::string const &name) const
unsigned int size() const
Get number of paths stored.
void beginRun(edm::Run const &, edm::EventSetup const &) override
bool error() const
Has any path encountered an error (exception)
std::map< std::string, int > tmap_
const edm::EDGetTokenT< trigger::TriggerEvent > triggerEventToken_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
HLTPathSelector(const edm::ParameterSet &)
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override