|
ATLAS Offline Software
|
AthenaMT event loop manager for running HLT online.
More...
#include <HltEventLoopMgr.h>
|
ServiceHandle< IIncidentSvc > | m_incidentSvc {this, "IncidentSvc", "IncidentSvc"} |
|
ServiceHandle< Gaudi::Interfaces::IOptionsSvc > | m_jobOptionsSvc {this, "JobOptionsSvc", "JobOptionsSvc"} |
|
ServiceHandle< StoreGateSvc > | m_evtStore {this, "EventStore", "StoreGateSvc"} |
|
ServiceHandle< StoreGateSvc > | m_detectorStore {this, "DetectorStore", "DetectorStore"} |
|
ServiceHandle< StoreGateSvc > | m_inputMetaDataStore {this, "InputMetaDataStore", "StoreGateSvc/InputMetaDataStore"} |
|
ServiceHandle< IIoComponentMgr > | m_ioCompMgr {this, "IoComponentMgr", "IoComponentMgr"} |
|
ServiceHandle< IEvtSelector > | m_evtSelector {this, "EvtSel", "EvtSel"} |
|
ServiceHandle< IConversionSvc > | m_outputCnvSvc {this, "OutputCnvSvc", "OutputCnvSvc"} |
|
ServiceHandle< ISchedulerMonSvc > | m_schedulerMonSvc {this, "SchedulerMonSvc", "SchedulerMonSvc"} |
|
ToolHandle< TrigCOOLUpdateHelper > | m_coolHelper {this, "CoolUpdateTool", "TrigCOOLUpdateHelper"} |
|
ToolHandle< HLTResultMTMaker > | m_hltResultMaker {this, "ResultMaker", "HLTResultMTMaker"} |
|
ToolHandle< GenericMonitoringTool > | m_monTool {this, "MonTool", "", "Monitoring tool"} |
|
ToolHandle< ITrigErrorMonTool > | m_errorMonTool {this, "TrigErrorMonTool", "TrigErrorMonTool", "Error monitoring tool"} |
|
SmartIF< IHiveWhiteBoard > | m_whiteboard |
|
SmartIF< IAlgResourcePool > | m_algResourcePool |
|
SmartIF< IAlgExecStateSvc > | m_aess |
|
SmartIF< IScheduler > | m_schedulerSvc |
|
std::unique_ptr< TrigSORFromPtreeHelper > | m_sorHelper |
|
Gaudi::Property< std::string > | m_schedulerName |
|
Gaudi::Property< std::string > | m_whiteboardName |
|
Gaudi::Property< float > | m_hardTimeout |
|
Gaudi::Property< float > | m_softTimeoutFraction |
|
Gaudi::Property< unsigned int > | m_timeoutThreadIntervalMs |
|
Gaudi::Property< bool > | m_traceOnTimeout |
|
Gaudi::Property< int > | m_maxParallelIOTasks |
|
Gaudi::Property< int > | m_maxIOWakeUpIntervalMs |
|
Gaudi::Property< int > | m_maxFrameworkErrors |
|
Gaudi::Property< std::string > | m_fwkErrorDebugStreamName |
|
Gaudi::Property< std::string > | m_algErrorDebugStreamName |
|
Gaudi::Property< std::string > | m_timeoutDebugStreamName |
|
Gaudi::Property< std::string > | m_truncationDebugStreamName |
|
Gaudi::Property< std::string > | m_sorPath |
|
Gaudi::Property< std::vector< std::string > > | m_execAtStart |
|
Gaudi::Property< bool > | m_setMagFieldFromPtree |
|
Gaudi::Property< unsigned int > | m_forceRunNumber |
|
Gaudi::Property< unsigned int > | m_forceLumiblock |
|
Gaudi::Property< unsigned long long > | m_forceSOR_ns |
|
Gaudi::Property< bool > | m_rewriteLVL1 |
|
Gaudi::Property< bool > | m_monitorScheduler |
|
SG::WriteHandleKey< EventContext > | m_eventContextWHKey |
|
SG::ReadHandleKey< xAOD::EventInfo > | m_eventInfoRHKey |
|
SG::ReadHandleKey< xAOD::TrigCompositeContainer > | m_l1TriggerResultRHKey |
|
SG::ReadHandleKey< ROIB::RoIBResult > | m_roibResultRHKey |
|
SG::ReadHandleKey< HLT::HLTResultMT > | m_hltResultRHKey |
| StoreGate key for reading the HLT result. More...
|
|
EventContext | m_currentRunCtx {0,0} |
| "Event" context of current run with dummy event/slot number More...
|
|
std::atomic< size_t > | m_localEventNumber {0} |
| Event counter used for local bookkeeping; incremental per instance of HltEventLoopMgr, unrelated to global_id. More...
|
|
IEvtSelector::Context * | m_evtSelContext {nullptr} |
| Event selector context. More...
|
|
std::vector< std::chrono::steady_clock::time_point > | m_eventTimerStartPoint |
| Vector of event start-processing time stamps in each slot. More...
|
|
std::vector< std::chrono::steady_clock::time_point > | m_freeSlotStartPoint |
| Vector of time stamps telling when each scheduler slot was freed. More...
|
|
std::vector< bool > | m_isSlotProcessing |
| Vector of flags to tell if a slot is idle or processing. More...
|
|
std::atomic< size_t > | m_freeSlots {0} |
| Number of free slots used to synchronise input/output tasks. More...
|
|
std::unique_ptr< HLT::LoopThread > | m_inputThread |
| Input handling thread (triggers reading new events) More...
|
|
std::unique_ptr< HLT::LoopThread > | m_outputThread |
| Output handling thread (triggers post-processing of finished events) More...
|
|
std::unique_ptr< HLT::LoopThread > | m_timeoutThread |
| Timeout thread. More...
|
|
std::chrono::milliseconds | m_softTimeoutValue {0} |
| Soft timeout value set to HardTimeout*SoftTimeoutFraction at initialisation. More...
|
|
tbb::task_group | m_parallelIOTaskGroup |
| Task group to execute parallel I/O tasks asynchronously. More...
|
|
tbb::concurrent_bounded_queue< bool > | m_parallelIOQueue |
| Queue limiting the number of parallel I/O tasks. More...
|
|
tbb::concurrent_bounded_queue< EventContext * > | m_finishedEventsQueue |
| Queue of events ready for output processing. More...
|
|
EventLoopStatus | m_loopStatus {} |
| Object keeping track of the event loop status. More...
|
|
bool | m_timeoutTraceGenerated {false} |
| Flag set when a soft timeout produces a stack trace, to avoid producing multiple traces. More...
|
|
std::atomic< int > | m_nFrameworkErrors {0} |
| Counter of framework errors. More...
|
|
std::string | m_applicationName |
| Application name. More...
|
|
int | m_workerID {0} |
| Worker ID. More...
|
|
int | m_workerPID {0} |
| Worker PID. More...
|
|
AthenaMT event loop manager for running HLT online.
Definition at line 71 of file HltEventLoopMgr.h.
◆ HltEventLoopMgr() [1/3]
HltEventLoopMgr::HltEventLoopMgr |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svcLoc |
|
) |
| |
◆ ~HltEventLoopMgr()
HltEventLoopMgr::~HltEventLoopMgr |
( |
| ) |
|
|
overridevirtualnoexcept |
◆ HltEventLoopMgr() [2/3]
◆ HltEventLoopMgr() [3/3]
◆ ATLAS_NOT_THREAD_SAFE()
◆ clearTemporaryStores()
StatusCode HltEventLoopMgr::clearTemporaryStores |
( |
| ) |
|
|
private |
◆ clearWBSlot()
StatusCode HltEventLoopMgr::clearWBSlot |
( |
size_t |
evtSlot | ) |
const |
|
private |
Clear an event slot in the whiteboard.
Definition at line 1043 of file HltEventLoopMgr.cxx.
1049 if( !
sc.isSuccess() ) {
1052 ATH_MSG_VERBOSE(
"end of " << __FUNCTION__ <<
", returning m_whiteboard->freeStore(evtSlot=" << evtSlot <<
")");
◆ createEventContext()
EventContext HltEventLoopMgr::createEventContext |
( |
| ) |
|
|
overridevirtual |
create an Event Context object
Definition at line 578 of file HltEventLoopMgr.cxx.
581 if (slot == std::string::npos) {
583 return EventContext();
◆ eventTimerCallback()
void HltEventLoopMgr::eventTimerCallback |
( |
| ) |
|
|
private |
The method executed by the event timeout monitoring thread.
Definition at line 1004 of file HltEventLoopMgr.cxx.
1012 EventContext ctx(0,
i);
1020 ATH_MSG_INFO(
"Generating stack trace due to the soft timeout");
1022 gSystem->StackTrace();
◆ execAtStart()
StatusCode HltEventLoopMgr::execAtStart |
( |
const EventContext & |
ctx | ) |
const |
|
private |
Execute optional algs/sequences.
Definition at line 393 of file HltEventLoopMgr.cxx.
395 IAlgManager* algMgr = Gaudi::svcLocator()->as<IAlgManager>();
399 SmartIF<IAlgorithm>&
alg = algMgr->algorithm(
name,
false);
402 sc &=
alg->sysExecute(ctx);
◆ executeEvent()
StatusCode HltEventLoopMgr::executeEvent |
( |
EventContext && |
ctx | ) |
|
|
overridevirtual |
Implementation of IEventProcessor::executeEvent which processes a single event.
- Parameters
-
ctx | the EventContext of the event to process |
Definition at line 591 of file HltEventLoopMgr.cxx.
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;
◆ executeRun()
StatusCode HltEventLoopMgr::executeRun |
( |
int |
maxevt = -1 | ) |
|
|
overridevirtual |
Implementation of IEventProcessor::executeRun which calls IEventProcessor::nextEvent.
- Parameters
-
maxevt | number of events to process, -1 means all |
Definition at line 494 of file HltEventLoopMgr.cxx.
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;
◆ failedEvent()
Handle a failure to process an event.
- Returns
- FAILURE means the event loop was flagged to stop (no new events will be requested)
Definition at line 766 of file HltEventLoopMgr.cxx.
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);
891 buildResultCode &= hltResultWHK.initialize();
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;
◆ finalize()
StatusCode HltEventLoopMgr::finalize |
( |
| ) |
|
|
overridevirtual |
Definition at line 242 of file HltEventLoopMgr.cxx.
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;
◆ getSorAttrList()
const coral::AttributeList & HltEventLoopMgr::getSorAttrList |
( |
| ) |
const |
|
private |
Extract the single attr list off the SOR CondAttrListCollection.
Definition at line 720 of file HltEventLoopMgr.cxx.
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;
◆ hltUpdateAfterFork()
Definition at line 413 of file HltEventLoopMgr.cxx.
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;
◆ initialize()
StatusCode HltEventLoopMgr::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 83 of file HltEventLoopMgr.cxx.
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;
◆ inputThreadCallback()
void HltEventLoopMgr::inputThreadCallback |
( |
| ) |
|
|
private |
Definition at line 1057 of file HltEventLoopMgr.cxx.
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);
◆ nextEvent()
StatusCode HltEventLoopMgr::nextEvent |
( |
int |
maxevt = -1 | ) |
|
|
overridevirtual |
Implementation of IEventProcessor::nextEvent which implements the event loop.
- Parameters
-
maxevt | number of events to process, -1 means all |
Definition at line 524 of file HltEventLoopMgr.cxx.
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;
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ outputThreadCallback()
void HltEventLoopMgr::outputThreadCallback |
( |
| ) |
|
|
private |
The method executed by the output handling thread.
Definition at line 1123 of file HltEventLoopMgr.cxx.
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();
◆ prepareForStart()
Definition at line 280 of file HltEventLoopMgr.cxx.
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;
◆ printSORAttrList()
void HltEventLoopMgr::printSORAttrList |
( |
const coral::AttributeList & |
atr | ) |
const |
|
private |
Print the SOR record.
Definition at line 741 of file HltEventLoopMgr.cxx.
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"));
◆ processFinishedEvent()
StatusCode HltEventLoopMgr::processFinishedEvent |
( |
| ) |
|
|
private |
Perform all end-of-event actions for a single event popped out from the scheduler.
Definition at line 1450 of file HltEventLoopMgr.cxx.
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;
◆ resetEventTimer()
void HltEventLoopMgr::resetEventTimer |
( |
const EventContext & |
eventContext, |
|
|
bool |
processing |
|
) |
| |
|
private |
Reset the timeout flag and the timer, and mark the slot as busy or idle according to the second argument.
Definition at line 1031 of file HltEventLoopMgr.cxx.
1032 if (!eventContext.valid()) {
return;}
◆ resetTimeout()
void Athena::TimeoutMaster::resetTimeout |
( |
Timeout & |
instance | ) |
|
|
inlineprotectedinherited |
Reset timeout.
Definition at line 83 of file Timeout.h.
◆ setTimeout()
void Athena::TimeoutMaster::setTimeout |
( |
Timeout & |
instance | ) |
|
|
inlineprotectedinherited |
◆ startNextEvent()
StatusCode HltEventLoopMgr::startNextEvent |
( |
| ) |
|
|
private |
Definition at line 1230 of file HltEventLoopMgr.cxx.
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() );
◆ stop()
StatusCode HltEventLoopMgr::stop |
( |
| ) |
|
|
overridevirtual |
◆ stopRun()
StatusCode HltEventLoopMgr::stopRun |
( |
| ) |
|
|
overridevirtual |
Implementation of IEventProcessor::stopRun (obsolete for online runnning)
Definition at line 570 of file HltEventLoopMgr.cxx.
571 ATH_MSG_FATAL(
"Misconfiguration - the method HltEventLoopMgr::stopRun() cannot be used online");
572 return StatusCode::FAILURE;
◆ updateDFProps()
void HltEventLoopMgr::updateDFProps |
( |
| ) |
|
|
private |
Read DataFlow configuration properties.
Definition at line 618 of file HltEventLoopMgr.cxx.
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);
◆ updateMagField()
Set magnetic field currents from ptree.
Definition at line 668 of file HltEventLoopMgr.cxx.
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;
◆ updateMetadataStore()
void HltEventLoopMgr::updateMetadataStore |
( |
const coral::AttributeList & |
sor_attrlist | ) |
const |
|
private |
Definition at line 639 of file HltEventLoopMgr.cxx.
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>()
◆ m_aess
SmartIF<IAlgExecStateSvc> HltEventLoopMgr::m_aess |
|
private |
◆ m_algErrorDebugStreamName
Gaudi::Property<std::string> HltEventLoopMgr::m_algErrorDebugStreamName |
|
private |
Initial value:{
this, "AlgErrorDebugStreamName", "HltError",
"Debug stream name for events with HLT algorithm errors"}
Definition at line 271 of file HltEventLoopMgr.h.
◆ m_algResourcePool
SmartIF<IAlgResourcePool> HltEventLoopMgr::m_algResourcePool |
|
private |
◆ m_applicationName
std::string HltEventLoopMgr::m_applicationName |
|
private |
◆ m_coolHelper
◆ m_currentRunCtx
EventContext HltEventLoopMgr::m_currentRunCtx {0,0} |
|
private |
"Event" context of current run with dummy event/slot number
Definition at line 325 of file HltEventLoopMgr.h.
◆ m_detectorStore
◆ m_errorMonTool
◆ m_eventContextWHKey
Initial value:{
this, "EventContextWHKey", "EventContext", "StoreGate key for recording EventContext"}
Definition at line 308 of file HltEventLoopMgr.h.
◆ m_eventInfoRHKey
Initial value:{
this, "EventInfoRHKey", "EventInfo", "StoreGate key for reading xAOD::EventInfo"}
Definition at line 311 of file HltEventLoopMgr.h.
◆ m_eventTimerStartPoint
std::vector<std::chrono::steady_clock::time_point> HltEventLoopMgr::m_eventTimerStartPoint |
|
private |
Vector of event start-processing time stamps in each slot.
Definition at line 331 of file HltEventLoopMgr.h.
◆ m_evtSelContext
IEvtSelector::Context* HltEventLoopMgr::m_evtSelContext {nullptr} |
|
private |
◆ m_evtSelector
ServiceHandle<IEvtSelector> HltEventLoopMgr::m_evtSelector {this, "EvtSel", "EvtSel"} |
|
private |
◆ m_evtStore
◆ m_execAtStart
Gaudi::Property<std::vector<std::string> > HltEventLoopMgr::m_execAtStart |
|
private |
Initial value:{
this, "execAtStart", {}, "List of algorithms/sequences to execute during prepareForRun"}
Definition at line 286 of file HltEventLoopMgr.h.
◆ m_finishedEventsQueue
tbb::concurrent_bounded_queue<EventContext*> HltEventLoopMgr::m_finishedEventsQueue |
|
private |
◆ m_forceLumiblock
Gaudi::Property<unsigned int> HltEventLoopMgr::m_forceLumiblock |
|
private |
Initial value:{
this, "forceLumiblock", 0, "Override lumiblock number"}
Definition at line 295 of file HltEventLoopMgr.h.
◆ m_forceRunNumber
Gaudi::Property<unsigned int> HltEventLoopMgr::m_forceRunNumber |
|
private |
Initial value:{
this, "forceRunNumber", 0, "Override run number"}
Definition at line 292 of file HltEventLoopMgr.h.
◆ m_forceSOR_ns
Gaudi::Property<unsigned long long> HltEventLoopMgr::m_forceSOR_ns |
|
private |
Initial value:{
this, "forceStartOfRunTime", 0, "Override SOR time (epoch in nano-seconds)"}
Definition at line 298 of file HltEventLoopMgr.h.
◆ m_freeSlots
std::atomic<size_t> HltEventLoopMgr::m_freeSlots {0} |
|
private |
Number of free slots used to synchronise input/output tasks.
Definition at line 337 of file HltEventLoopMgr.h.
◆ m_freeSlotStartPoint
std::vector<std::chrono::steady_clock::time_point> HltEventLoopMgr::m_freeSlotStartPoint |
|
private |
Vector of time stamps telling when each scheduler slot was freed.
Definition at line 333 of file HltEventLoopMgr.h.
◆ m_fwkErrorDebugStreamName
Gaudi::Property<std::string> HltEventLoopMgr::m_fwkErrorDebugStreamName |
|
private |
Initial value:{
this, "FwkErrorDebugStreamName", "HLTMissingData",
"Debug stream name for events with HLT framework errors"}
Definition at line 267 of file HltEventLoopMgr.h.
◆ m_hardTimeout
Gaudi::Property<float> HltEventLoopMgr::m_hardTimeout |
|
private |
Initial value:{
this, "HardTimeout", 10*60*1000, "Hard event processing timeout in milliseconds"}
Definition at line 239 of file HltEventLoopMgr.h.
◆ m_hltResultMaker
◆ m_hltResultRHKey
◆ m_incidentSvc
ServiceHandle<IIncidentSvc> HltEventLoopMgr::m_incidentSvc {this, "IncidentSvc", "IncidentSvc"} |
|
private |
◆ m_inputMetaDataStore
◆ m_inputThread
Input handling thread (triggers reading new events)
Definition at line 339 of file HltEventLoopMgr.h.
◆ m_ioCompMgr
ServiceHandle<IIoComponentMgr> HltEventLoopMgr::m_ioCompMgr {this, "IoComponentMgr", "IoComponentMgr"} |
|
private |
◆ m_isSlotProcessing
std::vector<bool> HltEventLoopMgr::m_isSlotProcessing |
|
private |
Vector of flags to tell if a slot is idle or processing.
Definition at line 335 of file HltEventLoopMgr.h.
◆ m_jobOptionsSvc
ServiceHandle<Gaudi::Interfaces::IOptionsSvc> HltEventLoopMgr::m_jobOptionsSvc {this, "JobOptionsSvc", "JobOptionsSvc"} |
|
private |
◆ m_l1TriggerResultRHKey
Initial value:{
this, "L1TriggerResultRHKey", "", "StoreGate key for reading L1TriggerResult for RewriteLVL1"}
Definition at line 314 of file HltEventLoopMgr.h.
◆ m_localEventNumber
std::atomic<size_t> HltEventLoopMgr::m_localEventNumber {0} |
|
private |
◆ m_loopStatus
◆ m_maxFrameworkErrors
Gaudi::Property<int> HltEventLoopMgr::m_maxFrameworkErrors |
|
private |
Initial value:{
this, "MaxFrameworkErrors", 10,
"Tolerable number of recovered framework errors before exiting (<0 means all are tolerated)"}
Definition at line 263 of file HltEventLoopMgr.h.
◆ m_maxIOWakeUpIntervalMs
Gaudi::Property<int> HltEventLoopMgr::m_maxIOWakeUpIntervalMs |
|
private |
Initial value:{
this, "MaxIOWakeUpIntervalMs", -1,
"Maximum time input or output handling thread will sleep unless notified. Negative value (default) means no limit, "
"i.e. threads will only wake up on notifications. Zero means threads will never wait for notifications. "
"Positive value means the number of milliseconds after which a thread will wake up if it's not notified earlier."}
Definition at line 257 of file HltEventLoopMgr.h.
◆ m_maxParallelIOTasks
Gaudi::Property<int> HltEventLoopMgr::m_maxParallelIOTasks |
|
private |
Initial value:{
this, "MaxParallelIOTasks", -1,
"Maximum number of I/O tasks which can be executed in parallel. "
"If <=0 then the number of scheduler threads is used."}
Definition at line 252 of file HltEventLoopMgr.h.
◆ m_monitorScheduler
Gaudi::Property<bool> HltEventLoopMgr::m_monitorScheduler |
|
private |
Initial value:{
this, "MonitorScheduler", false, "Enable SchedulerMonSvc to collect scheduler status data in online histograms"}
Definition at line 305 of file HltEventLoopMgr.h.
◆ m_monTool
◆ m_nFrameworkErrors
std::atomic<int> HltEventLoopMgr::m_nFrameworkErrors {0} |
|
private |
◆ m_outputCnvSvc
ServiceHandle<IConversionSvc> HltEventLoopMgr::m_outputCnvSvc {this, "OutputCnvSvc", "OutputCnvSvc"} |
|
private |
◆ m_outputThread
Output handling thread (triggers post-processing of finished events)
Definition at line 341 of file HltEventLoopMgr.h.
◆ m_parallelIOQueue
tbb::concurrent_bounded_queue<bool> HltEventLoopMgr::m_parallelIOQueue |
|
private |
◆ m_parallelIOTaskGroup
tbb::task_group HltEventLoopMgr::m_parallelIOTaskGroup |
|
private |
Task group to execute parallel I/O tasks asynchronously.
Definition at line 347 of file HltEventLoopMgr.h.
◆ m_rewriteLVL1
Gaudi::Property<bool> HltEventLoopMgr::m_rewriteLVL1 |
|
private |
Initial value:{
this, "RewriteLVL1", false,
"Encode L1 results to ByteStream and write to the output. Possible only with athenaHLT, not online."}
Definition at line 301 of file HltEventLoopMgr.h.
◆ m_roibResultRHKey
Initial value:{
this, "RoIBResultRHKey", "", "StoreGate key for reading RoIBResult for RewriteLVL1 with legacy (Run-2) L1 simulation"}
Definition at line 317 of file HltEventLoopMgr.h.
◆ m_schedulerMonSvc
◆ m_schedulerName
Gaudi::Property<std::string> HltEventLoopMgr::m_schedulerName |
|
private |
Initial value:{
this, "SchedulerSvc", "AvalancheSchedulerSvc", "Name of the scheduler"}
Definition at line 233 of file HltEventLoopMgr.h.
◆ m_schedulerSvc
SmartIF<IScheduler> HltEventLoopMgr::m_schedulerSvc |
|
private |
◆ m_setMagFieldFromPtree
Gaudi::Property<bool> HltEventLoopMgr::m_setMagFieldFromPtree |
|
private |
Initial value:{
this, "setMagFieldFromPtree", true, "Read magnet currents from ptree"}
Definition at line 289 of file HltEventLoopMgr.h.
◆ m_softTimeoutFraction
Gaudi::Property<float> HltEventLoopMgr::m_softTimeoutFraction |
|
private |
Initial value:{
this, "SoftTimeoutFraction", 0.8, "Fraction of the hard timeout to be set as the soft timeout"}
Definition at line 242 of file HltEventLoopMgr.h.
◆ m_softTimeoutValue
std::chrono::milliseconds HltEventLoopMgr::m_softTimeoutValue {0} |
|
private |
Soft timeout value set to HardTimeout*SoftTimeoutFraction at initialisation.
Definition at line 345 of file HltEventLoopMgr.h.
◆ m_sorHelper
◆ m_sorPath
Gaudi::Property<std::string> HltEventLoopMgr::m_sorPath |
|
private |
Initial value:{
this, "SORPath", "/TDAQ/RunCtrl/SOR_Params", "Path to StartOfRun parameters in detector store"}
Definition at line 283 of file HltEventLoopMgr.h.
◆ m_timeoutDebugStreamName
Gaudi::Property<std::string> HltEventLoopMgr::m_timeoutDebugStreamName |
|
private |
Initial value:{
this, "TimeoutDebugStreamName", "HltTimeout",
"Debug stream name for events with HLT timeout"}
Definition at line 275 of file HltEventLoopMgr.h.
◆ m_timeoutThread
◆ m_timeoutThreadIntervalMs
Gaudi::Property<unsigned int> HltEventLoopMgr::m_timeoutThreadIntervalMs |
|
private |
Initial value:{
this, "TimeoutThreadIntervalMs", 1000, "How often the timeout thread checks for soft timeout, in milliseconds"}
Definition at line 245 of file HltEventLoopMgr.h.
◆ m_timeoutTraceGenerated
bool HltEventLoopMgr::m_timeoutTraceGenerated {false} |
|
private |
Flag set when a soft timeout produces a stack trace, to avoid producing multiple traces.
Definition at line 355 of file HltEventLoopMgr.h.
◆ m_traceOnTimeout
Gaudi::Property<bool> HltEventLoopMgr::m_traceOnTimeout |
|
private |
Initial value:{
this, "TraceOnTimeout", true,
"Print a stack trace on the first soft timeout (might take a while, holding all threads)"}
Definition at line 248 of file HltEventLoopMgr.h.
◆ m_truncationDebugStreamName
Gaudi::Property<std::string> HltEventLoopMgr::m_truncationDebugStreamName |
|
private |
Initial value:{
this, "TruncationDebugStreamName", "TruncatedHLTResult",
"Debug stream name for events with HLT result truncation"}
Definition at line 279 of file HltEventLoopMgr.h.
◆ m_whiteboard
SmartIF<IHiveWhiteBoard> HltEventLoopMgr::m_whiteboard |
|
private |
◆ m_whiteboardName
Gaudi::Property<std::string> HltEventLoopMgr::m_whiteboardName |
|
private |
Initial value:{
this, "WhiteboardSvc", "EventDataSvc", "Name of the Whiteboard"}
Definition at line 236 of file HltEventLoopMgr.h.
◆ m_workerID
int HltEventLoopMgr::m_workerID {0} |
|
private |
◆ m_workerPID
int HltEventLoopMgr::m_workerPID {0} |
|
private |
The documentation for this class was generated from the following files:
StatusCode clearWBSlot(size_t evtSlot) const
Clear an event slot in the whiteboard.
ServiceHandle< StoreGateSvc > m_inputMetaDataStore
Gaudi::Property< std::string > m_schedulerName
std::unique_ptr< TrigSORFromPtreeHelper > m_sorHelper
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoRHKey
Group
Properties of a chain group.
ServiceHandle< Gaudi::Interfaces::IOptionsSvc > m_jobOptionsSvc
path
python interpreter configuration --------------------------------------—
StatusCode failedEvent(HLT::OnlineErrorCode errorCode, const EventContext &eventContext)
Handle a failure to process an event.
SmartIF< IHiveWhiteBoard > m_whiteboard
SG::ReadHandleKey< xAOD::TrigCompositeContainer > m_l1TriggerResultRHKey
Gaudi::Property< bool > m_traceOnTimeout
Thrown if the CTP ROBFragment cannot be retrieved for a new event.
StatusCode exitCode
Event exit status code.
Gaudi::Property< float > m_hardTimeout
StatusCode updateMagField(const boost::property_tree::ptree &pt) const
Set magnetic field currents from ptree.
void eventTimerCallback()
The method executed by the event timeout monitoring thread.
void resetEventTimer(const EventContext &eventContext, bool processing)
Reset the timeout flag and the timer, and mark the slot as busy or idle according to the second argum...
Gaudi::Property< bool > m_setMagFieldFromPtree
bool coolUpdateOngoing
COOL update ongoing.
Gaudi::Property< float > m_softTimeoutFraction
std::unique_ptr< HLT::LoopThread > m_outputThread
Output handling thread (triggers post-processing of finished events)
std::unique_ptr< HLT::LoopThread > m_timeoutThread
Timeout thread.
std::string m_applicationName
Application name.
Group of local monitoring quantities and retain correlation when filling histograms
tbb::task_group m_parallelIOTaskGroup
Task group to execute parallel I/O tasks asynchronously.
SmartIF< IScheduler > m_schedulerSvc
void inputThreadCallback()
std::condition_variable coolUpdateCond
Condition variable to synchronize COOL updates.
virtual StatusCode nextEvent(int maxevt=-1) override
Implementation of IEventProcessor::nextEvent which implements the event loop.
std::vector< std::chrono::steady_clock::time_point > m_eventTimerStartPoint
Vector of event start-processing time stamps in each slot.
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool empty() const
Test if the key is blank.
virtual EventContext createEventContext() override
create an Event Context object
Gaudi::Property< bool > m_monitorScheduler
This class is a collection of AttributeLists where each one is associated with a channel number....
ToolHandle< ITrigErrorMonTool > m_errorMonTool
Gaudi::Property< std::string > m_sorPath
Gaudi::Property< std::vector< std::string > > m_execAtStart
Gaudi::Property< int > m_maxParallelIOTasks
ToolHandle< GenericMonitoringTool > m_monTool
ServiceHandle< StoreGateSvc > m_detectorStore
Gaudi::Property< unsigned int > m_forceLumiblock
std::atomic< bool > eventsAvailable
Event source has more events.
ServiceHandle< ISchedulerMonSvc > m_schedulerMonSvc
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Gaudi::Property< int > m_maxFrameworkErrors
std::chrono::milliseconds m_softTimeoutValue
Soft timeout value set to HardTimeout*SoftTimeoutFraction at initialisation.
Gaudi::Property< std::string > m_fwkErrorDebugStreamName
StatusCode addStreamTag(const eformat::helper::StreamTag &streamTag)
Append one stream tag to the stored list.
ServiceHandle< IIoComponentMgr > m_ioCompMgr
Thrown if the CTP ROBFragment for a new event has non-zero status word or other errors.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
msgSvc
Provide convenience handles for various services.
Gaudi::Property< unsigned int > m_forceRunNumber
::StatusCode StatusCode
StatusCode definition for legacy code.
histsvc
TrigInDetMonitoring part ################################.
constexpr bool isEventProcessingErrorCode(const OnlineErrorCode code)
tbb::concurrent_bounded_queue< bool > m_parallelIOQueue
Queue limiting the number of parallel I/O tasks.
Gaudi::Property< bool > m_rewriteLVL1
SG::ReadHandleKey< ROIB::RoIBResult > m_roibResultRHKey
ServiceHandle< StoreGateSvc > m_evtStore
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
AthROOTErrorHandlerSvc * svc
static Timeout & instance()
Get reference to Timeout singleton.
Gaudi::Property< int > m_maxIOWakeUpIntervalMs
Thrown if the event source cannot provide new events temporarily, e.g. when trigger is on hold.
virtual StatusCode executeEvent(EventContext &&ctx) override
Implementation of IEventProcessor::executeEvent which processes a single event.
Gaudi::Property< std::string > m_timeoutDebugStreamName
std::atomic< size_t > m_freeSlots
Number of free slots used to synchronise input/output tasks.
Gaudi::Property< unsigned long long > m_forceSOR_ns
std::mutex coolUpdateMutex
Mutex to synchronize COOL updates.
ToolHandle< HLTResultMTMaker > m_hltResultMaker
std::atomic< int > m_nFrameworkErrors
Counter of framework errors.
ServiceHandle< IEvtSelector > m_evtSelector
std::condition_variable loopEndedCond
Condition variable to notify the main thread of the end of the event loop.
EventContext m_currentRunCtx
"Event" context of current run with dummy event/slot number
StatusCode clearTemporaryStores()
Clear per-event stores.
std::string to_string(const DetectorType &type)
void outputThreadCallback()
The method executed by the output handling thread.
int m_workerPID
Worker PID.
void updateMetadataStore(const coral::AttributeList &sor_attrlist) const
static void setNumProcs(size_t numProcs)
Set number of concurrent processes.
void updateDFProps()
Read DataFlow configuration properties.
std::atomic< bool > loopEnded
No more events available and all ongoing processing has finished.
Gaudi::Property< std::string > m_whiteboardName
Gaudi::Property< std::string > m_algErrorDebugStreamName
ServiceHandle< IConversionSvc > m_outputCnvSvc
SmartIF< IAlgExecStateSvc > m_aess
#define ATH_MSG_WARNING(x)
SmartIF< IAlgResourcePool > m_algResourcePool
void printSORAttrList(const coral::AttributeList &atr) const
Print the SOR record.
void addErrorCode(const HLT::OnlineErrorCode &errorCode, const eformat::helper::Status &firstStatusWord={ eformat::GenericStatus::DATA_CORRUPTION, eformat::FullEventStatus::PSC_PROBLEM })
Append an error code.
EventID eventIDFromxAOD(const xAOD::EventInfo *xaod)
Create EventID object from xAOD::EventInfo.
Gaudi::Property< std::string > m_truncationDebugStreamName
std::vector< std::chrono::steady_clock::time_point > m_freeSlotStartPoint
Vector of time stamps telling when each scheduler slot was freed.
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
std::unique_ptr< HLT::LoopThread > m_inputThread
Input handling thread (triggers reading new events)
std::atomic< size_t > m_localEventNumber
Event counter used for local bookkeeping; incremental per instance of HltEventLoopMgr,...
Gaudi::Property< unsigned int > m_timeoutThreadIntervalMs
SG::ReadHandleKey< HLT::HLTResultMT > m_hltResultRHKey
StoreGate key for reading the HLT result.
ServiceHandle< IIncidentSvc > m_incidentSvc
std::atomic< EventIDBase::number_type > maxLB
Max lumiblock number seen in the loop.
IEvtSelector::Context * m_evtSelContext
Event selector context.
void resetTimeout(Timeout &instance)
Reset timeout.
Declare a monitored scalar variable.
tbb::concurrent_bounded_queue< EventContext * > m_finishedEventsQueue
Queue of events ready for output processing.
void setTimeout(Timeout &instance)
Set timeout.
bool m_timeoutTraceGenerated
Flag set when a soft timeout produces a stack trace, to avoid producing multiple traces.
EventLoopStatus m_loopStatus
Object keeping track of the event loop status.
std::mutex loopEndedMutex
Mutex to notify the main thread of the end of the event loop.
SG::WriteHandleKey< EventContext > m_eventContextWHKey
Thrown if all events are already read from the input and another one is requested.
ToolHandle< TrigCOOLUpdateHelper > m_coolHelper
const coral::AttributeList & getSorAttrList() const
Extract the single attr list off the SOR CondAttrListCollection.
std::vector< bool > m_isSlotProcessing
Vector of flags to tell if a slot is idle or processing.