12 : verbose_(ps.getUntrackedParameter<bool>(
"verbose",
false)),
13 processName_(ps.getParameter<std::
string>(
"processName")),
14 hltPathsOfInterest_(ps.getParameter<std::
vector<std::
string> >(
"hltPathsOfInterest")),
16 ps.getUntrackedParameter<edm::
InputTag>(
"triggerResults", edm::
InputTag(
"TriggerResults",
"",
"HLT"))),
18 ps.getUntrackedParameter<edm::
InputTag>(
"triggerEvent", edm::
InputTag(
"hltTriggerSummaryAOD",
"",
"HLT"))),
19 triggerResultsToken_(consumes<edm::
TriggerResults>(triggerResultsTag_)),
20 triggerEventToken_(consumes<trigger::TriggerEvent>(triggerEventTag_)) {}
31 for (
const auto&
path : pathList) {
35 nmatch += TPRegexp(kt).Match(
path);
41 if (triggerIndex >=
n) {
54 if (!triggerResultsHandle_.
isValid()) {
55 edm::LogError(
"HLTPathSelector") <<
"Error in getting TriggerResults product from Event!";
61 if (!triggerEventHandle_.
isValid()) {
62 edm::LogError(
"HLTPathSelector") <<
"Error in getting TriggerEvent product from Event!";
71 const unsigned int triggerIndex(it.second);
76 edm::LogInfo(
"HLTPathSelector") <<
" Trigger path <" << path <<
"> status:"
77 <<
" WasRun=" << triggerResultsHandle_->wasrun(triggerIndex)
78 <<
" Accept=" << triggerResultsHandle_->accept(triggerIndex)
79 <<
" Error=" << triggerResultsHandle_->error(triggerIndex);
81 if (triggerResultsHandle_->wasrun(triggerIndex) && triggerResultsHandle_->accept(triggerIndex)) {
94 edm::LogInfo(
"HLTPathSelector") << setw(32) <<
"HLT Path" << setw(9) <<
"ACCEPT";
95 for (
auto const& jt :
tmap_)
unsigned int size() const
number of trigger paths in trigger table
void dump(const std::string &what) const
Dumping config info to cout.
HLTConfigProvider hltConfig_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::map< std::string, unsigned int > hltPathsMap_
#define DEFINE_FWK_MODULE(type)
const std::vector< std::string > & triggerNames() const
names of trigger paths
unsigned int triggerIndex(std::string_view name) const
bool filter(edm::Event &, edm::EventSetup const &) override
const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
Log< level::Error, false > LogError
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
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_
void beginRun(edm::Run const &, edm::EventSetup const &) override
Log< level::Info, false > LogInfo
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 &)