361 std::string
selection(filterEntry->m_selector->m_expression);
363 boost::regex re_spaces(
"\\s+");
365 if (
selection.find(
"&&") != std::string::npos &&
366 selection.find(
"||") != std::string::npos )
376 hTriggerResults.
getByLabel(*
m_event,
"TriggerResults",
"", filterEntry->m_selector->m_triggerProcess.c_str());
381 fwLog(
fwlog::kWarning) <<
" failed to get trigger results with process name "<< filterEntry->m_selector->m_triggerProcess << std::endl;
390 bool junction_mode =
true;
391 if (
selection.find(
"||")!=std::string::npos)
392 junction_mode =
false;
394 boost::regex re(
"\\&\\&|\\|\\|");
397 boost::sregex_token_iterator
j;
400 std::vector<std::pair<unsigned int,bool> >
filters;
404 std::string filter = *
i++;
406 if (filter[0] ==
'!')
409 filter.erase(filter.begin());
411 unsigned int index = triggerNames->triggerIndex(filter);
412 if (index == triggerNames->size())
417 filters.push_back(std::make_pair(index, flag));
422 if (filterEntry->m_eventList)
423 filterEntry->m_eventList->Reset();
434 hTriggerResults.
getByLabel(*
m_event,
"TriggerResults",
"", filterEntry->m_selector->m_triggerProcess.c_str());
435 std::vector<std::pair<unsigned int,bool> >::const_iterator filter = filters.begin();
436 bool passed = hTriggerResults->
accept(filter->first) == filter->second;
437 while (++filter != filters.end())
440 passed &= hTriggerResults->
accept(filter->first) == filter->second;
442 passed |= hTriggerResults->
accept(filter->first) == filter->second;
450 filterEntry->m_needsUpdate =
false;
452 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)
Event const & toBegin()
Go to the very first Event.
bool to(Long64_t iIndex)
Go to the event at index iIndex.
std::list< Filter * > & filters()
virtual bool atEnd() const
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