ATLAS Offline Software
Loading...
Searching...
No Matches
AthenaHiveEventLoopMgr Class Reference

The default ATLAS batch event loop manager. More...

#include <AthenaHiveEventLoopMgr.h>

Inheritance diagram for AthenaHiveEventLoopMgr:

Public Types

typedef IEvtSelector::Context EvtContext
typedef std::list< SmartIF< IAlgorithm > > ListAlg

Public Member Functions

StatusCode getEventRoot (IOpaqueAddress *&refpAddr)
 Create event address using event selector.
 AthenaHiveEventLoopMgr (const std::string &nam, ISvcLocator *svcLoc)
 Standard Constructor.
virtual ~AthenaHiveEventLoopMgr ()
 Standard Destructor.
virtual StatusCode initialize () override
 implementation of IAppMgrUI::initalize
virtual StatusCode finalize () override
 implementation of IAppMgrUI::finalize
virtual StatusCode nextEvent (int maxevt) override
 implementation of IAppMgrUI::nextEvent. maxevt==0 returns immediately
virtual StatusCode executeEvent (EventContext &&ctx) override
 implementation of IEventProcessor::executeEvent(void* par)
virtual StatusCode executeRun (int maxevt) override
 implementation of IEventProcessor::executeRun(int maxevt)
virtual StatusCode stopRun () override
 implementation of IEventProcessor::stopRun()
virtual StatusCode stop () override
 implementation of IService::stop
virtual StatusCode seek (int evt) override
 Seek to a given event.
virtual int curEvent () const override
 Return the current event count.
virtual int size () override
 Return the size of the collection.
virtual void handle (const Incident &inc) override
 IIncidentListenet interfaces.
virtual const std::string & name () const override
virtual void modifyEventContext (EventContext &ctx, const EventID &eID, bool consume_modifier_stream)
MsgStream & msg () const
 The standard message stream.
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream.
bool msgLvl (const MSG::Level lvl) const
 Test the output level.
void setLevel (MSG::Level lvl)
 Change the current logging level.

Protected Types

typedef ServiceHandle< IIncidentSvc > IIncidentSvc_t
typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t
typedef ServiceHandle< IDataManagerSvc > IDataManagerSvc_t
typedef ServiceHandle< IConversionSvc > IConversionSvc_t
typedef ServiceHandle< IEvtIdModifierSvc > IEvtIdModifierSvc_t
typedef EventID::number_type number_type
typedef IAthenaEvtLoopPreSelectTool tool_type
typedef ToolHandleArray< tool_type > tool_store
typedef tool_store::const_iterator tool_iterator
typedef std::vector< unsigned int > tool_stats
typedef tool_stats::const_iterator tool_stats_iterator

Protected Member Functions

void setupPreSelectTools (Gaudi::Details::PropertyBase &)
 property update handler:sets up the Pre-selection tools
virtual StatusCode writeHistograms (bool force=false)
 Dump out histograms as needed.
virtual StatusCode executeAlgorithms ()
 Run the algorithms for the current event.
StatusCode initializeAlgorithms ()
 Initialize all algorithms and output streams.
StatusCode clearWBSlot (int evtSlot)
 Clear a slot in the WB.
int declareEventRootAddress (EventContext &)
 Declare the root address of the event.
virtual EventContext createEventContext () override
 Create event context.
void setTimeout (Timeout &instance)
 Set timeout.
void resetTimeout (Timeout &instance)
 Reset timeout.
Event lifecycle for derived loop managers

Called on the driving thread, in the order declared below; executeEvent() is the reference composition:

  1. allocateEventContext() reserves and selects a whiteboard slot.
  2. The driver fills the slot and records the context in it (executeEvent() reads the next input event).
  3. submitEvent() hands the event to the scheduler.
  4. drainScheduler() collects finished events; finishEvent() calls the eventFinished() hook and releases the slot.
EventContext allocateEventContext (size_t eventNumber)
StatusCode submitEvent (EventContext &ctx)
 Submit a recorded context; the scheduler receives its own copy.
StatusCode finishEvent (const EventContext &ctx)
 Finish one scheduler-returned event on the driving thread.
virtual StatusCode eventFinished (const EventContext &ctx)
 Process an event's result and decide whether the driving loop may continue.
virtual bool clearStoreOnEndAlgorithms () const
 Batch jobs clear in the algorithm context; external drivers can retain the store until eventFinished() has consumed their result.
int drainScheduler (int &finishedEvents)
 Drain the scheduler from all actions that may be queued.

Protected Attributes

IIncidentSvc_t m_incidentSvc
 Reference to the incident service.
StoreGateSvc_t m_eventStore
 Reference to StoreGateSvc;.
IEvtSelector * m_evtSelector
 Reference to the Event Selector.
EvtContext * m_evtContext
 Gaudi event selector Context (may be used as a cursor by the evt selector).
StringProperty m_evtsel
IDataManagerSvc_t m_histoDataMgrSvc
 Reference to the Histogram Data Service.
IConversionSvc_t m_histoPersSvc
IEvtIdModifierSvc_t m_evtIdModSvc
StringProperty m_histPersName
number_type m_currentRun
 current run number
bool m_firstRun
IntegerProperty m_failureMode
UnsignedIntegerProperty m_eventPrintoutInterval
tool_stats m_toolInvoke
 tool called counter
tool_stats m_toolReject
 tool returns StatusCode::FAILURE counter
tool_stats m_toolAccept
 tool returns StatusCode::SUCCESS counter
tool_store m_tools
 internal tool store
bool m_requireInputAttributeList {}
 require input attribute list
bool m_useSecondaryEventNumber {}
 read event number from secondary input
SmartIF< IHiveWhiteBoard > m_whiteboard
 Reference to the Whiteboard interface.
SmartIF< IAlgResourcePool > m_algResourcePool
 Reference to the Algorithm resource pool.
SmartIF< IAlgExecStateSvc > m_aess
 Reference to the Algorithm Execution State Svc.
SmartIF< IProperty > m_appMgrProperty
 Property interface of ApplicationMgr.
SmartIF< IScheduler > m_schedulerSvc
 A shortcut for the scheduler.
SmartIF< IIncidentListener > m_abortEventListener
 Instance of the incident listener waiting for AbortEvent.
std::string m_schedulerName
 Name of the scheduler to be used.
std::string m_whiteboardName
 Name of the Whiteboard to be used.
bool m_scheduledStop
 Scheduled stop of event processing.
bool m_terminateLoop { false }
unsigned int m_nev
 events processed
unsigned int m_proc
bool m_useTools
bool m_doEvtHeartbeat
EventContext m_lastEventContext

Private Member Functions

 AthenaHiveEventLoopMgr ()=delete
 AthenaHiveEventLoopMgr (const AthenaHiveEventLoopMgr &)=delete
AthenaHiveEventLoopMgr & operator= (const AthenaHiveEventLoopMgr &)=delete
void initMessaging () const
 Initialize our message level and MessageSvc.

Private Attributes

unsigned int m_nevt
unsigned int m_timeStamp { 0 }
UnsignedIntegerProperty m_writeInterval
bool m_writeHists
bool m_firstEventAlone
unsigned int m_flmbi
unsigned int m_timeStampInt
ServiceHandle< Athena::IConditionsCleanerSvc > m_conditionsCleaner
std::string m_nm
 Message source name.
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels).
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer.
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level.
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging).

Detailed Description

The default ATLAS batch event loop manager.

It loops over input events according to job configuration. Among the main user-settable properties "FailureMode" controls behaviour of event loop depending on return code of Algorithms.

  • 0: all non-SUCCESSes terminate job.
  • 1: (DEFAULT) RECOVERABLE skips to next event, FAILURE terminates job.
  • 2: RECOVERABLE and FAILURE skip to next events

Definition at line 68 of file AthenaHiveEventLoopMgr.h.

Member Typedef Documentation

◆ EvtContext

typedef IEvtSelector::Context AthenaHiveEventLoopMgr::EvtContext

Definition at line 74 of file AthenaHiveEventLoopMgr.h.

◆ IConversionSvc_t

typedef ServiceHandle<IConversionSvc> AthenaHiveEventLoopMgr::IConversionSvc_t
protected

Definition at line 96 of file AthenaHiveEventLoopMgr.h.

◆ IDataManagerSvc_t

typedef ServiceHandle<IDataManagerSvc> AthenaHiveEventLoopMgr::IDataManagerSvc_t
protected

Definition at line 92 of file AthenaHiveEventLoopMgr.h.

◆ IEvtIdModifierSvc_t

◆ IIncidentSvc_t

typedef ServiceHandle<IIncidentSvc> AthenaHiveEventLoopMgr::IIncidentSvc_t
protected

Definition at line 77 of file AthenaHiveEventLoopMgr.h.

◆ ListAlg

typedef std::list<SmartIF<IAlgorithm> > AthenaHiveEventLoopMgr::ListAlg

Definition at line 291 of file AthenaHiveEventLoopMgr.h.

◆ number_type

◆ StoreGateSvc_t

◆ tool_iterator

typedef tool_store::const_iterator AthenaHiveEventLoopMgr::tool_iterator
protected

Definition at line 121 of file AthenaHiveEventLoopMgr.h.

◆ tool_stats

typedef std::vector<unsigned int> AthenaHiveEventLoopMgr::tool_stats
protected

Definition at line 122 of file AthenaHiveEventLoopMgr.h.

◆ tool_stats_iterator

typedef tool_stats::const_iterator AthenaHiveEventLoopMgr::tool_stats_iterator
protected

Definition at line 123 of file AthenaHiveEventLoopMgr.h.

◆ tool_store

typedef ToolHandleArray< tool_type > AthenaHiveEventLoopMgr::tool_store
protected

Definition at line 120 of file AthenaHiveEventLoopMgr.h.

◆ tool_type

Constructor & Destructor Documentation

◆ AthenaHiveEventLoopMgr() [1/3]

AthenaHiveEventLoopMgr::AthenaHiveEventLoopMgr ( const std::string & nam,
ISvcLocator * svcLoc )

Standard Constructor.

Definition at line 64 of file AthenaHiveEventLoopMgr.cxx.

66 : base_class(nam, svcLoc),
67 AthMessaging (nam),
68 m_incidentSvc ( "IncidentSvc", nam ),
69 m_eventStore( "StoreGateSvc", nam ),
71 m_histoDataMgrSvc( "HistogramDataSvc", nam ),
72 m_histoPersSvc ( "HistogramPersistencySvc", nam ),
73 m_evtIdModSvc ( "", nam ),
74 m_currentRun(0), m_firstRun(true), m_tools(this), m_nevt(0), m_writeHists(false),
75 m_nev(0), m_proc(0), m_useTools(false),m_doEvtHeartbeat(false),
76 m_conditionsCleaner( "Athena::ConditionsCleanerSvc", nam )
77{
78 declareProperty("EvtSel", m_evtsel,
79 "Name of Event Selector to use. If empty string (default) "
80 "take value from ApplicationMgr");
81 declareProperty("HistogramPersistency", m_histPersName="",
82 "Histogram persistency technology to use: ROOT, HBOOK, NONE. "
83 "By default (empty string) get property value from "
84 "ApplicationMgr");
85 declareProperty("HistWriteInterval", m_writeInterval=0 ,
86 "histogram write/update interval");
87 declareProperty("FailureMode", m_failureMode=1 ,
88 "Controls behaviour of event loop depending on return code of"
89 " Algorithms. 0: all non-SUCCESSes terminate job. "
90 "1: RECOVERABLE skips to next event, FAILURE terminates job "
91 "(DEFAULT). 2: RECOVERABLE and FAILURE skip to next events");
92 declareProperty("EventPrintoutInterval", m_eventPrintoutInterval=1,
93 "Print event heartbeat printouts every m_eventPrintoutInterval events");
94 declareProperty("PreSelectTools",m_tools,"AlgTools for event pre-selection")->
95 declareUpdateHandler( &AthenaHiveEventLoopMgr::setupPreSelectTools, this ); ;
96
97 declareProperty("SchedulerSvc", m_schedulerName="ForwardSchedulerSvc",
98 "Name of the scheduler to be used");
99
100 declareProperty("WhiteboardSvc", m_whiteboardName="EventDataSvc",
101 "Name of the Whiteboard to be used");
102
103 declareProperty("EventStore", m_eventStore);
104 declareProperty("ConditionsCleanerSvc", m_conditionsCleaner);
105
106 declareProperty("EvtIdModifierSvc", m_evtIdModSvc,
107 "ServiceHandle for EvtIdModifierSvc");
108
109 declareProperty("FakeLumiBlockInterval", m_flmbi = 0,
110 "Event interval at which to increment lumiBlock# when "
111 "creating events without an EventSelector. Zero means "
112 "don't increment it");
113 declareProperty("FakeTimestampInterval", m_timeStampInt = 1,
114 "timestamp interval between events when creating Events "
115 "without an EventSelector");
116 declareProperty("RequireInputAttributeList", m_requireInputAttributeList = false,
117 "Require valid input attribute list to be present");
118 declareProperty("UseSecondaryEventNumber", m_useSecondaryEventNumber = false,
119 "In case of DoubleEventSelector use event number from secondary input");
120
121 declareProperty("FirstEventAlone", m_firstEventAlone = true,
122 "process all of first event before scheduling any more");
123
124 m_scheduledStop = false;
125
126}
AthMessaging()
Default constructor:
UnsignedIntegerProperty m_eventPrintoutInterval
IEvtSelector * m_evtSelector
Reference to the Event Selector.
number_type m_currentRun
current run number
std::string m_schedulerName
Name of the scheduler to be used.
UnsignedIntegerProperty m_writeInterval
std::string m_whiteboardName
Name of the Whiteboard to be used.
unsigned int m_nev
events processed
IIncidentSvc_t m_incidentSvc
Reference to the incident service.
bool m_useSecondaryEventNumber
read event number from secondary input
bool m_requireInputAttributeList
require input attribute list
StoreGateSvc_t m_eventStore
Reference to StoreGateSvc;.
EvtContext * m_evtContext
Gaudi event selector Context (may be used as a cursor by the evt selector).
IDataManagerSvc_t m_histoDataMgrSvc
Reference to the Histogram Data Service.
bool m_scheduledStop
Scheduled stop of event processing.
ServiceHandle< Athena::IConditionsCleanerSvc > m_conditionsCleaner
tool_store m_tools
internal tool store
void setupPreSelectTools(Gaudi::Details::PropertyBase &)
property update handler:sets up the Pre-selection tools
IEvtIdModifierSvc_t m_evtIdModSvc

◆ ~AthenaHiveEventLoopMgr()

AthenaHiveEventLoopMgr::~AthenaHiveEventLoopMgr ( )
virtual

Standard Destructor.

Definition at line 131 of file AthenaHiveEventLoopMgr.cxx.

132{
133}

◆ AthenaHiveEventLoopMgr() [2/3]

AthenaHiveEventLoopMgr::AthenaHiveEventLoopMgr ( )
privatedelete

◆ AthenaHiveEventLoopMgr() [3/3]

AthenaHiveEventLoopMgr::AthenaHiveEventLoopMgr ( const AthenaHiveEventLoopMgr & )
privatedelete

Member Function Documentation

◆ allocateEventContext()

EventContext AthenaHiveEventLoopMgr::allocateEventContext ( size_t eventNumber)
protected

Allocate/select a slot, with an index supplied by the driving loop.

Definition at line 1149 of file AthenaHiveEventLoopMgr.cxx.

1149 {
1150 const size_t slot = m_whiteboard->allocateStore(eventNumber);
1151 if (slot == std::string::npos) {
1152 ATH_MSG_ERROR("No free whiteboard slot");
1153 return EventContext{};
1154 }
1155 if (m_whiteboard->selectStore(slot).isFailure()) {
1156 ATH_MSG_ERROR("Could not select whiteboard slot {}", slot);
1157 m_whiteboard->freeStore(slot).ignore();
1158 return EventContext{};
1159 }
1160 EventContext ctx{eventNumber, slot};
1162 ctx, Atlas::ExtendedEventContext(m_eventStore->hiveProxyDict()));
1163 return ctx;
1164}
#define ATH_MSG_ERROR(x,...)
SmartIF< IHiveWhiteBoard > m_whiteboard
Reference to the Whiteboard interface.
void setExtendedEventContext(EventContext &ctx, ExtendedEventContext &&ectx)
Move an extended context into a context object.

◆ clearStoreOnEndAlgorithms()

virtual bool AthenaHiveEventLoopMgr::clearStoreOnEndAlgorithms ( ) const
inlineprotectedvirtual

Batch jobs clear in the algorithm context; external drivers can retain the store until eventFinished() has consumed their result.

Definition at line 198 of file AthenaHiveEventLoopMgr.h.

198{ return true; }

◆ clearWBSlot()

StatusCode AthenaHiveEventLoopMgr::clearWBSlot ( int evtSlot)
protected

Clear a slot in the WB.

Definition at line 1298 of file AthenaHiveEventLoopMgr.cxx.

1298 {
1299 return m_whiteboard->freeStore(evtSlot);
1300}

◆ createEventContext()

EventContext AthenaHiveEventLoopMgr::createEventContext ( )
overrideprotectedvirtual

Create event context.

Definition at line 1145 of file AthenaHiveEventLoopMgr.cxx.

1145 {
1147}
EventContext allocateEventContext(size_t eventNumber)

◆ curEvent()

int AthenaHiveEventLoopMgr::curEvent ( ) const
overridevirtual

Return the current event count.

Definition at line 796 of file AthenaHiveEventLoopMgr.cxx.

797{
798 return m_nevt;
799}

◆ declareEventRootAddress()

int AthenaHiveEventLoopMgr::declareEventRootAddress ( EventContext & ctx)
protected

Declare the root address of the event.

FIXME ???

Definition at line 924 of file AthenaHiveEventLoopMgr.cxx.

924 {
925
926 // return codes:
927 // -1 : error
928 // 0 : no more events in selection
929 // 1 : ok
930
931 StatusCode sc(StatusCode::SUCCESS);
932
933 //-----------------------------------------------------------------------
934 // we need an EventInfo Object to fire the incidents.
935 //-----------------------------------------------------------------------
936 std::unique_ptr<const EventInfo> pEvent{};
937 if ( m_evtContext ) {
938 // Deal with the case when an EventSelector is provided
939 //
940 // FIXME: flow control if no more events in selector, etc.
941 //
942
943 IOpaqueAddress* addr{};
944
945 sc = m_evtSelector->next(*m_evtContext);
946
947 if ( !sc.isSuccess() ) {
948 // This is the end of the loop. No more events in the selection
949 ATH_MSG_INFO ( "No more events in event selection " );
950 return 0;
951 }
952
953 if (m_evtSelector->createAddress(*m_evtContext, addr).isFailure()) {
954 ATH_MSG_ERROR ( "Could not create an IOpaqueAddress" );
955 return -1;
956 }
957
958
959 // Most iterators provide the IOA of an event header (EventInfo, DataHeader)
960 if (0 != addr) {
961 //create its proxy
962 sc = m_eventStore->recordAddress(addr);
963 if( !sc.isSuccess() ) {
965 ATH_MSG_WARNING ( "Error declaring Event object" );
966 return 0;
967 }
968 } if ((sc=m_eventStore->loadEventProxies()).isFailure()) {
969 ATH_MSG_ERROR ( "Error loading Event proxies" );
970 return -1;
971 }
972
973 bool consume_modifier_stream = false;
974 // First try to build a legacy EventInfo object from the TAG information
975 // Read the attribute list
976 const AthenaAttributeList* pAttrList = m_eventStore->tryConstRetrieve<AthenaAttributeList>("Input");
977 if ( pAttrList != nullptr && pAttrList->size() > 6 ) { // Try making EventID-only EventInfo object from in-file TAG
978 try {
979 unsigned int runNumber = (*pAttrList)["RunNumber"].data<unsigned int>();
980 unsigned long long eventNumber = (*pAttrList)["EventNumber"].data<unsigned long long>();
981 unsigned int eventTime = (*pAttrList)["EventTime"].data<unsigned int>();
982 unsigned int eventTimeNS = (*pAttrList)["EventTimeNanoSec"].data<unsigned int>();
983 unsigned int lumiBlock = (*pAttrList)["LumiBlockN"].data<unsigned int>();
984 unsigned int bunchId = (*pAttrList)["BunchId"].data<unsigned int>();
985
986 ATH_MSG_DEBUG ( "use TAG with runNumber={}", runNumber );
987 consume_modifier_stream = true;
988 // an option to override primary eventNumber with the secondary one in case of DoubleEventSelector
990 unsigned long long eventNumberSecondary{};
991 if ( !(pAttrList->exists("hasSecondaryInput") && (*pAttrList)["hasSecondaryInput"].data<bool>()) ) {
992 ATH_MSG_FATAL ( "Secondary EventNumber requested, but secondary input does not exist!" );
993 return -1;
994 }
995 if ( pAttrList->exists("EventNumber_secondary") ) {
996 eventNumberSecondary = (*pAttrList)["EventNumber_secondary"].data<unsigned long long>();
997 }
998 else {
999 // try legacy EventInfo if secondary input did not have attribute list
1000 // primary input should not have this EventInfo type
1001 const EventInfo* pEventSecondary = m_eventStore->tryConstRetrieve<EventInfo>();
1002 if (pEventSecondary) {
1003 eventNumberSecondary = pEventSecondary->event_ID()->event_number();
1004 }
1005 else {
1006 ATH_MSG_FATAL ( "Secondary EventNumber requested, but it does not exist!" );
1007 return -1;
1008 }
1009 }
1010 if (eventNumberSecondary != 0) {
1011 m_doEvtHeartbeat = (m_eventPrintoutInterval.value() > 0 &&
1012 0 == (m_nev % m_eventPrintoutInterval.value()));
1013 if (m_doEvtHeartbeat) {
1014 ATH_MSG_INFO ( " ===>>> using secondary event #{} instead of #{} <<<===",
1015 eventNumberSecondary, eventNumber);
1016 }
1017 eventNumber = eventNumberSecondary;
1018 }
1019 }
1020
1021 pEvent = std::make_unique<EventInfo>(
1022 std::make_unique<EventID>(runNumber, eventNumber, eventTime,
1023 eventTimeNS, lumiBlock, bunchId),
1024 nullptr);
1025 } catch (...) {
1026 }
1027 } else if (m_requireInputAttributeList) {
1028 ATH_MSG_FATAL ( "Valid input attribute list required but not present!" );
1029 return -1;
1030 }
1031 // In the case that there is no TAG information
1032 const EventInfo* pEventObserver{pEvent.get()};
1033 if (!pEventObserver) {
1034 // Secondly try to retrieve a legacy EventInfo object from the input file
1035 // Again, m_nevt is incremented after executeEvent in the Hive manager so we don't need a -1
1037 pEventObserver = m_eventStore->tryConstRetrieve<EventInfo>();
1038 if (pEventObserver) {
1039 consume_modifier_stream = false; // stream will already have been consumed during EventInfo TP conversion
1040 ATH_MSG_DEBUG ( "use EventInfo" );
1041 } else {
1042 // Finally try to retrieve an xAOD::EventInfo object from the
1043 // input file and build a legacy EventInfo object from that.
1044 const xAOD::EventInfo* pXEvent{nullptr};
1045 sc = m_eventStore->retrieve(pXEvent);
1046 if( !sc.isSuccess() ) {
1047 ATH_MSG_ERROR ( "Unable to retrieve Event root object" );
1048 return -1;
1049 }
1050 consume_modifier_stream = true;
1051 ATH_MSG_DEBUG ( "use xAOD::EventInfo with runNumber={}", pXEvent->runNumber() );
1052 // Build the old-style Event Info object for those clients that still need it
1053 pEvent = std::make_unique<EventInfo>(
1054 std::make_unique<EventID>(eventIDFromxAOD(pXEvent)),
1055 std::make_unique<EventType>(eventTypeFromxAOD(pXEvent)));
1056 pEventObserver = pEvent.get();
1057 sc = m_eventStore->record(std::move(pEvent), "");
1058 if( !sc.isSuccess() ) {
1059 ATH_MSG_ERROR ( "Error declaring event data object" );
1060 return -1;
1061 }
1062 }
1063 }
1064
1065 modifyEventContext(ctx, *(pEventObserver->event_ID()),
1066 consume_modifier_stream);
1067
1068 }
1069 else {
1070 // No EventSelector is provided, so with no iterator it's up to us
1071 // to create an EventInfo
1072 // first event # == 1
1073 unsigned int runNmb{1}, evtNmb{m_nevt + 1};
1074
1075 // increment the run/lumiBlock number if desired
1076 if (m_flmbi != 0) {
1077 runNmb = m_nevt / m_flmbi + 1;
1078 evtNmb = m_nevt % m_flmbi + 1;
1079 }
1080 auto eid = std::make_unique<EventID> (runNmb,evtNmb, m_timeStamp);
1081 // Change lumiBlock# to match runNumber
1082 eid->set_lumi_block( runNmb );
1083
1085
1086 pEvent = std::make_unique<EventInfo>(std::move(eid),
1087 std::make_unique<EventType>());
1088
1089 bool consume_modifier_stream = true;
1090 // EventInfo TP Conversion not called in this case, so we would
1091 // want to consume the next IoV from the list in the
1092 // EvtIdModifierSvc.
1093 modifyEventContext(ctx,*(pEvent->event_ID()), consume_modifier_stream);
1094
1095 ATH_MSG_DEBUG ( "selecting store: {}", ctx.slot() );
1096
1097 m_whiteboard->selectStore( ctx.slot() ).ignore();
1098
1099 // EventInfo not working with format
1100 ATH_MSG_DEBUG ( "recording EventInfo " << *pEvent->event_ID() << " in "
1101 << m_eventStore->name() );
1102
1103 sc = m_eventStore->record(std::move(pEvent), "McEventInfo");
1104 if( !sc.isSuccess() ) {
1105 ATH_MSG_ERROR ( "Error declaring event data object" );
1106 return -1;
1107 }
1108 }
1109
1110 return 1;
1111}
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_INFO(x,...)
#define ATH_MSG_FATAL(x,...)
EventID eventIDFromxAOD(const xAOD::EventInfo *xaod)
Create EventID object from xAOD::EventInfo.
EventType eventTypeFromxAOD(const xAOD::EventInfo *xaod)
Create EventType object from xAOD::EventInfo.
EventInfo
static Double_t sc
virtual void modifyEventContext(EventContext &ctx, const EventID &eID, bool consume_modifier_stream)
EventID * event_ID()
the unique identification of the event.
uint32_t runNumber() const
The current event's run number.
::StatusCode StatusCode
StatusCode definition for legacy code.
event_number_t eventIndex
EventInfo_v1 EventInfo
Definition of the latest event info version.
setTeId lumiBlock

◆ drainScheduler()

int AthenaHiveEventLoopMgr::drainScheduler ( int & finishedEvents)
protected

Drain the scheduler from all actions that may be queued.

Definition at line 1245 of file AthenaHiveEventLoopMgr.cxx.

1245 {
1246
1247 StatusCode sc(StatusCode::SUCCESS);
1248
1249 // maybe we can do better
1250 std::vector<std::unique_ptr<EventContext>> finishedEvtContexts;
1251
1252 EventContext* finishedEvtContext(nullptr);
1253
1254 // Here we wait not to loose cpu resources
1255 ATH_MSG_DEBUG ( "drainScheduler: [{}] Waiting for a context", finishedEvts);
1256 sc = m_schedulerSvc->popFinishedEvent(finishedEvtContext);
1257
1258 // We got past it: cache the pointer
1259 if (sc.isSuccess()){
1260 // EventContext not working with std::format
1261 ATH_MSG_DEBUG ( "drainScheduler: scheduler not empty: Context "
1262 << finishedEvtContext );
1263 finishedEvtContexts.emplace_back(finishedEvtContext);
1264 } else{
1265 // no more events left in scheduler to be drained
1266 ATH_MSG_DEBUG ( "drainScheduler: scheduler empty" );
1267 return 0;
1268 }
1269
1270 // Let's see if we can pop other event contexts
1271 while (m_schedulerSvc->tryPopFinishedEvent(finishedEvtContext).isSuccess()){
1272 finishedEvtContexts.emplace_back(finishedEvtContext);
1273 }
1274
1275 // Now we flush them
1276 bool fail(false);
1277 for (auto& thisFinishedEvtContext : finishedEvtContexts){
1278 if (!thisFinishedEvtContext) {
1279 ATH_MSG_FATAL ( "Detected nullptr ctxt while clearing WB!");
1280 fail = true;
1281 continue;
1282 }
1283
1284 if (finishEvent(*thisFinishedEvtContext).isFailure()) {
1285 fail = true;
1286 } else {
1287 ++finishedEvts;
1288 }
1289
1290 }
1291
1292 return ( fail ? -1 : 1 );
1293
1294}
StatusCode finishEvent(const EventContext &ctx)
Finish one scheduler-returned event on the driving thread.
SmartIF< IScheduler > m_schedulerSvc
A shortcut for the scheduler.
fail(message)

◆ eventFinished()

StatusCode AthenaHiveEventLoopMgr::eventFinished ( const EventContext & ctx)
protectedvirtual

Process an event's result and decide whether the driving loop may continue.

Reimplemented in MPIHiveEventLoopMgr.

Definition at line 1187 of file AthenaHiveEventLoopMgr.cxx.

1187 {
1188 if (m_aess->eventStatus(ctx) != EventStatus::Success) {
1189 // EventContext not working with std::format
1190 ATH_MSG_ERROR("Failed event " << ctx << " with status "
1191 << m_aess->eventStatus(ctx));
1192 return StatusCode::FAILURE;
1193 }
1194 return StatusCode::SUCCESS;
1195}
SmartIF< IAlgExecStateSvc > m_aess
Reference to the Algorithm Execution State Svc.

◆ executeAlgorithms()

StatusCode AthenaHiveEventLoopMgr::executeAlgorithms ( )
protectedvirtual

Run the algorithms for the current event.

Definition at line 479 of file AthenaHiveEventLoopMgr.cxx.

479 {
480
481 return StatusCode::SUCCESS;
482}

◆ executeEvent()

StatusCode AthenaHiveEventLoopMgr::executeEvent ( EventContext && ctx)
overridevirtual

implementation of IEventProcessor::executeEvent(void* par)

Fire begin-Run incident if new run:

Definition at line 488 of file AthenaHiveEventLoopMgr.cxx.

489{
490
491 // An incident may schedule a stop, in which case is better to exit before the actual execution.
492 if ( m_scheduledStop ) {
493 ATH_MSG_ALWAYS ( "A stopRun was requested by an incidentListener. "
494 "Do not process this event." );
495 m_terminateLoop = true;
496 return (StatusCode::SUCCESS);
497 }
498
499 m_aess->reset( ctx );
500
501 // Make sure context with slot is set before calling es->next().
502 Gaudi::Hive::setCurrentContext ( ctx );
503
504 int declEvtRootSc = declareEventRootAddress( ctx );
505 if (declEvtRootSc == 0 ) { // We ran out of events!
506 m_terminateLoop = true; // we have finished!
507 return StatusCode::SUCCESS;
508 } else if ( declEvtRootSc == -1) {
509 // No std::format for EventContext
510 ATH_MSG_ERROR ( "declareEventRootAddress for context " << ctx << " failed" );
511 return StatusCode::FAILURE;
512 }
513
514 EventID::event_number_t evtNumber = ctx.eventID().event_number();
515 unsigned int conditionsRun = ctx.eventID().run_number();
516 if (!m_evtIdModSvc.isSet()) {
517 const AthenaAttributeList* attr = nullptr;
518 if (m_eventStore->contains<AthenaAttributeList> ("Input") &&
519 m_eventStore->retrieve(attr, "Input").isSuccess()) {
520 if (attr->exists ("ConditionsRun")) {
521 conditionsRun = (*attr)["ConditionsRun"].data<unsigned int>();
522 }
523 }
524 }
526 Gaudi::Hive::setCurrentContext ( ctx );
527
528 // Record EventContext in current whiteboard
529 if (m_eventStore->record(std::make_unique<EventContext> (ctx),
530 "EventContext").isFailure())
531 {
532 ATH_MSG_ERROR ( "Error recording event context object" );
533 return (StatusCode::FAILURE);
534 }
535
537 if (m_firstRun || (m_currentRun != ctx.eventID().run_number()) ) {
538 // Fire EndRun incident unless this is the first run
539 if (!m_firstRun) {
540 // FIXME!!!
541 m_incidentSvc->fireIncident(Incident(name(), IncidentType::EndRun));
542 }
543 m_firstRun=false;
544 m_currentRun = ctx.eventID().run_number();
545
546 ATH_MSG_INFO ( " ===>>> start of run {} <<<===", m_currentRun);
547
548 // FIXME!!! Fire BeginRun "Incident"
549 m_incidentSvc->fireIncident(Incident(name(),IncidentType::BeginRun,ctx));
550
551 }
552
553 bool toolsPassed=true;
554 // CGL: FIXME
555 // bool eventFailed = false;
556
557 // Call any attached tools to reject events early
558 unsigned int toolCtr=0;
559 if(m_useTools) {
560 tool_store::iterator theTool = m_tools.begin();
561 tool_store::iterator lastTool = m_tools.end();
562 while(toolsPassed && theTool!=lastTool )
563 {
564 toolsPassed = (*theTool)->passEvent(ctx.eventID());
565 m_toolInvoke[toolCtr]++;
566 {toolsPassed ? m_toolAccept[toolCtr]++ : m_toolReject[toolCtr]++;}
567 ++toolCtr;
568 ++theTool;
569 }
570 }
571
573 0 == (m_nev % m_eventPrintoutInterval.value()));
574 if (m_doEvtHeartbeat) {
575 if(!m_useTools) {
576 ATH_MSG_INFO ( " ===>>> start processing event #{}, run #{} on slot {}, {} events processed so far <<<===",
577 evtNumber, m_currentRun, ctx.slot(), m_proc);
578 }
579 else {
580 ATH_MSG_INFO ( " ===>>> start processing event #{}, run #{} on slot {}, {} events read and {} events processed so far <<<===",
581 evtNumber, m_currentRun, ctx.slot(), m_nev, m_proc);
582 }
583 }
584
585 if(toolsPassed) {
586
587 if (submitEvent(ctx).isFailure()) {
588 m_whiteboard->clearStore(ctx.slot()).ignore();
589 clearWBSlot(ctx.slot()).ignore();
590 Gaudi::Hive::setCurrentContext(EventContext());
591 return StatusCode::FAILURE;
592 }
593
594 } else {
595 ++m_nev;
596 ++m_nevt;
597 }
598
599 // invalidate thread local context once outside of event execute loop
600 Gaudi::Hive::setCurrentContext( EventContext() );
601
602 return StatusCode::SUCCESS;
603
604}
#define ATH_MSG_ALWAYS(x,...)
virtual const std::string & name() const override
tool_stats m_toolAccept
tool returns StatusCode::SUCCESS counter
tool_stats m_toolInvoke
tool called counter
StatusCode submitEvent(EventContext &ctx)
Submit a recorded context; the scheduler receives its own copy.
int declareEventRootAddress(EventContext &)
Declare the root address of the event.
StatusCode clearWBSlot(int evtSlot)
Clear a slot in the WB.
tool_stats m_toolReject
tool returns StatusCode::FAILURE counter
void setConditionsRun(EventIDBase::number_type conditionsRun)
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.

◆ executeRun()

StatusCode AthenaHiveEventLoopMgr::executeRun ( int maxevt)
overridevirtual

implementation of IEventProcessor::executeRun(int maxevt)

Definition at line 609 of file AthenaHiveEventLoopMgr.cxx.

610{
611
613 bool eventfailed = false;
614
615 // Call now the nextEvent(...)
616 sc = nextEvent(maxevt);
617 if (!sc.isSuccess())
618 eventfailed = true;
619
620 if (eventfailed)
621 return StatusCode::FAILURE;
622
623 m_incidentSvc->fireIncident(Incident(name(),"EndEvtLoop"));
624 return StatusCode::SUCCESS;
625}
virtual StatusCode nextEvent(int maxevt) override
implementation of IAppMgrUI::nextEvent. maxevt==0 returns immediately

◆ finalize()

StatusCode AthenaHiveEventLoopMgr::finalize ( )
overridevirtual

implementation of IAppMgrUI::finalize

Reimplemented in MPIHiveEventLoopMgr.

Definition at line 356 of file AthenaHiveEventLoopMgr.cxx.

357{
358
359 StatusCode sc = MinimalEventLoopMgr::finalize();
360 if (sc.isFailure())
361 {
362 ATH_MSG_ERROR ( "Error in Service base class Finalize" );
363 }
364
365 StatusCode sc2 = writeHistograms(true);
366 if (sc2.isFailure())
367 {
368 ATH_MSG_ERROR ( "Error in writing Histograms" );
369 }
370
371 // Release all interfaces (ignore StatusCodes)
372 m_histoDataMgrSvc.release().ignore();
373 m_histoPersSvc.release().ignore();
374
375 m_whiteboard = 0;
377 m_schedulerSvc = 0;
378 // m_evtDataSvc = 0;
379
380 m_incidentSvc.release().ignore();
381
382 // Release event selector context
383 if ( m_evtSelector && m_evtContext ) {
384 m_evtSelector->releaseContext(m_evtContext).ignore();
385 // m_evtSelector = releaseInterface(m_evtSelector);
386 delete m_evtContext; m_evtContext = 0;
387 }
388
389
390 if(m_useTools) {
391 tool_iterator firstTool = m_tools.begin();
392 tool_iterator lastTool = m_tools.end();
393 unsigned int toolCtr = 0;
394 ATH_MSG_INFO ( "Summary of AthenaEvtLoopPreSelectTool invocation: (invoked/success/failure)" );
395 ATH_MSG_INFO ( "-----------------------------------------------------" );
396
397 for ( ; firstTool != lastTool; ++firstTool ) {
398 ATH_MSG_INFO ( "{:>2}.) {:.<48} ({:>6}/{:>6}/{:>6})",
399 toolCtr+1,
400 (*firstTool)->name(),
401 m_toolInvoke[toolCtr],
402 m_toolAccept[toolCtr],
403 m_toolReject[toolCtr]);
404 toolCtr++;
405 }
406 }
407 return ( sc.isFailure() || sc2.isFailure() ) ? StatusCode::FAILURE :
408 StatusCode::SUCCESS;
409
410}
tool_store::const_iterator tool_iterator
virtual StatusCode writeHistograms(bool force=false)
Dump out histograms as needed.
SmartIF< IAlgResourcePool > m_algResourcePool
Reference to the Algorithm resource pool.

◆ finishEvent()

StatusCode AthenaHiveEventLoopMgr::finishEvent ( const EventContext & ctx)
protected

Finish one scheduler-returned event on the driving thread.

Calls the result hook with its store selected, then releases the slot even if the hook reports failure. Does not wait for or delete the context.

Definition at line 1197 of file AthenaHiveEventLoopMgr.cxx.

1197 {
1198 StatusCode result = m_whiteboard->selectStore(ctx.slot());
1199 if (result.isSuccess()) {
1200 Gaudi::Hive::setCurrentContext(ctx);
1201 result = eventFinished(ctx);
1202 m_incidentSvc->fireIncident(
1203 Incident(name(), IncidentType::EndProcessing, ctx));
1204 } else {
1205 ATH_MSG_ERROR("Could not select completed slot {}", ctx.slot());
1206 }
1207
1208 // Result handling may fail; the event has nevertheless left the scheduler
1209 // and must relinquish its slot. Successful batch jobs already cleared at
1210 // EndAlgorithms, but a failed/stalled graph may never fire that incident.
1211 // Clear failed events here as well so drivers which tolerate failure can
1212 // reuse the slot without stale EventInfo or payload objects.
1214 m_aess->eventStatus(ctx) != EventStatus::Success) {
1215 result &= m_whiteboard->clearStore(ctx.slot());
1216 }
1217 result &= clearWBSlot(ctx.slot());
1218 if (result.isFailure()) {
1219 Gaudi::Hive::setCurrentContext(EventContext());
1220 return result;
1221 }
1222 writeHistograms().ignore();
1223 ++m_proc;
1224 if (m_doEvtHeartbeat) {
1225 const auto n_evt = ctx.eventID().event_number();
1226 const auto n_run = ctx.eventID().run_number();
1227 ATH_MSG_INFO(" ===>>> done processing event #{}, run #{} on slot {}, {} events processed so far <<<===",
1228 n_evt, n_run, ctx.slot(), m_proc);
1229 std::ofstream outfile("eventLoopHeartBeat.txt");
1230 if (!outfile) {
1231 ATH_MSG_ERROR("Unable to open eventLoopHeartBeat.txt");
1232 Gaudi::Hive::setCurrentContext(EventContext());
1233 return StatusCode::FAILURE;
1234 }
1235 std::println(outfile, " done processing event #{}, run #{} {} events read so far <<<===",
1236 n_evt, n_run, m_nev);
1237 }
1238 Gaudi::Hive::setCurrentContext(EventContext());
1239 return StatusCode::SUCCESS;
1240}
virtual StatusCode eventFinished(const EventContext &ctx)
Process an event's result and decide whether the driving loop may continue.
virtual bool clearStoreOnEndAlgorithms() const
Batch jobs clear in the algorithm context; external drivers can retain the store until eventFinished(...

◆ getEventRoot()

StatusCode AthenaHiveEventLoopMgr::getEventRoot ( IOpaqueAddress *& refpAddr)

Create event address using event selector.

Definition at line 902 of file AthenaHiveEventLoopMgr.cxx.

902 {
903 refpAddr = 0;
905 if ( !sc.isSuccess() ) {
906 return sc;
907 }
908 // Create root address and assign address to data service
909 sc = m_evtSelector->createAddress(*m_evtContext,refpAddr);
910 if( !sc.isSuccess() ) {
911 sc = m_evtSelector->next(*m_evtContext);
912 if ( sc.isSuccess() ) {
913 sc = m_evtSelector->createAddress(*m_evtContext,refpAddr);
914 if ( !sc.isSuccess() ) {
915 ATH_MSG_WARNING ( "Error creating IOpaqueAddress." );
916 }
917 }
918 }
919 return sc;
920}

◆ handle()

void AthenaHiveEventLoopMgr::handle ( const Incident & inc)
overridevirtual

IIncidentListenet interfaces.

Definition at line 826 of file AthenaHiveEventLoopMgr.cxx.

827{
828
829 if(inc.type() == "EndAlgorithms") {
830 if (!clearStoreOnEndAlgorithms()) return;
831 // Clear the store at the end of the event.
832 // Do it here so that it executes in an algorithm context and thus
833 // multiple stores can be cleared at the same time.
834 StatusCode sc = m_whiteboard->clearStore(inc.context().slot());
835 if( !sc.isSuccess() ) {
836 ATH_MSG_WARNING ( "Clear of Event data store failed" );
837 }
838 return;
839 }
840
841 if(inc.type()!="BeforeFork")
842 return;
843
844 if(!m_evtContext || !m_firstRun) {
845 ATH_MSG_WARNING ( "Skipping BeforeFork handler. Either no event selector is provided or begin run has already passed" );
846 }
847
848 // Initialize Algorithms and Output Streams
850 if(sc.isFailure()) {
851 ATH_MSG_ERROR ( "Failed to initialize Algorithms" );
852 return;
853 }
854
855 // Construct EventInfo
856 sc = m_evtSelector->next(*m_evtContext);
857 if(!sc.isSuccess()) {
858 ATH_MSG_INFO ( "No more events in event selection " );
859 return;
860 }
861 IOpaqueAddress* addr{nullptr};
862 sc = m_evtSelector->createAddress(*m_evtContext, addr);
863 if (sc.isFailure()) {
864 ATH_MSG_ERROR ( "Could not create an IOpaqueAddress" );
865 return;
866 }
867 if (0 != addr) {
868 //create its proxy
869 sc = m_eventStore->recordAddress(addr);
870 if(!sc.isSuccess()) {
871 ATH_MSG_ERROR ( "Error declaring Event object" );
872 return;
873 }
874 }
875
876 if(m_eventStore->loadEventProxies().isFailure()) {
877 ATH_MSG_WARNING ( "Error loading Event proxies" );
878 return;
879 }
880
881 // Retrieve the legacy EventInfo object
882 const EventInfo* pEvent{nullptr};
883 sc = m_eventStore->retrieve(pEvent);
884 if(!sc.isSuccess()) {
885 ATH_MSG_ERROR ( "Unable to retrieve Event root object" );
886 return;
887 }
888
889 m_firstRun=false;
890 m_currentRun = pEvent->event_ID()->run_number();
891
892 // Clear Store
893 sc = m_eventStore->clearStore();
894 if(!sc.isSuccess()) {
895 ATH_MSG_ERROR ( "Clear of Event data store failed" );
896 }
897}
StatusCode initializeAlgorithms()
Initialize all algorithms and output streams.

◆ initialize()

StatusCode AthenaHiveEventLoopMgr::initialize ( )
overridevirtual

implementation of IAppMgrUI::initalize

Reimplemented in MPIHiveEventLoopMgr.

Definition at line 138 of file AthenaHiveEventLoopMgr.cxx.

139{
140
141 ATH_MSG_INFO ( "Initializing {}", name() );
142
143
144 StatusCode sc = MinimalEventLoopMgr::initialize();
145 if ( !sc.isSuccess() )
146 {
147 ATH_MSG_ERROR ( "Failed to initialize base class MinimalEventLoopMgr" );
148 return sc;
149 }
150
151//-------------------------------------------------------------------------
152// Setup stuff for hive
153//-------------------------------------------------------------------------
154
155 m_whiteboard = serviceLocator()->service(m_whiteboardName);
156 if( !m_whiteboard.isValid() ) {
157 ATH_MSG_FATAL ( "Error retrieving {} interface IHiveWhiteBoard.", m_whiteboardName );
158 return StatusCode::FAILURE;
159 }
160
161 m_schedulerSvc = serviceLocator()->service(m_schedulerName);
162 if ( !m_schedulerSvc.isValid()){
163 ATH_MSG_FATAL ( "Error retrieving SchedulerSvc interface ISchedulerSvc." );
164 return StatusCode::FAILURE;
165 }
166 // Setup algorithm resource pool
167 m_algResourcePool = serviceLocator()->service("AlgResourcePool");
168 if( !m_algResourcePool.isValid() ) {
169 ATH_MSG_FATAL ( "Error retrieving AlgResourcePool" );
170 return StatusCode::FAILURE;
171 }
172
173 m_aess = serviceLocator()->service("AlgExecStateSvc");
174 if( !m_aess.isValid() ) {
175 ATH_MSG_FATAL ( "Error retrieving AlgExecStateSvc" );
176 return StatusCode::FAILURE;
177 }
178
179 sc = m_eventStore.retrieve();
180 if( !sc.isSuccess() )
181 {
182 ATH_MSG_FATAL ( "Error retrieving pointer to StoreGateSvc" );
183 return sc;
184 }
185
186//--------------------------------------------------------------------------
187// Get the references to the services that are needed by the ApplicationMgr
188// itself
189//--------------------------------------------------------------------------
190 sc = m_incidentSvc.retrieve();
191 if( !sc.isSuccess() )
192 {
193 ATH_MSG_FATAL ( "Error retrieving IncidentSvc." );
194 return sc;
195 }
196
197//--------------------------------------------------------------------------
198// Access Property Manager interface:
199//--------------------------------------------------------------------------
200 SmartIF<IProperty> prpMgr(serviceLocator());
201 if ( !prpMgr.isValid() )
202 {
203 ATH_MSG_FATAL ( "IProperty interface not found in ApplicationMgr." );
204 return StatusCode::FAILURE;
205 }
206
207
208//--------------------------------------------------------------------------
209// Set up the Histogram Service
210//--------------------------------------------------------------------------
211 sc = m_histoDataMgrSvc.retrieve();
212 if( !sc.isSuccess() )
213 {
214 ATH_MSG_FATAL ( "Error retrieving HistogramDataSvc" );
215 return sc;
216 }
217
218 const std::string& histPersName(m_histPersName.value());
219 if ( histPersName.length() == 0 )
220 {
221 CHECK(setProperty(prpMgr->getProperty("HistogramPersistency")));
222 }
223
224 if ( histPersName != "NONE" ) {
225
226 m_histoPersSvc = IConversionSvc_t( "HistogramPersistencySvc",
227 this->name() );
228
229 SmartIF<IProperty> histSvc;
230 if (histPersName == "ROOT") {
231 histSvc = serviceLocator()->service("RootHistSvc");
232 } else if ( histPersName == "HBOOK" ) {
233 histSvc = serviceLocator()->service("HbookHistSvc");
234 }
235
236 if (!histSvc) {
237 ATH_MSG_ERROR ( "could not locate actual Histogram persistency service" );
238 } else {
239 const Gaudi::Details::PropertyBase &prop = histSvc->getProperty("OutputFile");
240 std::string val;
241 try {
242 const StringProperty &sprop = dynamic_cast<const StringProperty&>( prop );
243 val = sprop.value();
244 } catch (...) {
245 ATH_MSG_VERBOSE ( "could not dcast OutputFile property to a StringProperty."
246 " Need to fix Gaudi." );
247 val = prop.toString();
248 }
249
250 if (val != "" &&
251 val != "UndefinedROOTOutputFileName" &&
252 val != "UndefinedHbookOutputFileName" ) {
253 m_writeHists = true;
254 }
255 }
256 } else {
257 ATH_MSG_DEBUG ( "Histograms saving not required." );
258 }
259
260
261//--------------------------------------------------------------------------
262// Set up the EventID modifier Service
263//--------------------------------------------------------------------------
264 if( m_evtIdModSvc.empty() ) {
265 ATH_MSG_DEBUG ( "EventID modifier Service not set. No run number, ... overrides will be applied." );
266 }
267 else if ( !m_evtIdModSvc.retrieve().isSuccess() ) {
268 ATH_MSG_INFO ( "Could not find EventID modifier Service. No run number, ... overrides will be applied." );
269 }
270
271//-------------------------------------------------------------------------
272// Setup EventSelector service
273//-------------------------------------------------------------------------
274 const std::string& selName(m_evtsel.value());
275 // the evt sel is usually specified as a property of ApplicationMgr
276 if (selName.empty())
277 sc = setProperty(prpMgr->getProperty("EvtSel"));
278 if (sc.isFailure()) ATH_MSG_WARNING ( "Unable to set EvtSel property" );
279
280 // We do not expect a Event Selector necessarily being declared
281 if( !selName.empty() && selName != "NONE") {
282 SmartIF<IEvtSelector> theEvtSel{serviceLocator()->service( selName )};
283 if( theEvtSel && ( theEvtSel != m_evtSelector ) ) {
284 // Event Selector changed (or setup for the first time)
285 m_evtSelector = theEvtSel;
286
287 // reset iterator
288 if (m_evtSelector->createContext(m_evtContext).isFailure()) {
289 ATH_MSG_FATAL ( "Can not create the event selector Context." );
290 return StatusCode::FAILURE;
291 }
292 if (msgLevel(MSG::INFO)) {
293 SmartIF<INamedInterface> named(theEvtSel);
294 if (named) {
295 ATH_MSG_INFO ( "Setup EventSelector service {}", named->name( ) );
296 }
297 }
298 } else if (sc.isFailure()) {
299 ATH_MSG_FATAL ( "No valid event selector called {}", selName );
300 return StatusCode::FAILURE;
301 }
302 }
303
304 // Listen to the BeforeFork and EndAlgorithms incidents
305 m_incidentSvc->addListener(this,"BeforeFork",0);
306 m_incidentSvc->addListener(this, "EndAlgorithms",0);
307
308 CHECK( m_conditionsCleaner.retrieve() );
309
310 // Print if we override the event number using the one from secondary event
312 {
313 ATH_MSG_INFO ( "Using secondary event number." );
314 }
315
316 return sc;
317}
#define ATH_MSG_VERBOSE(x,...)
#define CHECK(...)
Evaluate an expression and check for errors.
void setProperty(columnar::PythonToolHandle &self, const std::string &key, nb::object value)
ServiceHandle< IConversionSvc > IConversionSvc_t
selName(recoSequenceName, hypoType=JetHypoAlgType.STANDARD)

◆ initializeAlgorithms()

StatusCode AthenaHiveEventLoopMgr::initializeAlgorithms ( )
protected

Initialize all algorithms and output streams.

Definition at line 471 of file AthenaHiveEventLoopMgr.cxx.

471 {
472
473 return StatusCode::SUCCESS;
474}

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40{
42 // If user did not set an explicit level, set a default
43 if (m_lvl == MSG::NIL) {
44 m_lvl = m_imsg ?
45 static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
46 MSG::INFO;
47 }
48}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)
int outputLevel(const IMessageSvc *ims, const std::string &source)

◆ modifyEventContext()

void AthenaHiveEventLoopMgr::modifyEventContext ( EventContext & ctx,
const EventID & eID,
bool consume_modifier_stream )
virtual

Definition at line 1115 of file AthenaHiveEventLoopMgr.cxx.

1115 {
1116
1117 if(m_evtIdModSvc.isSet()) {
1118 EventID new_eID(eID);
1119 // In Hive EventLoopMgr ctx.evt() gets set to m_nevt and *then* m_nevt is
1120 // incremented later so it's zero-indexed and we don't need to subtract one
1121 m_evtIdModSvc->modify_evtid(new_eID, ctx.evt(), consume_modifier_stream);
1122 if (msgLevel(MSG::DEBUG)) {
1123 unsigned int oldrunnr=eID.run_number();
1124 unsigned int oldLB=eID.lumi_block();
1125 unsigned int oldTS=eID.time_stamp();
1126 unsigned int oldTSno=eID.time_stamp_ns_offset();
1127 ATH_MSG_DEBUG ( "modifyEventContext: use evtIdModSvc runnr={} -> {}",
1128 oldrunnr, new_eID.run_number());
1129 ATH_MSG_DEBUG ( "modifyEventContext: use evtIdModSvc LB={} -> {}",
1130 oldLB, new_eID.lumi_block());
1131 ATH_MSG_DEBUG ( "modifyEventContext: use evtIdModSvc TimeStamp={} -> {}",
1132 oldTS, new_eID.time_stamp());
1133 ATH_MSG_DEBUG ( "modifyEventContext: use evtIdModSvc TimeStamp ns Offset={} -> {}",
1134 oldTSno, new_eID.time_stamp_ns_offset());
1135 }
1136 ctx.setEventID( new_eID );
1137 Atlas::getExtendedEventContext(ctx).setConditionsRun( ctx.eventID().run_number() );
1138 return;
1139 }
1140
1141 ctx.setEventID( eID );
1142}

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
inline

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 92 of file AthMessaging.h.

168{
169 MsgStream* ms = m_msg_tls.get();
170 if (!ms) {
171 if (!m_initialized.test_and_set()) initMessaging();
172 ms = new MsgStream(m_imsg,m_nm);
173 m_msg_tls.reset( ms );
174 }
175
176 ms->setLevel (m_lvl);
177 return *ms;
178}
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels).
void initMessaging() const
Initialize our message level and MessageSvc.

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level lvl) const
inline

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 99 of file AthMessaging.h.

183{ return msg() << lvl; }
MsgStream & msg() const
The standard message stream.

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level lvl) const
inline

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 86 of file AthMessaging.h.

152{
153 // If user did not set explicit message level we have to initialize
154 // the messaging and retrieve the default via the MessageSvc.
155 if (m_lvl==MSG::NIL && !m_initialized.test_and_set()) initMessaging();
156
157 if (m_lvl <= lvl) {
158 msg() << lvl;
159 return true;
160 } else {
161 return false;
162 }
163}

◆ name()

virtual const std::string & AthenaHiveEventLoopMgr::name ( ) const
inlineoverridevirtual

Definition at line 255 of file AthenaHiveEventLoopMgr.h.

255{ return Service::name(); } //FIXME

◆ nextEvent()

StatusCode AthenaHiveEventLoopMgr::nextEvent ( int maxevt)
overridevirtual

implementation of IAppMgrUI::nextEvent. maxevt==0 returns immediately

Reimplemented in MPIHiveEventLoopMgr.

Definition at line 670 of file AthenaHiveEventLoopMgr.cxx.

671{
672 // make nextEvent(0) a dummy call
673 if (0 == maxevt) return StatusCode::SUCCESS;
674
675 // Reset the application return code.
676 Gaudi::setAppReturnCode(m_appMgrProperty, Gaudi::ReturnCode::Success, true).ignore();
677
678 int finishedEvts =0;
679 int createdEvts =0;
680 ATH_MSG_INFO ( "Starting loop on events" );
681
682 // loop over events if the maxevt (received as input) is different from -1.
683 // if evtmax is -1 it means infinite loop (till time limit that is)
684 // int nevt(0);
685 // CGL: FIXME
686 // bool noTimeLimit(false);
687 bool loop_ended=false;
688 StatusCode sc(StatusCode::SUCCESS);
689
690 bool newEvtAllowed = ! m_firstEventAlone;
691
692 // Calculate runtime
693 auto start_time = tbb::tick_count::now();
694 auto secsFromStart = [&start_time]()->double{
695 return (tbb::tick_count::now()-start_time).seconds();
696 };
697
698 while ( !loop_ended and ( (maxevt < 0) or (finishedEvts < maxevt) ) ){
699
700 ATH_MSG_DEBUG ( " -> createdEvts: {}", createdEvts );
701
702 if ( ( !m_terminateLoop ) && // The events are not finished with an unlimited number of events
703 (newEvtAllowed || createdEvts == 0) && // Launch first event alone
704 ( (createdEvts < maxevt) or (maxevt<0) ) && // The events are not finished with a limited number of events
705 (m_schedulerSvc->freeSlots()>0) ){ // There are still free slots in the scheduler
706
707 ATH_MSG_DEBUG ( "createdEvts: {}, freeslots: {}",
708 createdEvts, m_schedulerSvc->freeSlots());
709
710 auto ctx = createEventContext();
711
712 if ( !ctx.valid() ) {
713 sc = StatusCode::FAILURE;
714 } else {
715 sc = executeEvent( std::move(ctx) );
716 }
717
718 if (sc.isFailure()) {
719 ATH_MSG_ERROR ( "Terminating event processing loop due to errors" );
720 loop_ended = true;
721 } else {
722 ++createdEvts;
723 }
724
725 } // end if condition createdEvts < maxevt
726
727 else {
728 // all the events were created but not all finished or the slots were
729 // all busy: the scheduler should finish its job
730
731 ATH_MSG_DEBUG ( "Draining the scheduler" );
732
733 // Pull out of the scheduler the finished events
734 int ir = drainScheduler(finishedEvts);
735 if (ir < 0) {
736 // some sort of error draining scheduler;
737 loop_ended = true;
738 sc = StatusCode::FAILURE;
739 } else if (ir == 0) {
740 // no more events in scheduler. we're done
741 loop_ended = true;
742 sc = StatusCode::SUCCESS;
743 } else {
744 // keep going!
745 }
746 newEvtAllowed = true;
747
748 }
749 } // end main loop on finished events
750
751 ATH_MSG_INFO ( "---> Loop Finished (seconds): {}", secsFromStart() );
752
753
754 return sc;
755
756
757}
int drainScheduler(int &finishedEvents)
Drain the scheduler from all actions that may be queued.
SmartIF< IProperty > m_appMgrProperty
Property interface of ApplicationMgr.
virtual StatusCode executeEvent(EventContext &&ctx) override
implementation of IEventProcessor::executeEvent(void* par)
virtual EventContext createEventContext() override
Create event context.
int ir
counter of the current depth
Definition fastadd.cxx:49

◆ operator=()

AthenaHiveEventLoopMgr & AthenaHiveEventLoopMgr::operator= ( const AthenaHiveEventLoopMgr & )
privatedelete

◆ resetTimeout()

void Athena::TimeoutMaster::resetTimeout ( Timeout & instance)
inlineprotectedinherited

Reset timeout.

Definition at line 83 of file Timeout.h.

83{ instance.reset(); }
std::map< std::string, double > instance

◆ seek()

StatusCode AthenaHiveEventLoopMgr::seek ( int evt)
overridevirtual

Seek to a given event.

Definition at line 764 of file AthenaHiveEventLoopMgr.cxx.

765{
766 IEvtSelectorSeek* is = dynamic_cast<IEvtSelectorSeek*> (m_evtSelector);
767 if (is == 0) {
768 ATH_MSG_ERROR ( "Seek failed; unsupported by event selector" );
769 return StatusCode::FAILURE;
770 }
771 //cppcheck-suppress nullPointerRedundantCheck
772 if (!m_evtContext) {
773 if (m_evtSelector->createContext(m_evtContext).isFailure()) {
774 ATH_MSG_FATAL ( "Can not create the event selector Context." );
775 return StatusCode::FAILURE;
776 }
777 }
778 //m_evtContext cannot be null if createContext succeeded
779 //cppcheck-suppress nullPointerRedundantCheck
780 StatusCode sc = is->seek (*m_evtContext, evt);
781 if (sc.isSuccess()) {
782 m_incidentSvc->fireIncident(ContextIncident<std::tuple<int, int>>(
783 name(), "SkipEvents", std::tuple<int, int>(m_nevt, evt)));
784 m_nevt = evt;
785 }
786 else {
787 ATH_MSG_ERROR ( "Seek failed." );
788 }
789 return sc;
790}
virtual StatusCode seek(IEvtSelector::Context &c, int evtnum) const =0
Seek to a given event number.

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29{
30 m_lvl = lvl;
31}

◆ setTimeout()

void Athena::TimeoutMaster::setTimeout ( Timeout & instance)
inlineprotectedinherited

Set timeout.

Definition at line 80 of file Timeout.h.

80{ instance.set(); }

◆ setupPreSelectTools()

void AthenaHiveEventLoopMgr::setupPreSelectTools ( Gaudi::Details::PropertyBase & )
protected

property update handler:sets up the Pre-selection tools

Definition at line 323 of file AthenaHiveEventLoopMgr.cxx.

323 {
324
325 m_toolInvoke.clear();
326 m_toolReject.clear();
327 m_toolAccept.clear();
328
329 m_tools.retrieve().ignore();
330 if(m_tools.size() > 0) {
331 m_useTools=true;
332 m_toolInvoke.resize(m_tools.size());
333 m_toolReject.resize(m_tools.size());
334 m_toolAccept.resize(m_tools.size());
335
336 tool_iterator firstTool = m_tools.begin();
337 tool_iterator lastTool = m_tools.end();
338 unsigned int toolCtr = 0;
339 for ( ; firstTool != lastTool; ++firstTool )
340 {
341 // reset statistics
342 m_toolInvoke[toolCtr] = 0;
343 m_toolReject[toolCtr] = 0;
344 m_toolAccept[toolCtr] = 0;
345 toolCtr++;
346 }
347 }
348
349 return;
350
351}

◆ size()

int AthenaHiveEventLoopMgr::size ( )
overridevirtual

Return the size of the collection.

Definition at line 804 of file AthenaHiveEventLoopMgr.cxx.

805{
806 IEvtSelectorSeek* cs = dynamic_cast<IEvtSelectorSeek*> (m_evtSelector);
807 if (cs == 0) {
808 ATH_MSG_ERROR ( "Collection size unsupported by event selector" );
809 return -1;
810 }
811 //cppcheck-suppress nullPointerRedundantCheck
812 if (!m_evtContext) {
813 if (m_evtSelector->createContext(m_evtContext).isFailure()) {
814 ATH_MSG_FATAL ( "Can not create the event selector Context." );
815 return -1;
816 }
817 }
818 //m_evtContext cannot be null if createContext succeeded
819 //cppcheck-suppress nullPointerRedundantCheck
820 return cs->size (*m_evtContext);
821}
virtual int size(IEvtSelector::Context &c) const =0
Return the size of the collection, or -1 if we can't get the size.

◆ stop()

StatusCode AthenaHiveEventLoopMgr::stop ( )
overridevirtual

implementation of IService::stop

Definition at line 644 of file AthenaHiveEventLoopMgr.cxx.

645{
646 // To enable conditions access during stop we set an invalid EventContext
647 // (no event/slot number) but with valid EventID (and extended EventContext).
648 m_lastEventContext.setValid(false);
649 Gaudi::Hive::setCurrentContext( m_lastEventContext );
650
651 StatusCode sc = MinimalEventLoopMgr::stop();
652
653 // If we exit the event loop early due to an error, some event stores
654 // may not have been cleared. This can lead to segfaults later,
655 // as DetectorStore will usually get finalized before HiveSvcMgr.
656 // So make sure that all stores have been cleared at this point.
657 size_t nslot = m_whiteboard ? m_whiteboard->getNumberOfStores() : 0;
658 for (size_t islot = 0; islot < nslot; islot++) {
659 sc &= clearWBSlot (islot);
660 }
661
662 Gaudi::Hive::setCurrentContext( EventContext() );
663 return sc;
664}

◆ stopRun()

StatusCode AthenaHiveEventLoopMgr::stopRun ( )
overridevirtual

implementation of IEventProcessor::stopRun()

Definition at line 629 of file AthenaHiveEventLoopMgr.cxx.

629 {
630 // Set the application return code
631 SmartIF<IProperty> appmgr(serviceLocator());
632 if(Gaudi::setAppReturnCode(appmgr, Gaudi::ReturnCode::ScheduledStop, true).isFailure()) {
633 ATH_MSG_ERROR ( "Could not set return code of the application ({})",
634 Gaudi::ReturnCode::ScheduledStop);
635 }
636 m_scheduledStop = true;
637 return StatusCode::SUCCESS;
638}

◆ submitEvent()

StatusCode AthenaHiveEventLoopMgr::submitEvent ( EventContext & ctx)
protected

Submit a recorded context; the scheduler receives its own copy.

On success ctx is invalidated, as the scheduler now owns the slot. On failure ctx stays valid and the caller still owns the slot; no scheduler context is leaked and BeginProcessing is balanced.

Definition at line 1166 of file AthenaHiveEventLoopMgr.cxx.

1166 {
1167 CHECK(m_conditionsCleaner->event(ctx, true));
1169 m_lastEventContext = ctx;
1170
1171 auto submitted = std::make_unique<EventContext>(ctx);
1172 m_incidentSvc->fireIncident(
1173 Incident(name(), IncidentType::BeginProcessing, ctx));
1174 if (m_schedulerSvc->pushNewEvent(submitted.get()).isFailure()) {
1175 m_incidentSvc->fireIncident(
1176 Incident(name(), IncidentType::EndProcessing, ctx));
1177 ATH_MSG_ERROR("Scheduler refused event {}", ctx.evt());
1178 return StatusCode::FAILURE;
1179 }
1180 submitted.release(); // Ownership transferred to the scheduler.
1181 ++m_nev;
1182 ++m_nevt;
1183 ctx = EventContext();
1184 return StatusCode::SUCCESS;
1185}
void resetTimeout(Timeout &instance)
Reset timeout.
Definition Timeout.h:83
static Timeout & instance()
Get reference to Timeout singleton.
Definition Timeout.h:64

◆ writeHistograms()

StatusCode AthenaHiveEventLoopMgr::writeHistograms ( bool force = false)
protectedvirtual

Dump out histograms as needed.

Definition at line 415 of file AthenaHiveEventLoopMgr.cxx.

415 {
416
417 StatusCode sc (StatusCode::SUCCESS);
418
419 if ( 0 != m_histoPersSvc && m_writeHists ) {
420 std::vector<DataObject*> objects;
421 sc = m_histoDataMgrSvc->traverseTree( [&objects]( IRegistry* reg, int ) {
422 DataObject* obj = reg->object();
423 if ( !obj || obj->clID() == CLID_StatisticsFile ) return false;
424 objects.push_back( obj );
425 return true;
426 } );
427
428 if ( !sc.isSuccess() ) {
429 ATH_MSG_ERROR ( "Error while traversing Histogram data store" );
430 return sc;
431 }
432
433 if ( objects.size() > 0) {
434 int writeInterval(m_writeInterval.value());
435
436 if ( m_nevt == 1 || force ||
437 (writeInterval != 0 && m_nevt%writeInterval == 0) ) {
438
439 // skip /stat entry!
440 sc = std::accumulate( begin( objects ), end( objects ), sc, [&]( StatusCode isc, auto& i ) {
441 IOpaqueAddress* pAddr = nullptr;
442 StatusCode iret = m_histoPersSvc->createRep( i, pAddr );
443 if ( iret.isFailure() ) return iret;
444 i->registry()->setAddress( pAddr );
445 return isc;
446 } );
447 sc = std::accumulate( begin( objects ), end( objects ), sc, [&]( StatusCode isc, auto& i ) {
448 IRegistry* reg = i->registry();
449 StatusCode iret = m_histoPersSvc->fillRepRefs( reg->address(), i );
450 return iret.isFailure() ? iret : isc;
451 } );
452 if ( ! sc.isSuccess() ) {
453 ATH_MSG_ERROR ( "Error while saving Histograms." );
454 }
455 }
456
457 if (force || (writeInterval != 0 && m_nevt%writeInterval == 0) ) {
458 ATH_MSG_DEBUG ( "committing Histograms" );
459 m_histoPersSvc->conversionSvc()->commitOutput("",true).ignore();
460 }
461 }
462
463 }
464
465 return sc;
466}

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging).

Definition at line 141 of file AthMessaging.h.

◆ m_abortEventListener

SmartIF< IIncidentListener > AthenaHiveEventLoopMgr::m_abortEventListener
protected

Instance of the incident listener waiting for AbortEvent.

Definition at line 203 of file AthenaHiveEventLoopMgr.h.

◆ m_aess

SmartIF<IAlgExecStateSvc> AthenaHiveEventLoopMgr::m_aess
protected

Reference to the Algorithm Execution State Svc.

Definition at line 160 of file AthenaHiveEventLoopMgr.h.

◆ m_algResourcePool

SmartIF<IAlgResourcePool> AthenaHiveEventLoopMgr::m_algResourcePool
protected

Reference to the Algorithm resource pool.

Definition at line 157 of file AthenaHiveEventLoopMgr.h.

◆ m_appMgrProperty

SmartIF<IProperty> AthenaHiveEventLoopMgr::m_appMgrProperty
protected

Property interface of ApplicationMgr.

Definition at line 163 of file AthenaHiveEventLoopMgr.h.

◆ m_conditionsCleaner

ServiceHandle<Athena::IConditionsCleanerSvc> AthenaHiveEventLoopMgr::m_conditionsCleaner
private

Definition at line 297 of file AthenaHiveEventLoopMgr.h.

◆ m_currentRun

number_type AthenaHiveEventLoopMgr::m_currentRun
protected

current run number

Definition at line 109 of file AthenaHiveEventLoopMgr.h.

◆ m_doEvtHeartbeat

bool AthenaHiveEventLoopMgr::m_doEvtHeartbeat
protected

Definition at line 278 of file AthenaHiveEventLoopMgr.h.

◆ m_eventPrintoutInterval

UnsignedIntegerProperty AthenaHiveEventLoopMgr::m_eventPrintoutInterval
protected

Definition at line 116 of file AthenaHiveEventLoopMgr.h.

◆ m_eventStore

StoreGateSvc_t AthenaHiveEventLoopMgr::m_eventStore
protected

Reference to StoreGateSvc;.

Property

Definition at line 83 of file AthenaHiveEventLoopMgr.h.

◆ m_evtContext

EvtContext* AthenaHiveEventLoopMgr::m_evtContext
protected

Gaudi event selector Context (may be used as a cursor by the evt selector).

Definition at line 88 of file AthenaHiveEventLoopMgr.h.

◆ m_evtIdModSvc

IEvtIdModifierSvc_t AthenaHiveEventLoopMgr::m_evtIdModSvc
protected

Definition at line 102 of file AthenaHiveEventLoopMgr.h.

◆ m_evtsel

StringProperty AthenaHiveEventLoopMgr::m_evtsel
protected

Definition at line 90 of file AthenaHiveEventLoopMgr.h.

◆ m_evtSelector

IEvtSelector* AthenaHiveEventLoopMgr::m_evtSelector
protected

Reference to the Event Selector.

Definition at line 86 of file AthenaHiveEventLoopMgr.h.

◆ m_failureMode

IntegerProperty AthenaHiveEventLoopMgr::m_failureMode
protected

Definition at line 113 of file AthenaHiveEventLoopMgr.h.

◆ m_firstEventAlone

bool AthenaHiveEventLoopMgr::m_firstEventAlone
private

Definition at line 285 of file AthenaHiveEventLoopMgr.h.

◆ m_firstRun

bool AthenaHiveEventLoopMgr::m_firstRun
protected

Definition at line 110 of file AthenaHiveEventLoopMgr.h.

◆ m_flmbi

unsigned int AthenaHiveEventLoopMgr::m_flmbi
private

Definition at line 287 of file AthenaHiveEventLoopMgr.h.

◆ m_histoDataMgrSvc

IDataManagerSvc_t AthenaHiveEventLoopMgr::m_histoDataMgrSvc
protected

Reference to the Histogram Data Service.

Definition at line 94 of file AthenaHiveEventLoopMgr.h.

◆ m_histoPersSvc

IConversionSvc_t AthenaHiveEventLoopMgr::m_histoPersSvc
protected

Definition at line 98 of file AthenaHiveEventLoopMgr.h.

◆ m_histPersName

StringProperty AthenaHiveEventLoopMgr::m_histPersName
protected

Definition at line 105 of file AthenaHiveEventLoopMgr.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

135{ nullptr };

◆ m_incidentSvc

IIncidentSvc_t AthenaHiveEventLoopMgr::m_incidentSvc
protected

Reference to the incident service.

Definition at line 79 of file AthenaHiveEventLoopMgr.h.

◆ m_lastEventContext

EventContext AthenaHiveEventLoopMgr::m_lastEventContext
protected

Definition at line 282 of file AthenaHiveEventLoopMgr.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

138{ MSG::NIL };

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels).

Definition at line 132 of file AthMessaging.h.

◆ m_nev

unsigned int AthenaHiveEventLoopMgr::m_nev
protected

events processed

Definition at line 275 of file AthenaHiveEventLoopMgr.h.

◆ m_nevt

unsigned int AthenaHiveEventLoopMgr::m_nevt
private

Definition at line 264 of file AthenaHiveEventLoopMgr.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_proc

unsigned int AthenaHiveEventLoopMgr::m_proc
protected

Definition at line 276 of file AthenaHiveEventLoopMgr.h.

◆ m_requireInputAttributeList

bool AthenaHiveEventLoopMgr::m_requireInputAttributeList {}
protected

require input attribute list

Definition at line 134 of file AthenaHiveEventLoopMgr.h.

134{};

◆ m_scheduledStop

bool AthenaHiveEventLoopMgr::m_scheduledStop
protected

Scheduled stop of event processing.

Definition at line 209 of file AthenaHiveEventLoopMgr.h.

◆ m_schedulerName

std::string AthenaHiveEventLoopMgr::m_schedulerName
protected

Name of the scheduler to be used.

Definition at line 205 of file AthenaHiveEventLoopMgr.h.

◆ m_schedulerSvc

SmartIF<IScheduler> AthenaHiveEventLoopMgr::m_schedulerSvc
protected

A shortcut for the scheduler.

Definition at line 166 of file AthenaHiveEventLoopMgr.h.

◆ m_terminateLoop

bool AthenaHiveEventLoopMgr::m_terminateLoop { false }
protected

Definition at line 273 of file AthenaHiveEventLoopMgr.h.

273{ false };

◆ m_timeStamp

unsigned int AthenaHiveEventLoopMgr::m_timeStamp { 0 }
private

Definition at line 265 of file AthenaHiveEventLoopMgr.h.

265{ 0 };

◆ m_timeStampInt

unsigned int AthenaHiveEventLoopMgr::m_timeStampInt
private

Definition at line 287 of file AthenaHiveEventLoopMgr.h.

◆ m_toolAccept

tool_stats AthenaHiveEventLoopMgr::m_toolAccept
protected

tool returns StatusCode::SUCCESS counter

Definition at line 127 of file AthenaHiveEventLoopMgr.h.

◆ m_toolInvoke

tool_stats AthenaHiveEventLoopMgr::m_toolInvoke
protected

tool called counter

Definition at line 125 of file AthenaHiveEventLoopMgr.h.

◆ m_toolReject

tool_stats AthenaHiveEventLoopMgr::m_toolReject
protected

tool returns StatusCode::FAILURE counter

Definition at line 126 of file AthenaHiveEventLoopMgr.h.

◆ m_tools

tool_store AthenaHiveEventLoopMgr::m_tools
protected

internal tool store

Definition at line 128 of file AthenaHiveEventLoopMgr.h.

◆ m_useSecondaryEventNumber

bool AthenaHiveEventLoopMgr::m_useSecondaryEventNumber {}
protected

read event number from secondary input

Definition at line 137 of file AthenaHiveEventLoopMgr.h.

137{};

◆ m_useTools

bool AthenaHiveEventLoopMgr::m_useTools
protected

Definition at line 277 of file AthenaHiveEventLoopMgr.h.

◆ m_whiteboard

SmartIF<IHiveWhiteBoard> AthenaHiveEventLoopMgr::m_whiteboard
protected

Reference to the Whiteboard interface.

Definition at line 154 of file AthenaHiveEventLoopMgr.h.

◆ m_whiteboardName

std::string AthenaHiveEventLoopMgr::m_whiteboardName
protected

Name of the Whiteboard to be used.

Definition at line 207 of file AthenaHiveEventLoopMgr.h.

◆ m_writeHists

bool AthenaHiveEventLoopMgr::m_writeHists
private

Definition at line 268 of file AthenaHiveEventLoopMgr.h.

◆ m_writeInterval

UnsignedIntegerProperty AthenaHiveEventLoopMgr::m_writeInterval
private

Definition at line 267 of file AthenaHiveEventLoopMgr.h.


The documentation for this class was generated from the following files: