345 std::string
selection(filterEntry->m_selector->m_expression);
347 boost::regex re_spaces(
"\\s+");
349 if (
selection.find(
"&&") != std::string::npos &&
350 selection.find(
"||") != std::string::npos )
360 hTriggerResults.
getByLabel(*
m_event,
"TriggerResults",
"", filterEntry->m_selector->m_triggerProcess.c_str());
365 fwLog(
fwlog::kWarning) <<
" failed to get trigger results with process name "<< filterEntry->m_selector->m_triggerProcess << std::endl;
374 bool junction_mode =
true;
375 if (
selection.find(
"||")!=std::string::npos)
376 junction_mode =
false;
378 boost::regex re(
"\\&\\&|\\|\\|");
381 boost::sregex_token_iterator
j;
384 std::vector<std::pair<unsigned int,bool> >
filters;
388 std::string filter = *
i++;
390 if (filter[0] ==
'!')
393 filter.erase(filter.begin());
395 unsigned int index = triggerNames->triggerIndex(filter);
396 if (index == triggerNames->size())
401 filters.push_back(std::make_pair(index, flag));
406 if (filterEntry->m_eventList)
407 filterEntry->m_eventList->Reset();
418 hTriggerResults.
getByLabel(*
m_event,
"TriggerResults",
"", filterEntry->m_selector->m_triggerProcess.c_str());
419 std::vector<std::pair<unsigned int,bool> >::const_iterator filter = filters.begin();
420 bool passed = hTriggerResults->
accept(filter->first) == filter->second;
421 while (++filter != filters.end())
424 passed &= hTriggerResults->
accept(filter->first) == filter->second;
426 passed |= hTriggerResults->
accept(filter->first) == filter->second;
434 filterEntry->m_needsUpdate =
false;
436 fwLog(
fwlog::kDebug) <<
"FWFile::filterEventsWithCustomParser file [" <<
m_file->GetName() <<
"], filter [" << filterEntry->m_selector->m_expression <<
"], selected [" << list->GetN() <<
"]" << std::endl;
virtual void Enter(Long64_t entry)
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
bool accept() const
Has at least one path accepted the event?
void getByLabel(const P &iP, const char *iModuleLabel, const char *iProductInstanceLabel=0, const char *iProcessLabel=0)
bool to(Long64_t iIndex)
Go to the event at index iIndex.
std::list< Filter * > & filters()
virtual bool atEnd() const
const Event & toBegin()
Go to the very first Event.
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 list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run