25 return StatusCode::SUCCESS;
32 return (
i.time()!=j.
time());
45 ATH_MSG_ERROR(
"Could not get xAOD::EventInfo " <<
evt.name() <<
" from store " <<
evt.store());
46 return StatusCode::FAILURE;
49 ATH_MSG_INFO (
"Hard-scatter xAOD::EventInfo : " <<
" event: " <<
evt->eventNumber() <<
" run: " <<
evt->runNumber());
59 std::map<const IPileUpTool*, unsigned int> eventsToProcessByTool;
60 std::map<SubEventIterator, SubEventIterator> bunchCrossingRanges;
61 while (iEvt != endEvt)
69 ATH_MSG_VERBOSE(
"Found " << nEventsInXing <<
" consecutive subevents with a bunch crossing time of " << fEvt->time() <<
" ns." );
70 bunchCrossingRanges[lEvt]=fEvt;
75 ATH_MSG_VERBOSE(__FILE__<<
":"<<__LINE__<<
" --- Call toProcess on "<<puToolHandle->name());
76 if (puToolHandle->toProcess(fEvt->time()))
78 eventsToProcessByTool[&(*puToolHandle)] += nEventsInXing;
87 puToolHandle->resetFilter();
88 ATH_MSG_VERBOSE ( puToolHandle->name() <<
" will get " << eventsToProcessByTool[&(*puToolHandle)] <<
" subevents to process." );
89 ATH_CHECK(puToolHandle->prepareEvent(Gaudi::Hive::currentContext(), eventsToProcessByTool[&(*puToolHandle)]));
94 for(
auto& bunch : bunchCrossingRanges)
98 const int bunchXing(fEvt->time());
99 ATH_MSG_DEBUG(
"Processing bunch-crossing at " << bunchXing <<
" ns.");
103 ATH_MSG_VERBOSE(__FILE__<<
":"<<__LINE__<<
" --- call toProcess on "<<puToolHandle->name());
104 if(puToolHandle->toProcess(bunchXing))
106 ATH_CHECK(puToolHandle->processBunchXing(bunchXing, fEvt, lEvt));
110 ATH_MSG_VERBOSE(
"Skipping " << puToolHandle->name() <<
" for bunch crossing at " << bunchXing <<
" ns.");
120 ATH_MSG_VERBOSE(__FILE__<<
":"<<__LINE__<<
" --- Call to mergeEvent on "<<puToolHandle->name());
121 ATH_CHECK(puToolHandle->mergeEvent(Gaudi::Hive::currentContext()));
123 if (!puToolHandle->filterPassed())
125 ATH_MSG_VERBOSE(
"Filter " << puToolHandle->name() <<
" failed - will stop the event" );
126 this->setFilterPassed(
false);
130 return StatusCode::SUCCESS;
138 return StatusCode::SUCCESS;
145 while (iClearEvt != lEvt)
147 ATH_CHECK(iClearEvt->ptr()->evtStore()->clearStore());
149 ATH_MSG_VERBOSE(
"Cleared store " << iClearEvt->ptr()->evtStore()->name());
153 return StatusCode::SUCCESS;