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")),
43 eventSetupPathsLabel_(iConfig.getParameter<
std::
string>(
"eventSetupPathsLabel")),
72 std::vector<std::string>
hltPaths(0);
74 desc.add<std::vector<std::string> >(
"HLTPaths",
hltPaths);
79 desc.add<
bool>(
"andOr",
true);
81 desc.add<
bool>(
"throw",
true);
82 descriptions.
add(
"hltHighLevel",
desc);
109 for (
unsigned int i = 0;
i <
n; ++
i) {
118 std::vector<std::vector<std::string>::const_iterator>
matches =
124 <<
"requested pattern \"" <<
pattern <<
"\" does not match any HLT paths";
126 edm::LogInfo(
"Configuration") <<
"requested pattern \"" <<
pattern <<
"\" does not match any HLT paths";
159 <<
"none of the requested paths and pattern match any HLT path - no events will be selected";
165 <<
" - andOr mode: " <<
andOr_ <<
" - throw mode: " <<
throw_;
167 LogTrace(
"HLTHighLevel") <<
"The HLT trigger paths (# index name):";
168 for (
unsigned int i = 0;
i <
n; ++
i)
181 typedef std::map<std::string, std::string> TriggerMap;
182 const TriggerMap& triggerMap = triggerBits.m_alcarecoToTrig;
184 auto listIter = triggerMap.find(
key);
185 if (listIter == triggerMap.end()) {
188 <<
"]: No triggerList with key " <<
key <<
" in AlCaRecoTriggerBitsRcd";
193 return triggerBits.decompose(listIter->second);
205 LogDebug(
"HLTHighLevel") <<
"TriggerResults found, number of HLT paths: " << trh->
size();
208 <<
" not found - returning result=false!";
214 bool config_changed =
false;
217 config_changed =
true;
228 unsigned int nbad = 0;
229 unsigned int fired = 0;
232 for (
unsigned int i = 0;
i <
n;
i++)
238 if ((nbad > 0) and (config_changed
or throw_)) {
242 for (
unsigned int i = 0;
i <
n;
i++)
246 if (config_changed) {
248 <<
"] configured with " << nbad <<
"/" <<
n <<
" unknown HLT path names: " << message;
254 << nbad <<
"/" <<
n <<
" unknown HLT path names: " << message;
260 LogDebug(
"HLTHighLevel") <<
"Accept = " << std::boolalpha <<
accept;
266 return event.moduleCallingContext()->placeInPathContext()->pathContext()->pathName();
bool accept() const
Has at least one path accepted the event?
T getParameter(std::string const &) const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
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.
key
prepare the HTCondor submission files and eventually submit them
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
const std::string eventSetupPathsLabel_
edm::InputTag inputTag_
HLT TriggerResults EDProduct.
std::string const & pathName(const edm::Event &) const
stolen from HLTFilter
ModuleDescription const & moduleDescription() const