|
|
Go to the documentation of this file.
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();
std::string const & moduleLabel() const
edm::EDGetTokenT< edm::TriggerResults > inputToken_
std::vector< std::vector< std::string >::const_iterator > regexMatch(std::vector< std::string > const &strings, std::regex const ®exp)
bool is_glob(std::string const &pattern)
std::optional< edm::ESWatcher< AlCaRecoTriggerBitsRcd > > watchAlCaRecoTriggerBitsRcd_
Watcher to be created and used if 'eventSetupPathsKey_' non empty:
Log< level::Info, false > LogInfo
std::vector< std::string > HLTPatterns_
input patterns that will be expanded into trigger names
Log< level::Warning, false > LogWarning
edm::ESGetToken< AlCaRecoTriggerBits, AlCaRecoTriggerBitsRcd > alcaRecotriggerBitsToken_
ESGetToken to read AlCaRecoTriggerBits.
const std::string & moduleLabel() const
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
const std::string & pathName(const edm::Event &) const
stolen from HLTFilter
void add(std::string const &label, ParameterSetDescription const &psetDescription)
unsigned int size() const
Get number of paths stored.
bool throw_
throw on any requested trigger being unknown
std::vector< unsigned int > HLTPathsByIndex_
list of required HLT triggers by HLT index
edm::ParameterSetID triggerNamesID_
HLT trigger names.
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)
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
edm::InputTag inputTag_
HLT TriggerResults EDProduct.
bool filter(edm::Event &, const edm::EventSetup &) override
const std::string eventSetupPathsKey_
not empty => use read paths from AlCaRecoTriggerBitsRcd via this key
Log< level::Error, false > LogError
bool andOr_
false = and-mode (all requested triggers), true = or-mode (at least one)
bool getData(T &iHolder) const
HLTHighLevel(const edm::ParameterSet &)
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)
ModuleDescription const & moduleDescription() const
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
T getParameter(std::string const &) const
std::vector< std::string > HLTPathsByName_
list of required HLT triggers by HLT name
bool accept() const
Has at least one path accepted the event?
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)