![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
The default ATLAS batch event loop manager.
More...
#include <AthenaHiveEventLoopMgr.h>
|
typedef IEvtSelector::Context | EvtContext |
|
typedef std::list< SmartIF< IAlgorithm > > | ListAlg |
|
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.
◆ EvtContext
◆ IConversionSvc_t
◆ IDataManagerSvc_t
◆ IEvtIdModifierSvc_t
◆ IIncidentSvc_t
◆ ListAlg
◆ number_type
◆ StoreGateSvc_t
◆ tool_iterator
◆ tool_stats
◆ tool_stats_iterator
◆ tool_store
◆ tool_type
◆ AthenaHiveEventLoopMgr() [1/3]
AthenaHiveEventLoopMgr::AthenaHiveEventLoopMgr |
( |
const std::string & |
nam, |
|
|
ISvcLocator * |
svcLoc |
|
) |
| |
Standard Constructor.
Definition at line 60 of file AthenaHiveEventLoopMgr.cxx.
62 : MinimalEventLoopMgr(nam, svcLoc),
75 "Name of Event Selector to use. If empty string (default) "
76 "take value from ApplicationMgr");
78 "Histogram persistency technology to use: ROOT, HBOOK, NONE. "
79 "By default (empty string) get property value from "
82 "histogram write/update interval");
84 "Controls behaviour of event loop depending on return code of"
85 " Algorithms. 0: all non-SUCCESSes terminate job. "
86 "1: RECOVERABLE skips to next event, FAILURE terminates job "
87 "(DEFAULT). 2: RECOVERABLE and FAILURE skip to next events");
89 "Print event heartbeat printouts every m_eventPrintoutInterval events");
94 "Name of the scheduler to be used");
97 "Name of the Whiteboard to be used");
102 "ServiceHandle for EvtIdModifierSvc");
105 "Event interval at which to increment lumiBlock# when "
106 "creating events without an EventSelector. Zero means "
107 "don't increment it");
109 "timestamp interval between events when creating Events "
110 "without an EventSelector");
112 "Require valid input attribute list to be present");
114 "In case of DoubleEventSelector use event number from secondary input");
117 "process all of first event before scheduling any more");
◆ ~AthenaHiveEventLoopMgr()
AthenaHiveEventLoopMgr::~AthenaHiveEventLoopMgr |
( |
| ) |
|
|
virtual |
◆ AthenaHiveEventLoopMgr() [2/3]
AthenaHiveEventLoopMgr::AthenaHiveEventLoopMgr |
( |
| ) |
|
|
privatedelete |
◆ AthenaHiveEventLoopMgr() [3/3]
◆ clearWBSlot()
StatusCode AthenaHiveEventLoopMgr::clearWBSlot |
( |
int |
evtSlot | ) |
|
|
protected |
◆ createEventContext()
EventContext AthenaHiveEventLoopMgr::createEventContext |
( |
| ) |
|
|
overrideprotectedvirtual |
Create event context.
Definition at line 1192 of file AthenaHiveEventLoopMgr.cxx.
1197 if (
sc.isFailure()) {
1199 <<
" could not be selected for the WhiteBoard" );
1200 return EventContext{};
1205 ATH_MSG_DEBUG (
"created EventContext, num: " << ctx.evt() <<
" in slot: "
◆ curEvent()
int AthenaHiveEventLoopMgr::curEvent |
( |
| ) |
const |
|
overridevirtual |
◆ declareEventRootAddress()
int AthenaHiveEventLoopMgr::declareEventRootAddress |
( |
EventContext & |
ctx | ) |
|
|
protected |
Declare the root address of the event.
FIXME ???
Definition at line 980 of file AthenaHiveEventLoopMgr.cxx.
995 std::unique_ptr<EventInfo> pEventPtr;
1000 IOpaqueAddress* addr{};
1004 if ( !
sc.isSuccess() ) {
1020 if( !
sc.isSuccess() ) {
1025 }
if ((
sc=
eventStore()->loadEventProxies()).isFailure()) {
1030 bool consume_modifier_stream =
false;
1034 if ( pAttrList !=
nullptr && pAttrList->size() > 6 ) {
1036 unsigned int runNumber = (*pAttrList)[
"RunNumber"].data<
unsigned int>();
1037 unsigned long long eventNumber = (*pAttrList)[
"EventNumber"].data<
unsigned long long>();
1038 unsigned int eventTime = (*pAttrList)[
"EventTime"].data<
unsigned int>();
1039 unsigned int eventTimeNS = (*pAttrList)[
"EventTimeNanoSec"].data<
unsigned int>();
1040 unsigned int lumiBlock = (*pAttrList)[
"LumiBlockN"].data<
unsigned int>();
1041 unsigned int bunchId = (*pAttrList)[
"BunchId"].data<
unsigned int>();
1044 consume_modifier_stream =
true;
1047 unsigned long long eventNumberSecondary{};
1048 if ( !(pAttrList->exists(
"hasSecondaryInput") && (*pAttrList)[
"hasSecondaryInput"].data<
bool>()) ) {
1049 ATH_MSG_FATAL (
"Secondary EventNumber requested, but secondary input does not exist!" );
1052 if ( pAttrList->exists(
"EventNumber_secondary") ) {
1053 eventNumberSecondary = (*pAttrList)[
"EventNumber_secondary"].data<
unsigned long long>();
1059 if (pEventSecondary) {
1060 eventNumberSecondary = pEventSecondary->
event_ID()->event_number();
1063 ATH_MSG_FATAL (
"Secondary EventNumber requested, but it does not exist!" );
1067 if (eventNumberSecondary != 0) {
1071 ATH_MSG_INFO (
" ===>>> using secondary event #" << eventNumberSecondary <<
" instead of #" <<
eventNumber <<
" <<<===" );
1077 pEventPtr = std::make_unique<EventInfo>
1079 pEvent = pEventPtr.get();
1083 ATH_MSG_FATAL (
"Valid input attribute list required but not present!" );
1093 consume_modifier_stream =
false;
1101 if( !
sc.isSuccess() ) {
1105 consume_modifier_stream =
true;
1106 ATH_MSG_DEBUG (
"use xAOD::EventInfo with runNumber=" << pXEvent->runNumber() );
1110 pEvent = pEventPtr.get();
1112 if( !
sc.isSuccess() ) {
1126 unsigned int runNmb{1}, evtNmb{
m_nevt + 1};
1133 auto eid = std::make_unique<EventID> (runNmb,evtNmb,
m_timeStamp);
1135 eid->set_lumi_block( runNmb );
1141 bool consume_modifier_stream =
true;
1151 ATH_MSG_DEBUG (
"recording EventInfo " << *pEvent->event_ID() <<
" in "
1155 if( !
sc.isSuccess() ) {
◆ DeclareInterfaceID()
IEventSeek::DeclareInterfaceID |
( |
IEventSeek |
, |
|
|
1 |
, |
|
|
0 |
|
|
) |
| |
|
inherited |
◆ drainScheduler()
int AthenaHiveEventLoopMgr::drainScheduler |
( |
int & |
finishedEvents | ) |
|
|
protected |
Drain the scheduler from all actions that may be queued.
Definition at line 1215 of file AthenaHiveEventLoopMgr.cxx.
1220 std::vector<EventContext*> finishedEvtContexts;
1222 EventContext* finishedEvtContext(
nullptr);
1225 ATH_MSG_DEBUG (
"drainScheduler: [" << finishedEvts <<
"] Waiting for a context" );
1229 if (
sc.isSuccess()){
1230 ATH_MSG_DEBUG (
"drainScheduler: scheduler not empty: Context "
1231 << finishedEvtContext );
1232 finishedEvtContexts.push_back(finishedEvtContext);
1240 while (
m_schedulerSvc->tryPopFinishedEvent(finishedEvtContext).isSuccess()){
1241 finishedEvtContexts.push_back(finishedEvtContext);
1246 for (
auto& thisFinishedEvtContext : finishedEvtContexts){
1247 if (!thisFinishedEvtContext) {
1248 ATH_MSG_FATAL (
"Detected nullptr ctxt while clearing WB!");
1253 if (
m_aess->eventStatus(*thisFinishedEvtContext) != EventStatus::Success) {
1254 ATH_MSG_FATAL (
"Failed event detected on " << thisFinishedEvtContext
1255 <<
" w/ fail mode: "
1256 <<
m_aess->eventStatus(*thisFinishedEvtContext) );
1257 delete thisFinishedEvtContext;
1265 if (
m_whiteboard->selectStore(thisFinishedEvtContext->slot()).isSuccess()) {
1266 n_run = thisFinishedEvtContext->eventID().run_number();
1267 n_evt = thisFinishedEvtContext->eventID().event_number();
1270 << thisFinishedEvtContext->slot() );
1271 delete thisFinishedEvtContext;
1280 Gaudi::Hive::setCurrentContext( *thisFinishedEvtContext );
1281 m_incidentSvc->fireIncident(Incident(
name(), IncidentType::EndProcessing, *thisFinishedEvtContext ));
1283 ATH_MSG_DEBUG (
"Clearing slot " << thisFinishedEvtContext->slot()
1284 <<
" (event " << thisFinishedEvtContext->evt()
1285 <<
") of the whiteboard" );
1288 if (!
sc.isSuccess()) {
1289 ATH_MSG_ERROR (
"Whiteboard slot " << thisFinishedEvtContext->slot()
1290 <<
" could not be properly cleared" );
1292 delete thisFinishedEvtContext;
1303 ATH_MSG_INFO (
" ===>>> done processing event #" << n_evt <<
", run #" << n_run
1304 <<
" on slot " << thisFinishedEvtContext->slot() <<
", "
1305 <<
m_proc <<
" events processed so far <<<===" );
1307 ATH_MSG_INFO (
" ===>>> done processing event #" << n_evt <<
", run #" << n_run
1308 <<
" on slot " << thisFinishedEvtContext->slot() <<
", "
1310 <<
" events processed so far <<<===" );
1311 std::ofstream
outfile(
"eventLoopHeartBeat.txt");
1313 ATH_MSG_ERROR (
" unable to open: eventLoopHeartBeat.txt" );
1315 delete thisFinishedEvtContext;
1318 outfile <<
" done processing event #" << n_evt <<
", run #" << n_run
1319 <<
" " <<
m_nev <<
" events read so far <<<===" << std::endl;
1324 ATH_MSG_DEBUG (
"drainScheduler thisFinishedEvtContext: " << thisFinishedEvtContext );
1327 delete thisFinishedEvtContext;
1330 return (
fail ? -1 : 1 );
◆ eventStore()
◆ executeAlgorithms()
StatusCode AthenaHiveEventLoopMgr::executeAlgorithms |
( |
| ) |
|
|
protectedvirtual |
◆ executeEvent()
StatusCode AthenaHiveEventLoopMgr::executeEvent |
( |
EventContext && |
ctx | ) |
|
|
overridevirtual |
implementation of IEventProcessor::executeEvent(void* par)
Fire begin-Run incident if new run:
Definition at line 504 of file AthenaHiveEventLoopMgr.cxx.
509 ATH_MSG_ALWAYS (
"A stopRun was requested by an incidentListener. "
510 <<
"Do not process this event." );
512 return (StatusCode::SUCCESS);
518 Gaudi::Hive::setCurrentContext ( ctx );
521 if (declEvtRootSc == 0 ) {
523 return StatusCode::SUCCESS;
524 }
else if ( declEvtRootSc == -1) {
525 ATH_MSG_ERROR (
"declareEventRootAddress for context " << ctx <<
" failed" );
526 return StatusCode::FAILURE;
530 unsigned int conditionsRun = ctx.eventID().run_number();
533 if (
eventStore()->contains<AthenaAttributeList> (
"Input") &&
535 if (attr->exists (
"ConditionsRun")) {
536 conditionsRun = (*attr)[
"ConditionsRun"].data<
unsigned int>();
541 Gaudi::Hive::setCurrentContext ( ctx );
544 if (
eventStore()->record(std::make_unique<EventContext> (ctx),
545 "EventContext").isFailure())
548 return (StatusCode::FAILURE);
568 bool toolsPassed=
true;
573 unsigned int toolCtr=0;
577 while(toolsPassed && theTool!=lastTool )
579 toolsPassed = (*theTool)->passEvent(ctx.eventID());
592 <<
" on slot " << ctx.slot() <<
", " <<
m_proc
593 <<
" events processed so far <<<===" );
597 <<
" on slot " << ctx.slot() <<
", "
599 <<
" events processed so far <<<===" );
614 <<
", slot " << ctx.slot()
615 <<
" to the scheduler" );
622 if (!addEventStatus.isSuccess()){
623 ATH_MSG_FATAL (
"An event processing slot should be now free in the scheduler, but it appears not to be the case." );
633 Gaudi::Hive::setCurrentContext( EventContext() );
635 return StatusCode::SUCCESS;
◆ executeRun()
StatusCode AthenaHiveEventLoopMgr::executeRun |
( |
int |
maxevt | ) |
|
|
overridevirtual |
implementation of IEventProcessor::executeRun(int maxevt)
Definition at line 642 of file AthenaHiveEventLoopMgr.cxx.
646 bool eventfailed =
false;
654 return StatusCode::FAILURE;
657 return StatusCode::SUCCESS;
◆ finalize()
StatusCode AthenaHiveEventLoopMgr::finalize |
( |
| ) |
|
|
overridevirtual |
implementation of IAppMgrUI::finalize
Definition at line 363 of file AthenaHiveEventLoopMgr.cxx.
400 unsigned int toolCtr = 0;
401 ATH_MSG_INFO (
"Summary of AthenaEvtLoopPreSelectTool invocation: (invoked/success/failure)" );
402 ATH_MSG_INFO (
"-----------------------------------------------------" );
404 for ( ; firstTool != lastTool; ++firstTool ) {
405 ATH_MSG_INFO ( std::setw(2) << std::setiosflags(std::ios_base::right)
406 << toolCtr+1 <<
".) " << std::resetiosflags(std::ios_base::right)
407 << std::setw(48) << std::setfill(
'.')
408 << std::setiosflags(std::ios_base::left)
409 << (*firstTool)->name() << std::resetiosflags(std::ios_base::left)
412 << std::setw(6) << std::setiosflags(std::ios_base::right)
423 return (
sc.isFailure() || sc2.isFailure() ) ? StatusCode::FAILURE :
◆ getEventRoot()
StatusCode AthenaHiveEventLoopMgr::getEventRoot |
( |
IOpaqueAddress *& |
refpAddr | ) |
|
Create event address using event selector.
Definition at line 958 of file AthenaHiveEventLoopMgr.cxx.
961 if ( !
sc.isSuccess() ) {
966 if( !
sc.isSuccess() ) {
968 if (
sc.isSuccess() ) {
970 if ( !
sc.isSuccess() ) {
◆ handle()
void AthenaHiveEventLoopMgr::handle |
( |
const Incident & |
inc | ) |
|
|
overridevirtual |
IIncidentListenet interfaces.
Definition at line 858 of file AthenaHiveEventLoopMgr.cxx.
861 if(inc.type() ==
"EndAlgorithms") {
866 if( !
sc.isSuccess() ) {
872 if(inc.type()!=
"BeforeFork")
876 ATH_MSG_WARNING (
"Skipping BeforeFork handler. Either no event selector is provided or begin run has already passed" );
888 if(!
sc.isSuccess()) {
892 IOpaqueAddress* addr{
nullptr};
894 if (
sc.isFailure()) {
901 if(!
sc.isSuccess()) {
907 if(
eventStore()->loadEventProxies().isFailure()) {
915 if(!
sc.isSuccess()) {
925 if(!
sc.isSuccess()) {
◆ initialize()
StatusCode AthenaHiveEventLoopMgr::initialize |
( |
| ) |
|
|
overridevirtual |
implementation of IAppMgrUI::initalize
Definition at line 133 of file AthenaHiveEventLoopMgr.cxx.
140 if ( !
sc.isSuccess() )
142 ATH_MSG_ERROR (
"Failed to initialize base class MinimalEventLoopMgr" );
153 return StatusCode::FAILURE;
158 ATH_MSG_FATAL (
"Error retrieving SchedulerSvc interface ISchedulerSvc." );
159 return StatusCode::FAILURE;
165 return StatusCode::FAILURE;
168 m_aess = serviceLocator()->service(
"AlgExecStateSvc");
171 return StatusCode::FAILURE;
175 if( !
sc.isSuccess() )
177 ATH_MSG_FATAL (
"Error retrieving pointer to StoreGateSvc" );
186 if( !
sc.isSuccess() )
195 SmartIF<IProperty> prpMgr(serviceLocator());
196 if ( !prpMgr.isValid() )
198 ATH_MSG_FATAL (
"IProperty interface not found in ApplicationMgr." );
199 return StatusCode::FAILURE;
207 if( !
sc.isSuccess() )
214 if ( histPersName.length() == 0 )
216 CHECK(setProperty(prpMgr->getProperty(
"HistogramPersistency")));
219 if ( histPersName !=
"NONE" ) {
225 if (histPersName ==
"ROOT") {
226 sc = serviceLocator()->service(
"RootHistSvc", is);
227 }
else if ( histPersName ==
"HBOOK" ) {
228 sc = serviceLocator()->service(
"HbookHistSvc", is);
231 if (
sc.isFailure()) {
232 ATH_MSG_ERROR (
"could not locate actual Histogram persistency service" );
236 ATH_MSG_ERROR (
"Could not dcast HistPersSvc to a Service" );
238 const Gaudi::Details::PropertyBase &prop =
s->getProperty(
"OutputFile");
241 const StringProperty &sprop =
dynamic_cast<const StringProperty&
>( prop );
244 ATH_MSG_VERBOSE (
"could not dcast OutputFile property to a StringProperty."
245 <<
" Need to fix Gaudi." );
246 val = prop.toString();
250 val !=
"UndefinedROOTOutputFileName" &&
251 val !=
"UndefinedHbookOutputFileName" ) {
265 ATH_MSG_DEBUG (
"EventID modifier Service not set. No run number, ... overrides will be applied." );
268 ATH_MSG_INFO (
"Could not find EventID modifier Service. No run number, ... overrides will be applied." );
277 sc = setProperty(prpMgr->getProperty(
"EvtSel"));
282 IEvtSelector* theEvtSel(0);
290 ATH_MSG_FATAL (
"Can not create the event selector Context." );
291 return StatusCode::FAILURE;
293 if (msgLevel(MSG::INFO)) {
294 INamedInterface* named (
dynamic_cast< INamedInterface*
>(theEvtSel));
296 ATH_MSG_INFO (
"Setup EventSelector service " << named->name( ) );
299 }
else if (
sc.isFailure()) {
301 return StatusCode::FAILURE;
◆ initializeAlgorithms()
StatusCode AthenaHiveEventLoopMgr::initializeAlgorithms |
( |
| ) |
|
|
protected |
◆ 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.
◆ interfaceID()
static const InterfaceID& ICollectionSize::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ modifyEventContext()
void AthenaHiveEventLoopMgr::modifyEventContext |
( |
EventContext & |
ctx, |
|
|
const EventID & |
eID, |
|
|
bool |
consume_modifier_stream |
|
) |
| |
|
virtual |
Definition at line 1166 of file AthenaHiveEventLoopMgr.cxx.
1172 m_evtIdModSvc->modify_evtid(new_eID, ctx.evt(), consume_modifier_stream);
1174 unsigned int oldrunnr=eID.run_number();
1175 unsigned int oldLB=eID.lumi_block();
1176 unsigned int oldTS=eID.time_stamp();
1177 unsigned int oldTSno=eID.time_stamp_ns_offset();
1178 ATH_MSG_DEBUG (
"modifyEventContext: use evtIdModSvc runnr=" << oldrunnr <<
" -> " << new_eID.run_number() );
1179 ATH_MSG_DEBUG (
"modifyEventContext: use evtIdModSvc LB=" << oldLB <<
" -> " << new_eID.lumi_block() );
1180 ATH_MSG_DEBUG (
"modifyEventContext: use evtIdModSvc TimeStamp=" << oldTS <<
" -> " << new_eID.time_stamp() );
1181 ATH_MSG_DEBUG (
"modifyEventContext: use evtIdModSvc TimeStamp ns Offset=" << oldTSno <<
" -> " << new_eID.time_stamp_ns_offset() );
1183 ctx.setEventID( new_eID );
1188 ctx.setEventID( eID );
◆ msg() [1/4]
MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
◆ msg() [2/4]
MsgStream & AthMessaging::msg |
|
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.
◆ msg() [3/4]
MsgStream & AthMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ msg() [4/4]
MsgStream & AthMessaging::msg |
|
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.
180 {
return msg() << lvl; }
◆ msgLvl() [1/2]
bool AthMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
◆ msgLvl() [2/2]
bool AthMessaging::msgLvl |
|
inline |
Test the output level.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
true | Messages at level "lvl" will be printed |
Definition at line 86 of file AthMessaging.h.
◆ name()
virtual const std::string& AthenaHiveEventLoopMgr::name |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ nextEvent()
StatusCode AthenaHiveEventLoopMgr::nextEvent |
( |
int |
maxevt | ) |
|
|
overridevirtual |
implementation of IAppMgrUI::nextEvent. maxevt==0 returns immediately
Definition at line 703 of file AthenaHiveEventLoopMgr.cxx.
706 if (0 == maxevt)
return StatusCode::SUCCESS;
709 Gaudi::setAppReturnCode(
m_appMgrProperty, Gaudi::ReturnCode::Success,
true).ignore();
720 bool loop_ended=
false;
727 auto secsFromStart = [&start_time]()->
double{
731 while ( !loop_ended and ( (maxevt < 0) or (finishedEvts < maxevt) ) ){
736 (newEvtAllowed || createdEvts == 0) &&
737 ( (createdEvts < maxevt) or (maxevt<0) ) &&
744 if ( !ctx.valid() ) {
745 sc = StatusCode::FAILURE;
750 if (
sc.isFailure()) {
751 ATH_MSG_ERROR (
"Terminating event processing loop due to errors" );
770 sc = StatusCode::FAILURE;
771 }
else if (
ir == 0) {
774 sc = StatusCode::SUCCESS;
778 newEvtAllowed =
true;
783 ATH_MSG_INFO (
"---> Loop Finished (seconds): " << secsFromStart() );
◆ operator=()
◆ queryInterface()
StatusCode AthenaHiveEventLoopMgr::queryInterface |
( |
const InterfaceID & |
riid, |
|
|
void ** |
ppvInterface |
|
) |
| |
|
overridevirtual |
interface dispatcher
Definition at line 936 of file AthenaHiveEventLoopMgr.cxx.
939 if ( IEventSeek::interfaceID().versionMatch(riid) ) {
940 *ppvInterface =
dynamic_cast<IEventSeek*
>(
this);
942 else if ( IEventProcessor::interfaceID().versionMatch(riid) ) {
943 *ppvInterface =
dynamic_cast<IEventProcessor*
>(
this);
949 return MinimalEventLoopMgr::queryInterface(riid, ppvInterface);
952 return StatusCode::SUCCESS;
◆ resetTimeout()
void Athena::TimeoutMaster::resetTimeout |
( |
Timeout & |
instance | ) |
|
|
inlineprotectedinherited |
Reset timeout.
Definition at line 83 of file Timeout.h.
◆ seek()
StatusCode AthenaHiveEventLoopMgr::seek |
( |
int |
evt | ) |
|
|
overridevirtual |
Seek to a given event.
Implements IEventSeek.
Definition at line 796 of file AthenaHiveEventLoopMgr.cxx.
800 ATH_MSG_ERROR (
"Seek failed; unsupported by event selector" );
801 return StatusCode::FAILURE;
806 ATH_MSG_FATAL (
"Can not create the event selector Context." );
807 return StatusCode::FAILURE;
813 if (
sc.isSuccess()) {
814 m_incidentSvc->fireIncident(ContextIncident<std::tuple<int, int>>(
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ setTimeout()
void Athena::TimeoutMaster::setTimeout |
( |
Timeout & |
instance | ) |
|
|
inlineprotectedinherited |
◆ setupPreSelectTools()
void AthenaHiveEventLoopMgr::setupPreSelectTools |
( |
Gaudi::Details::PropertyBase & |
| ) |
|
|
protected |
property update handler:sets up the Pre-selection tools
Definition at line 330 of file AthenaHiveEventLoopMgr.cxx.
345 unsigned int toolCtr = 0;
346 for ( ; firstTool != lastTool; ++firstTool )
◆ size()
int AthenaHiveEventLoopMgr::size |
( |
| ) |
|
|
overridevirtual |
◆ stop()
StatusCode AthenaHiveEventLoopMgr::stop |
( |
| ) |
|
|
overridevirtual |
implementation of IService::stop
Definition at line 677 of file AthenaHiveEventLoopMgr.cxx.
691 for (
size_t islot = 0; islot < nslot; islot++) {
695 Gaudi::Hive::setCurrentContext( EventContext() );
◆ stopRun()
StatusCode AthenaHiveEventLoopMgr::stopRun |
( |
| ) |
|
|
overridevirtual |
implementation of IEventProcessor::stopRun()
Definition at line 662 of file AthenaHiveEventLoopMgr.cxx.
664 SmartIF<IProperty> appmgr(serviceLocator());
665 if(Gaudi::setAppReturnCode(appmgr, Gaudi::ReturnCode::ScheduledStop).isFailure()) {
666 ATH_MSG_ERROR (
"Could not set return code of the application ("
667 << Gaudi::ReturnCode::ScheduledStop <<
")" );
670 return StatusCode::SUCCESS;
◆ writeHistograms()
StatusCode AthenaHiveEventLoopMgr::writeHistograms |
( |
bool |
force = false | ) |
|
|
protectedvirtual |
Dump out histograms as needed.
Definition at line 431 of file AthenaHiveEventLoopMgr.cxx.
436 std::vector<DataObject*>
objects;
438 DataObject*
obj =
reg->object();
439 if ( !
obj ||
obj->clID() == CLID_StatisticsFile )
return false;
444 if ( !
sc.isSuccess() ) {
445 ATH_MSG_ERROR (
"Error while traversing Histogram data store" );
453 (writeInterval != 0 &&
m_nevt%writeInterval == 0) ) {
457 IOpaqueAddress* pAddr =
nullptr;
459 if ( iret.isFailure() )
return iret;
460 i->registry()->setAddress( pAddr );
464 IRegistry*
reg =
i->registry();
466 return iret.isFailure() ? iret : isc;
468 if ( !
sc.isSuccess() ) {
473 if (
force || (writeInterval != 0 &&
m_nevt%writeInterval == 0) ) {
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_abortEventListener
SmartIF< IIncidentListener > AthenaHiveEventLoopMgr::m_abortEventListener |
|
protected |
◆ m_aess
SmartIF<IAlgExecStateSvc> AthenaHiveEventLoopMgr::m_aess |
|
protected |
◆ m_algResourcePool
SmartIF<IAlgResourcePool> AthenaHiveEventLoopMgr::m_algResourcePool |
|
protected |
◆ m_appMgrProperty
SmartIF<IProperty> AthenaHiveEventLoopMgr::m_appMgrProperty |
|
protected |
◆ m_conditionsCleaner
◆ m_currentRun
◆ m_doEvtHeartbeat
bool AthenaHiveEventLoopMgr::m_doEvtHeartbeat |
|
private |
◆ m_eventPrintoutInterval
UnsignedIntegerProperty AthenaHiveEventLoopMgr::m_eventPrintoutInterval |
|
protected |
◆ m_eventStore
◆ m_evtContext
◆ m_evtIdModSvc
◆ m_evtsel
StringProperty AthenaHiveEventLoopMgr::m_evtsel |
|
protected |
◆ m_evtSelector
IEvtSelector* AthenaHiveEventLoopMgr::m_evtSelector |
|
protected |
◆ m_failureMode
IntegerProperty AthenaHiveEventLoopMgr::m_failureMode |
|
protected |
◆ m_firstEventAlone
bool AthenaHiveEventLoopMgr::m_firstEventAlone |
|
private |
◆ m_firstRun
bool AthenaHiveEventLoopMgr::m_firstRun |
|
protected |
◆ m_flmbi
unsigned int AthenaHiveEventLoopMgr::m_flmbi |
|
private |
◆ m_histoDataMgrSvc
◆ m_histoPersSvc
◆ m_histPersName
StringProperty AthenaHiveEventLoopMgr::m_histPersName |
|
protected |
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_incidentSvc
◆ m_lastEventContext
EventContext AthenaHiveEventLoopMgr::m_lastEventContext |
|
private |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ 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 |
|
private |
◆ m_nevt
unsigned int AthenaHiveEventLoopMgr::m_nevt |
|
private |
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_proc
unsigned int AthenaHiveEventLoopMgr::m_proc |
|
private |
◆ m_requireInputAttributeList
bool AthenaHiveEventLoopMgr::m_requireInputAttributeList {} |
|
protected |
◆ m_scheduledStop
bool AthenaHiveEventLoopMgr::m_scheduledStop |
|
protected |
◆ m_schedulerName
std::string AthenaHiveEventLoopMgr::m_schedulerName |
|
protected |
◆ m_schedulerSvc
SmartIF<IScheduler> AthenaHiveEventLoopMgr::m_schedulerSvc |
|
protected |
◆ m_terminateLoop
bool AthenaHiveEventLoopMgr::m_terminateLoop { false } |
|
private |
◆ m_timeStamp
unsigned int AthenaHiveEventLoopMgr::m_timeStamp { 0 } |
|
private |
◆ m_timeStampInt
unsigned int AthenaHiveEventLoopMgr::m_timeStampInt |
|
private |
◆ m_toolAccept
◆ m_toolInvoke
◆ m_toolReject
◆ m_tools
◆ m_useSecondaryEventNumber
bool AthenaHiveEventLoopMgr::m_useSecondaryEventNumber {} |
|
protected |
◆ m_useTools
bool AthenaHiveEventLoopMgr::m_useTools |
|
private |
◆ m_whiteboard
SmartIF<IHiveWhiteBoard> AthenaHiveEventLoopMgr::m_whiteboard |
|
protected |
◆ m_whiteboardName
std::string AthenaHiveEventLoopMgr::m_whiteboardName |
|
protected |
◆ m_writeHists
bool AthenaHiveEventLoopMgr::m_writeHists |
|
private |
◆ m_writeInterval
UnsignedIntegerProperty AthenaHiveEventLoopMgr::m_writeInterval |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
tool_stats m_toolReject
tool returns StatusCode::FAILURE counter
StatusCode record(T *p2BRegistered, const TKEY &key)
Record an object with a key.
std::atomic< MSG::Level > m_lvl
Current logging level.
IEvtSelector * m_evtSelector
Reference to the Event Selector.
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
std::string m_schedulerName
Name of the scheduler to be used.
bool m_useSecondaryEventNumber
read event number from secondary input
tool_store m_tools
internal tool store
IIncidentSvc_t m_incidentSvc
Reference to the incident service.
This class represents the "type of event" where the type is given by one or more "characteristics".
StatusCode initializeAlgorithms()
Initialize all algorithms and output streams.
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
ServiceHandle< IConversionSvc > IConversionSvc_t
StringProperty m_histPersName
virtual const std::string & name() const override
#define ATH_MSG_VERBOSE(x)
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
reg
globals -----------------------------------------------------------------—
StoreGateSvc_t m_eventStore
Reference to StoreGateSvc;.
IntegerProperty m_failureMode
IMessageSvc * getMessageSvc(bool quiet=false)
unsigned int m_timeStampInt
UnsignedIntegerProperty m_eventPrintoutInterval
SmartIF< IScheduler > m_schedulerSvc
A shortcut for the scheduler.
std::string m_whiteboardName
Name of the Whiteboard to be used.
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
virtual StatusCode seek(IEvtSelector::Context &c, int evtnum) const =0
Seek to a given event number.
StatusCode clearWBSlot(int evtSlot)
Clear a slot in the WB.
AthMessaging()
Default constructor:
EventIDBase::event_number_t event_number_t
SmartIF< IProperty > m_appMgrProperty
Property interface of ApplicationMgr.
SmartIF< IAlgExecStateSvc > m_aess
Reference to the Algorithm Execution State Svc.
static const InterfaceID & interfaceID()
IEvtIdModifierSvc_t m_evtIdModSvc
tool_store::const_iterator tool_iterator
EventIDBase::number_type number_type
virtual void modifyEventContext(EventContext &ctx, const EventID &eID, bool consume_modifier_stream)
::StatusCode StatusCode
StatusCode definition for legacy code.
EventID * event_ID()
the unique identification of the event.
virtual int size(IEvtSelector::Context &c) const =0
Return the size of the collection, or -1 if we can't get the size.
#define ATH_MSG_ALWAYS(x)
Abstract interface for finding the size of an event collection.
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode clearStore(bool forceRemove=false) override final
clear DataStore contents: called by the event loop mgrs
static Timeout & instance()
Get reference to Timeout singleton.
MsgStream & msg() const
The standard message stream.
virtual StatusCode writeHistograms(bool force=false)
Dump out histograms as needed.
bool m_requireInputAttributeList
require input attribute list
int drainScheduler(int &finishedEvents)
Drain the scheduler from all actions that may be queued.
void setConditionsRun(EventIDBase::number_type conditionsRun)
virtual StatusCode executeEvent(EventContext &&ctx) override
implementation of IEventProcessor::executeEvent(void* par)
virtual EventContext createEventContext() override
Create event context.
This class provides general information about an event. Event information is provided by the accessor...
void setupPreSelectTools(Gaudi::Details::PropertyBase &)
property update handler:sets up the Pre-selection tools
StatusCode recordAddress(const std::string &skey, IOpaqueAddress *pAddress, bool clearAddressFlag=true)
Create a proxy object using an IOpaqueAddress and a transient key.
const T * tryConstRetrieve() const
Class describing the basic event information.
int ir
counter of the current depth
tool_stats m_toolInvoke
tool called counter
ServiceHandle< Athena::IConditionsCleanerSvc > m_conditionsCleaner
#define ATH_MSG_WARNING(x)
bool m_scheduledStop
Scheduled stop of event processing.
std::string m_nm
Message source name.
IConversionSvc_t m_histoPersSvc
EventID eventIDFromxAOD(const xAOD::EventInfo *xaod)
Create EventID object from xAOD::EventInfo.
tool_stats m_toolAccept
tool returns StatusCode::SUCCESS counter
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
SmartIF< IHiveWhiteBoard > m_whiteboard
Reference to the Whiteboard interface.
int declareEventRootAddress(EventContext &)
Declare the root address of the event.
Abstract interface for seeking within an event stream.
EventContext m_lastEventContext
StoreGateSvc * eventStore() const
SmartIF< IAlgResourcePool > m_algResourcePool
Reference to the Algorithm resource pool.
void resetTimeout(Timeout &instance)
Reset timeout.
number_type m_currentRun
current run number
void initMessaging() const
Initialize our message level and MessageSvc.
IDataManagerSvc_t m_histoDataMgrSvc
Reference to the Histogram Data Service.
EvtContext * m_evtContext
Gaudi event selector Context (may be used as a cursor by the evt selector)
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
unsigned int m_nev
events processed
EventType eventTypeFromxAOD(const xAOD::EventInfo *xaod)
Create EventType object from xAOD::EventInfo.
UnsignedIntegerProperty m_writeInterval
virtual StatusCode nextEvent(int maxevt) override
implementation of IAppMgrUI::nextEvent. maxevt==0 returns immediately
void setExtendedEventContext(EventContext &ctx, ExtendedEventContext &&ectx)
Move an extended context into a context object.
Abstract interface for seeking for an event selector.
thread_local event_number_t eventIndex