37 : inputTag_(iConfig.getParameter<
edm::
InputTag>(
"TriggerResultsTag")),
40 andOr_(iConfig.getParameter<
bool>(
"andOr")),
41 throw_(iConfig.getParameter<
bool>(
"throw")),
42 eventSetupPathsKey_(iConfig.getParameter<
std::
string>(
"eventSetupPathsKey")),
70 std::vector<std::string>
hltPaths(0);
72 desc.add<std::vector<std::string> >(
"HLTPaths",
hltPaths);
76 desc.add<
bool>(
"andOr",
true);
78 desc.add<
bool>(
"throw",
true);
79 descriptions.
add(
"hltHighLevel",
desc);
106 for (
unsigned int i = 0;
i <
n; ++
i) {
115 std::vector<std::vector<std::string>::const_iterator>
matches =
121 <<
"requested pattern \"" <<
pattern <<
"\" does not match any HLT paths";
123 edm::LogInfo(
"Configuration") <<
"requested pattern \"" <<
pattern <<
"\" does not match any HLT paths";
156 <<
"none of the requested paths and pattern match any HLT path - no events will be selected";
162 <<
" - andOr mode: " <<
andOr_ <<
" - throw mode: " <<
throw_;
164 LogTrace(
"HLTHighLevel") <<
"The HLT trigger paths (# index name):";
165 for (
unsigned int i = 0;
i <
n; ++
i)
178 typedef std::map<std::string, std::string> TriggerMap;
179 const TriggerMap& triggerMap = triggerBits.m_alcarecoToTrig;
181 auto listIter = triggerMap.find(
key);
182 if (listIter == triggerMap.end()) {
185 <<
"]: No triggerList with key " <<
key <<
" in AlCaRecoTriggerBitsRcd";
190 return triggerBits.decompose(listIter->second);
202 LogDebug(
"HLTHighLevel") <<
"TriggerResults found, number of HLT paths: " << trh->
size();
205 <<
" not found - returning result=false!";
211 bool config_changed =
false;
214 config_changed =
true;
225 unsigned int nbad = 0;
226 unsigned int fired = 0;
229 for (
unsigned int i = 0;
i <
n;
i++)
235 if ((nbad > 0) and (config_changed
or throw_)) {
239 for (
unsigned int i = 0;
i <
n;
i++)
243 if (config_changed) {
245 <<
"] configured with " << nbad <<
"/" <<
n <<
" unknown HLT path names: " << message;
251 << nbad <<
"/" <<
n <<
" unknown HLT path names: " << message;
257 LogDebug(
"HLTHighLevel") <<
"Accept = " << std::boolalpha <<
accept;
263 return event.moduleCallingContext()->placeInPathContext()->pathContext()->pathName();
bool accept() const
Has at least one path accepted the event?
T getParameter(std::string const &) const
void init(const edm::TriggerResults &results, const edm::Event &, const edm::EventSetup &iSetup, const edm::TriggerNames &triggerNames)
initialize the trigger conditions (call this if the trigger paths have changed)
bool is_glob(std::string const &pattern)
bool andOr_
false = and-mode (all requested triggers), true = or-mode (at least one)
Log< level::Error, false > LogError
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
std::string const & moduleLabel() const
unsigned int size() const
Get number of paths stored.
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
std::vector< unsigned int > HLTPathsByIndex_
list of required HLT triggers by HLT index
edm::ParameterSetID triggerNamesID_
HLT trigger names.
bool getData(T &iHolder) const
std::vector< std::string > pathsFromSetup(const std::string &key, const edm::Event &, const edm::EventSetup &iSetup) const
get HLTPaths with key 'key' from EventSetup (AlCaRecoTriggerBitsRcd)
bool filter(edm::Event &, const edm::EventSetup &) override
Log< level::Info, false > LogInfo
std::optional< edm::ESWatcher< AlCaRecoTriggerBitsRcd > > watchAlCaRecoTriggerBitsRcd_
Watcher to be created and used if 'eventSetupPathsKey_' non empty:
edm::ESGetToken< AlCaRecoTriggerBits, AlCaRecoTriggerBitsRcd > alcaRecotriggerBitsToken_
ESGetToken to read AlCaRecoTriggerBits.
edm::EDGetTokenT< edm::TriggerResults > inputToken_
const std::string eventSetupPathsKey_
not empty => use read paths from AlCaRecoTriggerBitsRcd via this key
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< std::vector< std::string >::const_iterator > regexMatch(std::vector< std::string > const &strings, std::regex const ®exp)
bool throw_
throw on any requested trigger being unknown
HLTHighLevel(const edm::ParameterSet &)
std::vector< std::string > HLTPathsByName_
list of required HLT triggers by HLT name
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Log< level::Warning, false > LogWarning
std::vector< std::string > HLTPatterns_
input patterns that will be expanded into trigger names
std::string const & moduleLabel() const
edm::InputTag inputTag_
HLT TriggerResults EDProduct.
std::string const & pathName(const edm::Event &) const
stolen from HLTFilter
ModuleDescription const & moduleDescription() const