15 #include <boost/foreach.hpp>
34 m_eventSetupPathsKey(config.getParameter<std::
string>(
"eventSetupPathsKey")),
35 m_eventSetupWatcher(),
37 m_eventCache(config,consumesCollector())
54 desc.
add<
bool>(
"l1tIgnoreMask",
false);
56 desc.
add<
bool>(
"l1techIgnorePrescales",
false);
58 desc.
add<
unsigned int>(
"daqPartitions",0x01);
60 desc.
add<
bool>(
"throw",
true);
63 descriptions.
add(
"triggerResultsFilterFromDB", desc);
68 if (expressions.size() == 0) {
70 }
else if (expressions.size() == 1) {
71 parse( expressions[0] );
73 std::stringstream expression;
74 expression <<
"(" << expressions[0] <<
")";
75 for (
unsigned int i = 1;
i < expressions.size(); ++
i)
76 expression <<
" OR (" << expressions[
i] <<
")";
77 parse( expression.str() );
87 edm::LogWarning(
"Configuration") <<
"Couldn't parse trigger results expression \"" << expression <<
"\"";
96 typedef std::map<std::string, std::string> TriggerMap;
97 const TriggerMap & triggerMap = triggerBits->m_alcarecoToTrig;
100 if (listIter == triggerMap.end()) {
107 parse( triggerBits->decompose(listIter->second) );
bool configurationUpdated() const
Evaluator * parse(const T &text)
#define DEFINE_FWK_MODULE(type)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::string m_eventSetupPathsKey
read the triggerConditions from the database
ModuleDescription const & moduleDescription() const
std::string const & moduleLabel() const
edm::ESWatcher< AlCaRecoTriggerBitsRcd > m_eventSetupWatcher
bool filter(edm::Event &, const edm::EventSetup &) override
triggerExpression::Evaluator * m_expression
evaluator for the trigger condition
ParameterDescriptionBase * add(U const &iLabel, T const &value)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
triggerExpression::Data m_eventCache
cache some data from the Event for faster access by the m_expression
void parse(const std::string &expression)
parse the logical expression into functionals
TriggerResultsFilterFromDB(const edm::ParameterSet &)
bool setEvent(const edm::Event &event, const edm::EventSetup &setup)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void pathsFromSetup(const edm::Event &, const edm::EventSetup &setup)
read the triggerConditions from the database
bool check(const edm::EventSetup &iSetup)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
~TriggerResultsFilterFromDB()