24 #include "GaudiKernel/ConcurrencyFlags.h"
25 #include "GaudiKernel/IAlgManager.h"
26 #include "GaudiKernel/IAlgorithm.h"
27 #include "GaudiKernel/IEvtSelector.h"
28 #include "GaudiKernel/IProperty.h"
29 #include "GaudiKernel/IIoComponent.h"
30 #include "GaudiKernel/ThreadLocalContext.h"
33 #include "eformat/StreamTag.h"
50 bool isTimedOut(
const std::unordered_map<std::string_view,StatusCode>& algErrors) {
51 for (
const auto& [
key,
sc] : algErrors) {
57 template <
typename T> std::string
toString(
const T&
x) {
58 std::ostringstream
ss;
63 using namespace boost::property_tree;
69 : base_class(
name, svcLoc) {}
86 m_autoRetrieveTools =
false;
87 m_checkToolDeps =
false;
126 const std::string& slots =
m_jobOptionsSvc->get(
"EventDataSvc.NSlots");
130 ATH_MSG_WARNING(
"Failed to retrieve the job property EventDataSvc.NSlots");
135 ATH_MSG_WARNING(
"Failed to retrieve the job property AvalancheSchedulerSvc.ThreadPoolSize");
137 const std::string& procs =
m_jobOptionsSvc->get(
"DataFlowConfig.DF_NumberOfWorkers");
138 if (!procs.empty()) {
143 catch (
const std::logic_error& ex) {
144 ATH_MSG_ERROR(
"Cannot convert " << procs <<
"to integer: " << ex.what());
145 return StatusCode::FAILURE;
149 ATH_MSG_WARNING(
"Failed to retrieve the job property DataFlowconfig.DF_NumberOfWorkers");
164 return StatusCode::FAILURE;
171 return StatusCode::FAILURE;
175 m_aess = serviceLocator()->service(
"AlgExecStateSvc");
178 return StatusCode::FAILURE;
223 return StatusCode::SUCCESS;
236 return StatusCode::SUCCESS;
249 auto releaseAndCheck = [&](
auto& handle, std::string_view handleType) {
250 if (handle.release().isFailure())
251 ATH_MSG_WARNING(
"finalize(): Failed to release " << handleType <<
" " << handle.typeAndName());
253 auto releaseService = [&](
auto&&...
args) { (releaseAndCheck(
args,
"service"), ...); };
254 auto releaseTool = [&](
auto&&...
args) { (releaseAndCheck(
args,
"tool"), ...); };
255 auto releaseSmartIF = [](
auto&&...
args) { (
args.reset(), ...); };
274 return StatusCode::SUCCESS;
283 const auto& rparams =
pt.get_child(
"RunParams");
286 catch(ptree_bad_path&
e) {
287 ATH_MSG_ERROR(
"Bad ptree path: \"" <<
e.path<ptree::path_type>().dump() <<
"\" - " <<
e.what());
288 return StatusCode::FAILURE;
323 return StatusCode::SUCCESS;
352 if ( !gROOT->GetListOfFiles()->IsEmpty() ) {
353 std::unordered_map<std::string, size_t>
dups;
354 for (
const auto f : *gROOT->GetListOfFiles()) {
355 ++
dups[
f->GetName()];
358 auto histsvc = serviceLocator()->service(
"THistSvc",
false).as<IIoComponent>();
363 msg() << MSG::ERROR <<
"The following ROOT files (with #instances) have not been closed yet: ";
364 for (
const auto& [
n,
c] :
dups)
msg() <<
n <<
"(x" <<
c <<
") ";
375 ATH_MSG_FATAL(
"Misconfiguration - Scheduler was initialised before forking!");
376 return StatusCode::FAILURE;
380 return StatusCode::SUCCESS;
382 catch(
const std::runtime_error&
e)
388 return StatusCode::FAILURE;
395 IAlgManager* algMgr = Gaudi::svcLocator()->as<IAlgManager>();
399 SmartIF<IAlgorithm>&
alg = algMgr->algorithm(
name,
false);
402 sc &=
alg->sysExecute(ctx);
424 return StatusCode::FAILURE;
429 SmartIF<IService>
svc = serviceLocator()->service(
"CoreDumpSvc",
false);
433 if (
sc.isFailure()) {
446 SmartIF<IIoComponent>
histsvc = serviceLocator()->service(
"THistSvc",
false).as<IIoComponent>();
449 std::ostringstream oss;
450 oss <<
"athenaHLT-" << std::setfill(
'0') << std::setw(2) <<
m_workerID;
451 worker_dir /= oss.str();
454 if ( std::filesystem::remove_all(worker_dir) == 0 ) {
455 ATH_MSG_FATAL(
"Cannot delete previous worker directory " << worker_dir);
456 return StatusCode::FAILURE;
459 if ( !std::filesystem::create_directories(worker_dir) ) {
460 ATH_MSG_FATAL(
"Cannot create worker directory " << worker_dir);
461 return StatusCode::FAILURE;
463 ATH_MSG_INFO(
"Writing worker output files to " << worker_dir);
468 const size_t numSlots =
m_whiteboard->getNumberOfStores();
488 return StatusCode::SUCCESS;
506 ATH_MSG_FATAL(
"Event loop failed, std::exception caught: " <<
e.what());
507 sc = StatusCode::FAILURE;
510 ATH_MSG_FATAL(
"Event loop failed, unknown exception caught");
511 sc = StatusCode::FAILURE;
543 ATH_MSG_DEBUG(
"Event loop started, the main thread is going to sleep until it finishes");
545 ATH_MSG_INFO(
"All events processed, finalising the event loop");
550 ATH_MSG_DEBUG(
"Waiting for all I/O tasks and threads to return");
556 ATH_MSG_DEBUG(
"All I/O threads and tasks finished. Stopping the timeout thread");
564 return StatusCode::SUCCESS;
571 ATH_MSG_FATAL(
"Misconfiguration - the method HltEventLoopMgr::stopRun() cannot be used online");
572 return StatusCode::FAILURE;
581 if (slot == std::string::npos) {
583 return EventContext();
604 ATH_MSG_DEBUG(
"Adding event " << ctx.evt() <<
", slot " << ctx.slot() <<
" to the scheduler");
608 if (addEventStatus.isFailure()){
610 return StatusCode::FAILURE;
614 return StatusCode::SUCCESS;
620 auto getDFProp = [&](
const std::string&
name, std::string&
value,
bool required =
true) {
626 <<
"Could not set Property " <<
name <<
" from DataFlow" <<
endmsg;
631 std::string wid, wpid;
632 getDFProp(
"DF_WorkerId", wid,
false );
633 getDFProp(
"DF_Pid", wpid,
false );
634 if (!wid.empty())
m_workerID = std::stoi(wid);
641 auto metadatacont = std::make_unique<ByteStreamMetadataContainer>();
642 metadatacont->push_back(std::make_unique<ByteStreamMetadata>(
643 sor_attrlist[
"RunNumber"].data<unsigned int>(),
646 sor_attrlist[
"RecordingEnabled"].data<bool>(),
648 sor_attrlist[
"DetectorMaskSnd"].data<unsigned long long>(),
649 sor_attrlist[
"DetectorMaskFst"].data<unsigned long long>(),
656 std::vector<std::string>()
672 auto tor_cur =
pt.get<
float>(
"Magnets.ToroidsCurrent.value");
673 auto sol_cur =
pt.get<
float>(
"Magnets.SolenoidCurrent.value");
676 IAlgManager* algMgr = Gaudi::svcLocator()->as<IAlgManager>();
678 SmartIF<IAlgorithm>& fieldAlg = algMgr->algorithm(
"AtlasFieldMapCondAlg",
false);
680 ATH_MSG_INFO(
"Setting field currents on AtlasFieldMapCondAlg");
681 ATH_CHECK( Gaudi::Utils::setProperty(fieldAlg,
"MapSoleCurrent", sol_cur) );
682 ATH_CHECK( Gaudi::Utils::setProperty(fieldAlg,
"MapToroCurrent", tor_cur) );
686 ATH_MSG_INFO(
"*****************************************");
687 ATH_MSG_INFO(
" Auto-configuration of magnetic field: ");
688 ATH_MSG_INFO(
" solenoid current from IS = " << sol_cur);
690 ATH_MSG_INFO(
"*****************************************");
692 catch(ptree_bad_path&
e) {
693 ATH_MSG_ERROR(
"Cannot read magnet currents from ptree: " <<
e.what() );
694 return StatusCode::FAILURE;
697 return StatusCode::SUCCESS;
716 return StatusCode::SUCCESS;
724 throw std::runtime_error(
"Cannot retrieve " +
m_sorPath);
732 throw std::runtime_error(
"SOR record should have one and one only attribute list, but it has " +
std::to_string(sor->size()));
735 const auto & soral = sor->begin()->second;
743 unsigned long long sorTime_ns(atr[
"SORTime"].data<unsigned long long>());
746 time_t sorTime_sec = sorTime_ns / std::nano::den;
750 ATH_MSG_INFO(
" RunNumber = " << atr[
"RunNumber"].data<unsigned int>());
752 " (" << std::put_time(localtime_r(&sorTime_sec, &buf),
"%F %T") <<
") ");
754 auto dmfst = atr[
"DetectorMaskFst"].data<
unsigned long long>();
755 auto dmsnd = atr[
"DetectorMaskSnd"].data<
unsigned long long>();
761 ATH_MSG_INFO(
" RunType = " << atr[
"RunType"].data<std::string>());
762 ATH_MSG_INFO(
" RecordingEnabled = " << (atr[
"RecordingEnabled"].data<bool>() ?
"true" :
"false"));
768 ATH_MSG_VERBOSE(
"start of " << __FUNCTION__ <<
" with errorCode = " << errorCode
769 <<
", context = " << eventContext <<
" eventID = " << eventContext.eventID());
772 Gaudi::Hive::setCurrentContext(eventContext);
774 auto returnFailureAndStopEventLoop = [
this]() ->
StatusCode {
785 return StatusCode::FAILURE;
792 ATH_MSG_ERROR(
"Failure occurred with OnlineErrorCode=" << errorCode
793 <<
" meaning there was a framework error before requesting a new event. No output will be produced for this event"
794 <<
" and the event loop will exit after all ongoing processing is finished.");
795 return returnFailureAndStopEventLoop();
798 ATH_MSG_ERROR(
"Failure occurred with OnlineErrorCode=" << errorCode
799 <<
" meaning a new event could not be correctly read. No output will be produced for this event."
800 <<
" The event loop will exit after all ongoing processing is finished.");
801 return returnFailureAndStopEventLoop();
804 ATH_MSG_ERROR(
"Failure occurred with OnlineErrorCode=" << errorCode
805 <<
" meaning there was a framework error after HLT result was already sent out."
806 <<
" The event loop will exit after all ongoing processing is finished.");
807 return returnFailureAndStopEventLoop();
810 ATH_MSG_ERROR(
"Failed to access the slot for the processed event, cannot produce output. OnlineErrorCode="
811 << errorCode <<
". The event loop will exit after all ongoing processing is finished unless the failed event"
812 <<
" reaches a hard timeout sooner and this process is killed.");
813 return returnFailureAndStopEventLoop();
819 ATH_MSG_ERROR(
"Failure occurred with OnlineErrorCode=" << errorCode
820 <<
". Cannot determine if the event processing started or not and whether a decision for this event will be"
821 <<
" produced. The event loop will exit after all ongoing processing is finished, which may include or"
822 <<
" not include the problematic event.");
823 return returnFailureAndStopEventLoop();
826 ATH_MSG_ERROR(
"Failure occurred with OnlineErrorCode=" << errorCode
827 <<
" meaning the Scheduler returned FAILURE when asked to give a finished event. Will keep trying to"
828 <<
" pop further events if there are any still in the scheduler, but this may keep repeating until"
829 <<
" this process is killed by hard timeout or other means. If all ongoing processing manages to finish"
830 <<
" then the event loop will exit.");
831 return returnFailureAndStopEventLoop();
833 if (!eventContext.valid()) {
834 ATH_MSG_ERROR(
"Failure occurred with an invalid EventContext. Likely there was a framework error before"
835 <<
" requesting a new event or after sending the result of a finished event. OnlineErrorCode=" << errorCode
836 <<
". The event loop will exit after all ongoing processing is finished.");
837 return returnFailureAndStopEventLoop();
843 if (
m_whiteboard->selectStore(eventContext.slot()).isFailure()) {
850 std::string debugStreamName;
865 eformat::helper::StreamTag debugStreamTag{debugStreamName, eformat::DEBUG_TAG,
true};
870 std::unique_ptr<HLT::HLTResultMT> hltResultPtr;
871 StatusCode buildResultCode{StatusCode::SUCCESS};
873 if (hltResultRH.isValid() && !hltResultRH->getSerialisedData().empty()) {
875 hltResultPtr = std::make_unique<HLT::HLTResultMT>(*hltResultRH);
877 buildResultCode &= hltResultPtr->
addStreamTag(debugStreamTag);
880 hltResultPtr = std::make_unique<HLT::HLTResultMT>();
882 buildResultCode &= hltResultPtr->
addStreamTag(debugStreamTag);
885 buildResultCode &=
m_hltResultMaker->fillResult(*hltResultPtr,eventContext);
893 if (buildResultCode.isFailure() || hltResultWH.record(std::move(hltResultPtr)).isFailure()) {
896 ATH_MSG_ERROR(
"Second failure to build or record the HLT Result in event store while handling a failed event. "
897 <<
"Cannot force-accept this event from HLT side, will rely on data collector to do this. "
898 <<
"The event loop will exit after all ongoing processing is finished.");
899 return returnFailureAndStopEventLoop();
901 ATH_MSG_ERROR(
"Failed to build or record the HLT Result in event store while handling a failed event. "
902 <<
"Trying again with skipped filling of the result contents (except debug stream tag).");
910 int64_t eventTimeMillisec = std::chrono::duration_cast<std::chrono::milliseconds>(eventTime).count();
919 ATH_MSG_ERROR(
"The output conversion service failed in connectOutput() while handling a failed event. "
920 <<
"Cannot force-accept this event from HLT side, will rely on data collector to do this. "
921 <<
"The event loop will exit after all ongoing processing is finished.");
922 return returnFailureAndStopEventLoop();
925 DataObject* hltResultDO =
m_evtStore->accessData(hltResultWH.clid(),hltResultWH.key());
926 if (hltResultDO ==
nullptr) {
929 ATH_MSG_ERROR(
"Second failure to build or record the HLT Result in event store while handling a failed event. "
930 <<
"Cannot force-accept this event from HLT side, will rely on data collector to do this. "
931 <<
"The event loop will exit after all ongoing processing is finished.");
932 return returnFailureAndStopEventLoop();
934 ATH_MSG_ERROR(
"Failed to retrieve DataObject for the HLT result object while handling a failed event. "
935 <<
"Trying again with skipped filling of the result contents (except debug stream tag).");
939 IOpaqueAddress* addr =
nullptr;
940 if (
m_outputCnvSvc->createRep(hltResultDO,addr).isFailure() || addr ==
nullptr) {
941 ATH_MSG_ERROR(
"Conversion of HLT result object to the output format failed while handling a failed event. "
942 <<
"Cannot force-accept this event from HLT side, will rely on data collector to do this. "
943 <<
"The event loop will exit after all ongoing processing is finished.");
945 return returnFailureAndStopEventLoop();
949 ATH_MSG_ERROR(
"The output conversion service failed in commitOutput() while handling a failed event. "
950 <<
"Cannot force-accept this event from HLT side, will rely on data collector to do this. "
951 <<
"The event loop will exit after all ongoing processing is finished.");
953 return returnFailureAndStopEventLoop();
968 const EventContext eventContextCopy = eventContext;
987 <<
" was successfully handled, but the number of tolerable framework errors for this HltEventLoopMgr instance,"
988 <<
" which is " <<
m_maxFrameworkErrors.value() <<
", was exceeded. Current local event number is "
989 << eventContextCopy.evt() <<
", slot " << eventContextCopy.slot()
990 <<
". The event loop will exit after all ongoing processing is finished.");
991 return returnFailureAndStopEventLoop();
996 ATH_MSG_ERROR(
"Failed event with OnlineErrorCode=" << errorCode
997 <<
" Current local event number is " << eventContextCopy.evt() <<
", slot " << eventContextCopy.slot());
1000 return StatusCode::SUCCESS;
1012 EventContext ctx(0,
i);
1020 ATH_MSG_INFO(
"Generating stack trace due to the soft timeout");
1022 gSystem->StackTrace();
1032 if (!eventContext.valid()) {
return;}
1049 if( !
sc.isSuccess() ) {
1052 ATH_MSG_VERBOSE(
"end of " << __FUNCTION__ <<
", returning m_whiteboard->freeStore(evtSlot=" << evtSlot <<
")");
1060 ATH_MSG_VERBOSE(
"Event loop ended, stopping the input thread and returning from " << __FUNCTION__);
1069 ATH_MSG_VERBOSE(
"No more events, flagging the event loop as finished, stopping the input thread"
1070 <<
" and returning from " << __FUNCTION__);
1077 if (numSlotsToFill==0) {
1084 ATH_MSG_DEBUG(
"Free slots = " << numSlotsToFill <<
". Reading new event(s) to fill the slot(s).");
1087 for (
size_t i=0;
i<numSlotsToFill; ++
i) {
1088 auto task = [
mgr=
this](){
1091 sc =
mgr->startNextEvent();
1094 mgr->error() <<
"Exception caught in startNextEvent: " <<
e.what() <<
endmsg;
1095 sc = StatusCode::FAILURE;
1098 mgr->error() <<
"Exception caught in startNextEvent" <<
endmsg;
1099 sc = StatusCode::FAILURE;
1101 if (
sc.isFailure()) {
1102 mgr->error() <<
"startNextEvent failed, stopping the event loop" <<
endmsg;
1103 mgr->m_loopStatus.exitCode = StatusCode::FAILURE;
1104 mgr->m_loopStatus.eventsAvailable =
false;
1109 bool popIOQueue{
false};
1110 mgr->m_parallelIOQueue.pop(popIOQueue);
1128 ATH_MSG_DEBUG(
"There are currently no events being processed by the Scheduler, returning from " << __FUNCTION__);
1130 ATH_MSG_DEBUG(
"No more events to process and scheduler is empty, stopping the event loop and output thread");
1148 std::vector<EventContext*> finishedEvtContexts;
1149 EventContext* finishedEvtContext(
nullptr);
1153 ATH_MSG_DEBUG(
"Waiting for a finished event from the Scheduler");
1154 if (
m_schedulerSvc->popFinishedEvent(finishedEvtContext).isFailure()) {
1156 delete finishedEvtContext;
1159 ATH_MSG_DEBUG(
"Scheduler returned a finished event: " << finishedEvtContext);
1160 finishedEvtContexts.push_back(finishedEvtContext);
1163 while (
m_schedulerSvc->tryPopFinishedEvent(finishedEvtContext).isSuccess()){
1164 ATH_MSG_DEBUG(
"Scheduler returned a finished event: " << *finishedEvtContext);
1165 finishedEvtContexts.push_back(finishedEvtContext);
1168 const auto popSpentTimeMs = std::chrono::duration_cast<std::chrono::milliseconds>(popSpentTime).count();
1176 const size_t nFinishedEvents = finishedEvtContexts.size();
1177 ATH_MSG_DEBUG(
"Number of finished events to post-process: " << nFinishedEvents);
1180 for (EventContext* thisFinishedEvtContext : finishedEvtContexts) {
1182 if (thisFinishedEvtContext !=
nullptr) {
1188 auto task = [
mgr=
this](){
1191 sc =
mgr->processFinishedEvent();
1194 mgr->error() <<
"Exception caught in processFinishedEvent: " <<
e.what() <<
endmsg;
1195 sc = StatusCode::FAILURE;
1198 mgr->error() <<
"Exception caught in processFinishedEvent" <<
endmsg;
1199 sc = StatusCode::FAILURE;
1202 if (
sc.isFailure()) {
1203 mgr->error() <<
"processFinishedEvent failed, stopping the event loop" <<
endmsg;
1204 mgr->m_loopStatus.exitCode = StatusCode::FAILURE;
1205 mgr->m_loopStatus.eventsAvailable =
false;
1210 bool popIOQueue{
false};
1211 mgr->m_parallelIOQueue.pop(popIOQueue);
1216 mgr->m_outputThread->cond().notify_one();
1234 if (
sc.isSuccess()) {
return false;}
1237 Gaudi::Hive::setCurrentContext(EventContext());
1246 std::unique_ptr<EventContext> eventContextPtr = std::make_unique<EventContext>(
createEventContext());
1254 if (
check(
"Failed to select event store slot number " +
std::to_string(eventContextPtr->slot()),
1269 sc = eventContext.record(std::move(eventContextPtr));
1270 if (
check(
"Failed to record new EventContext in the event store",
1276 m_aess->reset(*eventContext);
1278 ATH_MSG_DEBUG(
"Created new EventContext with number: " << eventContext->evt()
1279 <<
", slot: " << eventContext->slot());
1284 Gaudi::Hive::setCurrentContext(*eventContext);
1289 IOpaqueAddress* addr =
nullptr;
1291 if (
check(
"Event selector failed to create an IOpaqueAddress",
1300 bool noEventsTemporarily{
false};
1303 noEventsTemporarily =
false;
1306 ATH_MSG_DEBUG(
"No new input events available temporarily, requesting again");
1307 noEventsTemporarily =
true;
1309 }
while (noEventsTemporarily);
1312 sc = StatusCode::SUCCESS;
1315 if (
sc.isFailure()) {
1316 ATH_MSG_WARNING(
"Failed to clear the whiteboard slot " << eventContext->slot()
1317 <<
" after NoMoreEvents detected");
1324 return StatusCode::SUCCESS;
1327 sc = StatusCode::FAILURE;
1333 sc = StatusCode::FAILURE;
1339 ATH_MSG_ERROR(
"Failed to get next event from the event source, std::exception caught: " <<
e.what());
1340 sc = StatusCode::FAILURE;
1343 ATH_MSG_ERROR(
"Failed to get next event from the event source, unknown exception caught");
1344 sc = StatusCode::FAILURE;
1346 if (
check(
"Failed to get the next event",
1365 sc = eventInfo.isValid() ? StatusCode::SUCCESS : StatusCode::FAILURE;
1370 ATH_MSG_DEBUG(
"Retrieved event info for the new event " << *eventInfo);
1383 eid.set_time_stamp_ns_offset(
m_forceSOR_ns % std::nano::den);
1385 eventContext->setEventID(eid);
1388 Gaudi::Hive::setCurrentContext(*eventContext);
1396 bool updatedLB{
false};
1399 newMaxLB =
std::max(oldMaxLB, eventContext->eventID().lumi_block());
1400 updatedLB = newMaxLB > oldMaxLB;
1401 }
while (updatedLB && !
m_loopStatus.
maxLB.compare_exchange_strong(oldMaxLB, newMaxLB));
1433 if (
check(
"Failed to schedule event processing",
1444 Gaudi::Hive::setCurrentContext( EventContext() );
1452 EventContext* eventContext{
nullptr};
1457 if (
sc.isSuccess()) {
return false;}
1459 const EventContext& eventContextRef = (eventContext==
nullptr) ? EventContext() : *eventContext;
1461 Gaudi::Hive::setCurrentContext(EventContext());
1462 delete eventContext;
1470 if (eventContext ==
nullptr) {
1471 sc = StatusCode::FAILURE;
1472 if (
check(
"Detected nullptr EventContext while finalising a processed event",
1479 Gaudi::Hive::setCurrentContext(eventContext);
1482 if (
m_aess->eventStatus(*eventContext) != EventStatus::Success) {
1483 sc = StatusCode::FAILURE;
1487 if (
check(
"Processing event with context " +
toString(*eventContext) + \
1488 " failed with status " +
toString(
m_aess->eventStatus(*eventContext)),
1502 m_incidentSvc->fireIncident(Incident(
name(), IncidentType::EndProcessing, *eventContext));
1517 if (!hltResult.isValid()) {
sc = StatusCode::FAILURE;}
1520 DataObject* hltResultDO =
m_evtStore->accessData(hltResult.clid(),hltResult.key());
1521 if (hltResultDO ==
nullptr) {
sc = StatusCode::FAILURE;}
1525 if (!hltResult->getTruncatedModuleIds().empty() && hltResult->severeTruncation()) {
sc = StatusCode::FAILURE;}
1529 IOpaqueAddress* addr =
nullptr;
1531 if (
sc.isFailure()) {
delete addr;}
1535 IOpaqueAddress* l1addr =
nullptr;
1536 IOpaqueAddress* l1addrLegacy =
nullptr;
1541 if (!l1TriggerResult.isValid()) {
sc = StatusCode::FAILURE;}
1542 if (
check(
"Failed to retrieve the L1 Trigger Result for RewriteLVL1",
1547 DataObject* l1TriggerResultDO =
m_evtStore->accessData(l1TriggerResult.clid(),l1TriggerResult.key());
1548 if (l1TriggerResultDO ==
nullptr) {
sc = StatusCode::FAILURE;}
1549 if (
check(
"Failed to retrieve the L1 Trigger Result DataObject for RewriteLVL1",
1555 if (
sc.isFailure()) {
delete l1addr;}
1556 if (
check(
"Conversion service failed to convert L1 Trigger Result for RewriteLVL1",
1564 if (!roibResult.isValid()) {
sc = StatusCode::FAILURE;}
1565 if (
check(
"Failed to retrieve the RoIBResult for RewriteLVL1",
1570 DataObject* roibResultDO =
m_evtStore->accessData(roibResult.clid(),roibResult.key());
1571 if (roibResultDO ==
nullptr) {
sc = StatusCode::FAILURE;}
1572 if (
check(
"Failed to retrieve the RoIBResult DataObject for RewriteLVL1",
1578 if (
sc.isFailure()) {
delete l1addrLegacy;}
1579 if (
check(
"Conversion service failed to convert RoIBResult for RewriteLVL1",
1587 bool eventAccepted = !hltResult->getStreamTags().empty();
1589 int64_t eventTimeMillisec = std::chrono::duration_cast<std::chrono::milliseconds>(eventTime).count();
1593 if (
sc.isFailure()) {
delete addr;}
1599 delete l1addrLegacy;
1610 <<
" (event " << eventContext->evt() <<
") of the whiteboard");
1613 if (
check(
"Whiteboard slot " +
std::to_string(eventContext->slot()) +
" could not be properly cleared",
1618 ATH_MSG_DEBUG(
"Finished processing " << (eventAccepted ?
"accepted" :
"rejected")
1619 <<
" event with context " << *eventContext
1620 <<
" which took " << eventTimeMillisec <<
" ms");
1635 Gaudi::Hive::setCurrentContext( EventContext() );
1638 delete eventContext;
1640 return StatusCode::SUCCESS;