46 std::map<std::string, int>
tmap_;
54 desc.addUntracked<
bool>(
"verbose",
false);
56 desc.add<std::vector<std::string> >(
"hltPathsOfInterest", {});
63 : verbose_(ps.getUntrackedParameter<
bool>(
"verbose",
false)),
64 processName_(ps.getParameter<
std::
string>(
"processName")),
69 ps.getUntrackedParameter<
edm::
InputTag>(
"triggerEvent",
edm::
InputTag(
"hltTriggerSummaryAOD",
"",
"HLT"))),
83 for (
const auto&
path : pathList) {
87 nmatch += TPRegexp(kt).Match(
path);
93 if (triggerIndex >=
n) {
107 if (!triggerResultsHandle_.
isValid()) {
108 edm::LogError(
"HLTPathSelector") <<
"Error in getting TriggerResults product from Event!";
114 if (!triggerEventHandle_.
isValid()) {
115 edm::LogError(
"HLTPathSelector") <<
"Error in getting TriggerEvent product from Event!";
124 const unsigned int triggerIndex(
it.second);
125 assert(triggerIndex ==
iEvent.triggerNames(*triggerResultsHandle_).triggerIndex(
path));
130 <<
" WasRun=" << triggerResultsHandle_->
wasrun(triggerIndex)
131 <<
" Accept=" << triggerResultsHandle_->
accept(triggerIndex)
132 <<
" Error=" << triggerResultsHandle_->
error(triggerIndex);
134 if (triggerResultsHandle_->
wasrun(triggerIndex) && triggerResultsHandle_->
accept(triggerIndex)) {
148 edm::LogInfo(
"HLTPathSelector") << setw(32) <<
"HLT Path" << setw(9) <<
"ACCEPT";
149 for (
auto const& jt :
tmap_)
150 edm::LogInfo(
"HLTPathSelector") << setw(9) << jt.second;
const edm::InputTag triggerEventTag_
bool accept() const
Has at least one path accepted the event?
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
HLTConfigProvider hltConfig_
bool error() const
Has any path encountered an error (exception)
std::map< std::string, unsigned int > hltPathsMap_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool filter(edm::Event &, edm::EventSetup const &) override
const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
Log< level::Error, false > LogError
const edm::InputTag triggerResultsTag_
bool wasrun() const
Was at least one path run?
const std::vector< std::string > hltPathsOfInterest_
unsigned int size() const
Get number of paths stored.
void dump(const std::string &what) const
Dumping config info to cout.
const std::string processName_
unsigned int size() const
number of trigger paths in trigger table
void beginRun(edm::Run const &, edm::EventSetup const &) override
#define DEFINE_FWK_MODULE(type)
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
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
const std::vector< std::string > & triggerNames() const
names of trigger paths
HLTPathSelector(const edm::ParameterSet &)