352 std::string
selection(filterEntry->m_selector->m_expression);
354 boost::regex re_spaces(
"\\s+");
356 if (
selection.find(
"&&") != std::string::npos &&
357 selection.find(
"||") != std::string::npos )
367 hTriggerResults.
getByLabel(*
m_event,
"TriggerResults",
"", filterEntry->m_selector->m_triggerProcess.c_str());
372 fwLog(
fwlog::kWarning) <<
" failed to get trigger results with process name "<< filterEntry->m_selector->m_triggerProcess << std::endl;
381 bool junction_mode =
true;
382 if (
selection.find(
"||")!=std::string::npos)
383 junction_mode =
false;
385 boost::regex re(
"\\&\\&|\\|\\|");
388 boost::sregex_token_iterator
j;
391 std::vector<std::pair<unsigned int,bool> >
filters;
395 std::string filter = *
i++;
397 if (filter[0] ==
'!')
400 filter.erase(filter.begin());
402 unsigned int index = triggerNames->triggerIndex(filter);
403 if (index == triggerNames->size())
408 filters.push_back(std::make_pair(index, flag));
413 if (filterEntry->m_eventList)
414 filterEntry->m_eventList->Reset();
425 hTriggerResults.
getByLabel(*
m_event,
"TriggerResults",
"", filterEntry->m_selector->m_triggerProcess.c_str());
426 std::vector<std::pair<unsigned int,bool> >::const_iterator filter = filters.begin();
427 bool passed = hTriggerResults->
accept(filter->first) == filter->second;
428 while (++filter != filters.end())
431 passed &= hTriggerResults->
accept(filter->first) == filter->second;
433 passed |= hTriggerResults->
accept(filter->first) == filter->second;
441 filterEntry->m_needsUpdate =
false;
443 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