5#include <GaudiKernel/DataIncident.h>
8#define ATHENASERVICES_ATHENAHIVEEVENTLOOPMGR_CPP
28#include "GaudiKernel/IAlgorithm.h"
29#include "GaudiKernel/SmartIF.h"
30#include "GaudiKernel/Incident.h"
31#include "GaudiKernel/DataObject.h"
32#include "GaudiKernel/IIncidentSvc.h"
33#include "GaudiKernel/IEvtSelector.h"
34#include "GaudiKernel/IDataManagerSvc.h"
35#include "GaudiKernel/IDataProviderSvc.h"
36#include "GaudiKernel/IConversionSvc.h"
37#include "GaudiKernel/GaudiException.h"
38#include "GaudiKernel/AppReturnCode.h"
39#include "GaudiKernel/MsgStream.h"
40#include "Gaudi/Property.h"
41#include "GaudiKernel/EventIDBase.h"
42#include "GaudiKernel/ThreadLocalContext.h"
46#include "EventInfo/EventInfo.h"
54#include <GaudiKernel/IScheduler.h>
56#include "tbb/tick_count.h"
65 : base_class(nam, svcLoc),
78 "Name of Event Selector to use. If empty string (default) "
79 "take value from ApplicationMgr");
81 "Histogram persistency technology to use: ROOT, HBOOK, NONE. "
82 "By default (empty string) get property value from "
85 "histogram write/update interval");
87 "Controls behaviour of event loop depending on return code of"
88 " Algorithms. 0: all non-SUCCESSes terminate job. "
89 "1: RECOVERABLE skips to next event, FAILURE terminates job "
90 "(DEFAULT). 2: RECOVERABLE and FAILURE skip to next events");
92 "Print event heartbeat printouts every m_eventPrintoutInterval events");
93 declareProperty(
"PreSelectTools",
m_tools,
"AlgTools for event pre-selection")->
97 "Name of the scheduler to be used");
100 "Name of the Whiteboard to be used");
105 "ServiceHandle for EvtIdModifierSvc");
107 declareProperty(
"FakeLumiBlockInterval",
m_flmbi = 0,
108 "Event interval at which to increment lumiBlock# when "
109 "creating events without an EventSelector. Zero means "
110 "don't increment it");
112 "timestamp interval between events when creating Events "
113 "without an EventSelector");
115 "Require valid input attribute list to be present");
117 "In case of DoubleEventSelector use event number from secondary input");
120 "process all of first event before scheduling any more");
142 StatusCode
sc = MinimalEventLoopMgr::initialize();
143 if ( !
sc.isSuccess() )
145 ATH_MSG_ERROR (
"Failed to initialize base class MinimalEventLoopMgr" );
156 return StatusCode::FAILURE;
161 ATH_MSG_FATAL (
"Error retrieving SchedulerSvc interface ISchedulerSvc." );
162 return StatusCode::FAILURE;
168 return StatusCode::FAILURE;
171 m_aess = serviceLocator()->service(
"AlgExecStateSvc");
174 return StatusCode::FAILURE;
178 if( !
sc.isSuccess() )
180 ATH_MSG_FATAL (
"Error retrieving pointer to StoreGateSvc" );
189 if( !
sc.isSuccess() )
198 SmartIF<IProperty> prpMgr(serviceLocator());
199 if ( !prpMgr.isValid() )
201 ATH_MSG_FATAL (
"IProperty interface not found in ApplicationMgr." );
202 return StatusCode::FAILURE;
210 if( !
sc.isSuccess() )
217 if ( histPersName.length() == 0 )
222 if ( histPersName !=
"NONE" ) {
227 SmartIF<IProperty> histSvc;
228 if (histPersName ==
"ROOT") {
229 histSvc = serviceLocator()->service(
"RootHistSvc");
230 }
else if ( histPersName ==
"HBOOK" ) {
231 histSvc = serviceLocator()->service(
"HbookHistSvc");
235 ATH_MSG_ERROR (
"could not locate actual Histogram persistency service" );
237 const Gaudi::Details::PropertyBase &prop = histSvc->getProperty(
"OutputFile");
240 const StringProperty &sprop =
dynamic_cast<const StringProperty&
>( prop );
243 ATH_MSG_VERBOSE (
"could not dcast OutputFile property to a StringProperty."
244 <<
" Need to fix Gaudi." );
245 val = prop.toString();
249 val !=
"UndefinedROOTOutputFileName" &&
250 val !=
"UndefinedHbookOutputFileName" ) {
263 ATH_MSG_DEBUG (
"EventID modifier Service not set. No run number, ... overrides will be applied." );
266 ATH_MSG_INFO (
"Could not find EventID modifier Service. No run number, ... overrides will be applied." );
272 const std::string& selName(
m_evtsel.value());
279 if( !selName.empty() && selName !=
"NONE") {
280 SmartIF<IEvtSelector> theEvtSel{serviceLocator()->service( selName )};
287 ATH_MSG_FATAL (
"Can not create the event selector Context." );
288 return StatusCode::FAILURE;
290 if (msgLevel(MSG::INFO)) {
291 SmartIF<INamedInterface> named(theEvtSel);
293 ATH_MSG_INFO (
"Setup EventSelector service " << named->name( ) );
296 }
else if (
sc.isFailure()) {
297 ATH_MSG_FATAL (
"No valid event selector called " << selName );
298 return StatusCode::FAILURE;
342 unsigned int toolCtr = 0;
343 for ( ; firstTool != lastTool; ++firstTool )
363 StatusCode
sc = MinimalEventLoopMgr::finalize();
397 unsigned int toolCtr = 0;
398 ATH_MSG_INFO (
"Summary of AthenaEvtLoopPreSelectTool invocation: (invoked/success/failure)" );
399 ATH_MSG_INFO (
"-----------------------------------------------------" );
401 for ( ; firstTool != lastTool; ++firstTool ) {
402 ATH_MSG_INFO ( std::setw(2) << std::setiosflags(std::ios_base::right)
403 << toolCtr+1 <<
".) " << std::resetiosflags(std::ios_base::right)
404 << std::setw(48) << std::setfill(
'.')
405 << std::setiosflags(std::ios_base::left)
406 << (*firstTool)->name() << std::resetiosflags(std::ios_base::left)
409 << std::setw(6) << std::setiosflags(std::ios_base::right)
420 return (
sc.isFailure() || sc2.isFailure() ) ? StatusCode::FAILURE :
430 StatusCode
sc (StatusCode::SUCCESS);
433 std::vector<DataObject*> objects;
435 DataObject* obj = reg->object();
436 if ( !obj || obj->clID() == CLID_StatisticsFile )
return false;
437 objects.push_back( obj );
441 if ( !
sc.isSuccess() ) {
442 ATH_MSG_ERROR (
"Error while traversing Histogram data store" );
446 if ( objects.size() > 0) {
449 if (
m_nevt == 1 || force ||
450 (writeInterval != 0 &&
m_nevt%writeInterval == 0) ) {
453 sc = std::accumulate( begin( objects ), end( objects ),
sc, [&]( StatusCode isc,
auto& i ) {
454 IOpaqueAddress* pAddr =
nullptr;
456 if ( iret.isFailure() )
return iret;
457 i->registry()->setAddress( pAddr );
460 sc = std::accumulate( begin( objects ), end( objects ),
sc, [&]( StatusCode isc,
auto& i ) {
461 IRegistry* reg = i->registry();
462 StatusCode iret =
m_histoPersSvc->fillRepRefs( reg->address(), i );
463 return iret.isFailure() ? iret : isc;
465 if ( !
sc.isSuccess() ) {
470 if (force || (writeInterval != 0 &&
m_nevt%writeInterval == 0) ) {
486 return StatusCode::SUCCESS;
494 return StatusCode::SUCCESS;
506 ATH_MSG_ALWAYS (
"A stopRun was requested by an incidentListener. "
507 <<
"Do not process this event." );
509 return (StatusCode::SUCCESS);
515 Gaudi::Hive::setCurrentContext ( ctx );
518 if (declEvtRootSc == 0 ) {
520 return StatusCode::SUCCESS;
521 }
else if ( declEvtRootSc == -1) {
522 ATH_MSG_ERROR (
"declareEventRootAddress for context " << ctx <<
" failed" );
523 return StatusCode::FAILURE;
526 EventID::event_number_t evtNumber = ctx.eventID().event_number();
527 unsigned int conditionsRun = ctx.eventID().run_number();
531 eventStore()->retrieve(attr,
"Input").isSuccess()) {
532 if (attr->exists (
"ConditionsRun")) {
533 conditionsRun = (*attr)[
"ConditionsRun"].data<
unsigned int>();
538 Gaudi::Hive::setCurrentContext ( ctx );
541 if (
eventStore()->record(std::make_unique<EventContext> (ctx),
542 "EventContext").isFailure())
545 return (StatusCode::FAILURE);
565 bool toolsPassed=
true;
570 unsigned int toolCtr=0;
572 tool_store::iterator theTool =
m_tools.begin();
573 tool_store::iterator lastTool =
m_tools.end();
574 while(toolsPassed && theTool!=lastTool )
576 toolsPassed = (*theTool)->passEvent(ctx.eventID());
589 <<
" on slot " << ctx.slot() <<
", " <<
m_proc
590 <<
" events processed so far <<<===" );
594 <<
" on slot " << ctx.slot() <<
", "
596 <<
" events processed so far <<<===" );
611 <<
", slot " << ctx.slot()
612 <<
" to the scheduler" );
616 StatusCode addEventStatus =
m_schedulerSvc->pushNewEvent(
new EventContext{ std::move(ctx) } );
619 if (!addEventStatus.isSuccess()){
620 ATH_MSG_FATAL (
"An event processing slot should be now free in the scheduler, but it appears not to be the case." );
630 Gaudi::Hive::setCurrentContext( EventContext() );
632 return StatusCode::SUCCESS;
643 bool eventfailed =
false;
651 return StatusCode::FAILURE;
654 return StatusCode::SUCCESS;
661 SmartIF<IProperty> appmgr(serviceLocator());
662 if(Gaudi::setAppReturnCode(appmgr, Gaudi::ReturnCode::ScheduledStop,
true).isFailure()) {
663 ATH_MSG_ERROR (
"Could not set return code of the application ("
664 << Gaudi::ReturnCode::ScheduledStop <<
")" );
667 return StatusCode::SUCCESS;
681 StatusCode
sc = MinimalEventLoopMgr::stop();
688 for (
size_t islot = 0; islot < nslot; islot++) {
692 Gaudi::Hive::setCurrentContext( EventContext() );
703 if (0 == maxevt)
return StatusCode::SUCCESS;
706 Gaudi::setAppReturnCode(
m_appMgrProperty, Gaudi::ReturnCode::Success,
true).ignore();
717 bool loop_ended=
false;
718 StatusCode
sc(StatusCode::SUCCESS);
723 auto start_time = tbb::tick_count::now();
724 auto secsFromStart = [&start_time]()->
double{
725 return (tbb::tick_count::now()-start_time).seconds();
728 while ( !loop_ended and ( (maxevt < 0) or (finishedEvts < maxevt) ) ){
733 (newEvtAllowed || createdEvts == 0) &&
734 ( (createdEvts < maxevt) or (maxevt<0) ) &&
741 if ( !ctx.valid() ) {
742 sc = StatusCode::FAILURE;
747 if (
sc.isFailure()) {
748 ATH_MSG_ERROR (
"Terminating event processing loop due to errors" );
767 sc = StatusCode::FAILURE;
768 }
else if (
ir == 0) {
771 sc = StatusCode::SUCCESS;
775 newEvtAllowed =
true;
780 ATH_MSG_INFO (
"---> Loop Finished (seconds): " << secsFromStart() );
797 ATH_MSG_ERROR (
"Seek failed; unsupported by event selector" );
798 return StatusCode::FAILURE;
803 ATH_MSG_FATAL (
"Can not create the event selector Context." );
804 return StatusCode::FAILURE;
810 if (
sc.isSuccess()) {
811 m_incidentSvc->fireIncident(ContextIncident<std::tuple<int, int>>(
812 name(),
"SkipEvents", std::tuple<int, int>(
m_nevt, evt)));
837 ATH_MSG_ERROR (
"Collection size unsupported by event selector" );
843 ATH_MSG_FATAL (
"Can not create the event selector Context." );
858 if(inc.type() ==
"EndAlgorithms") {
863 if( !
sc.isSuccess() ) {
869 if(inc.type()!=
"BeforeFork")
873 ATH_MSG_WARNING (
"Skipping BeforeFork handler. Either no event selector is provided or begin run has already passed" );
885 if(!
sc.isSuccess()) {
889 IOpaqueAddress* addr{
nullptr};
891 if (
sc.isFailure()) {
898 if(!
sc.isSuccess()) {
904 if(
eventStore()->loadEventProxies().isFailure()) {
912 if(!
sc.isSuccess()) {
922 if(!
sc.isSuccess()) {
933 if ( !
sc.isSuccess() ) {
938 if( !
sc.isSuccess() ) {
940 if (
sc.isSuccess() ) {
942 if ( !
sc.isSuccess() ) {
959 StatusCode
sc(StatusCode::SUCCESS);
964 std::unique_ptr<const EventInfo> pEvent{};
971 IOpaqueAddress* addr{};
975 if ( !
sc.isSuccess() ) {
991 if( !
sc.isSuccess() ) {
996 }
if ((
sc=
eventStore()->loadEventProxies()).isFailure()) {
1001 bool consume_modifier_stream =
false;
1005 if ( pAttrList !=
nullptr && pAttrList->size() > 6 ) {
1007 unsigned int runNumber = (*pAttrList)[
"RunNumber"].data<
unsigned int>();
1008 unsigned long long eventNumber = (*pAttrList)[
"EventNumber"].data<
unsigned long long>();
1009 unsigned int eventTime = (*pAttrList)[
"EventTime"].data<
unsigned int>();
1010 unsigned int eventTimeNS = (*pAttrList)[
"EventTimeNanoSec"].data<
unsigned int>();
1011 unsigned int lumiBlock = (*pAttrList)[
"LumiBlockN"].data<
unsigned int>();
1012 unsigned int bunchId = (*pAttrList)[
"BunchId"].data<
unsigned int>();
1015 consume_modifier_stream =
true;
1018 unsigned long long eventNumberSecondary{};
1019 if ( !(pAttrList->exists(
"hasSecondaryInput") && (*pAttrList)[
"hasSecondaryInput"].data<
bool>()) ) {
1020 ATH_MSG_FATAL (
"Secondary EventNumber requested, but secondary input does not exist!" );
1023 if ( pAttrList->exists(
"EventNumber_secondary") ) {
1024 eventNumberSecondary = (*pAttrList)[
"EventNumber_secondary"].data<
unsigned long long>();
1030 if (pEventSecondary) {
1031 eventNumberSecondary = pEventSecondary->
event_ID()->event_number();
1034 ATH_MSG_FATAL (
"Secondary EventNumber requested, but it does not exist!" );
1038 if (eventNumberSecondary != 0) {
1042 ATH_MSG_INFO (
" ===>>> using secondary event #" << eventNumberSecondary <<
" instead of #" << eventNumber <<
" <<<===" );
1044 eventNumber = eventNumberSecondary;
1048 pEvent = std::make_unique<EventInfo>(
1049 std::make_unique<EventID>(runNumber, eventNumber, eventTime,
1050 eventTimeNS, lumiBlock, bunchId),
1055 ATH_MSG_FATAL (
"Valid input attribute list required but not present!" );
1059 const EventInfo* pEventObserver{pEvent.get()};
1060 if (!pEventObserver) {
1065 if (pEventObserver) {
1066 consume_modifier_stream =
false;
1073 if( !
sc.isSuccess() ) {
1077 consume_modifier_stream =
true;
1080 pEvent = std::make_unique<EventInfo>(
1083 pEventObserver = pEvent.get();
1085 if( !
sc.isSuccess() ) {
1093 consume_modifier_stream);
1100 unsigned int runNmb{1}, evtNmb{
m_nevt + 1};
1107 auto eid = std::make_unique<EventID> (runNmb,evtNmb,
m_timeStamp);
1109 eid->set_lumi_block( runNmb );
1113 pEvent = std::make_unique<EventInfo>(std::move(eid),
1114 std::make_unique<EventType>());
1116 bool consume_modifier_stream =
true;
1126 ATH_MSG_DEBUG (
"recording EventInfo " << *pEvent->event_ID() <<
" in "
1130 if( !
sc.isSuccess() ) {
1147 m_evtIdModSvc->modify_evtid(new_eID, ctx.evt(), consume_modifier_stream);
1148 if (msgLevel(MSG::DEBUG)) {
1149 unsigned int oldrunnr=eID.run_number();
1150 unsigned int oldLB=eID.lumi_block();
1151 unsigned int oldTS=eID.time_stamp();
1152 unsigned int oldTSno=eID.time_stamp_ns_offset();
1153 ATH_MSG_DEBUG (
"modifyEventContext: use evtIdModSvc runnr=" << oldrunnr <<
" -> " << new_eID.run_number() );
1154 ATH_MSG_DEBUG (
"modifyEventContext: use evtIdModSvc LB=" << oldLB <<
" -> " << new_eID.lumi_block() );
1155 ATH_MSG_DEBUG (
"modifyEventContext: use evtIdModSvc TimeStamp=" << oldTS <<
" -> " << new_eID.time_stamp() );
1156 ATH_MSG_DEBUG (
"modifyEventContext: use evtIdModSvc TimeStamp ns Offset=" << oldTSno <<
" -> " << new_eID.time_stamp_ns_offset() );
1158 ctx.setEventID( new_eID );
1163 ctx.setEventID( eID );
1172 if (
sc.isFailure()) {
1174 <<
" could not be selected for the WhiteBoard" );
1175 return EventContext{};
1180 ATH_MSG_DEBUG (
"created EventContext, num: " << ctx.evt() <<
" in slot: "
1192 StatusCode
sc(StatusCode::SUCCESS);
1195 std::vector<std::unique_ptr<EventContext>> finishedEvtContexts;
1197 EventContext* finishedEvtContext(
nullptr);
1200 ATH_MSG_DEBUG (
"drainScheduler: [" << finishedEvts <<
"] Waiting for a context" );
1204 if (
sc.isSuccess()){
1205 ATH_MSG_DEBUG (
"drainScheduler: scheduler not empty: Context "
1206 << finishedEvtContext );
1207 finishedEvtContexts.emplace_back(finishedEvtContext);
1215 while (
m_schedulerSvc->tryPopFinishedEvent(finishedEvtContext).isSuccess()){
1216 finishedEvtContexts.emplace_back(finishedEvtContext);
1221 for (
auto& thisFinishedEvtContext : finishedEvtContexts){
1222 if (!thisFinishedEvtContext) {
1223 ATH_MSG_FATAL (
"Detected nullptr ctxt while clearing WB!");
1228 if (
m_aess->eventStatus(*thisFinishedEvtContext) != EventStatus::Success) {
1229 ATH_MSG_FATAL (
"Failed event detected on " << thisFinishedEvtContext
1230 <<
" w/ fail mode: "
1231 <<
m_aess->eventStatus(*thisFinishedEvtContext) );
1237 EventID::event_number_t n_evt(0);
1239 if (
m_whiteboard->selectStore(thisFinishedEvtContext->slot()).isSuccess()) {
1240 n_run = thisFinishedEvtContext->eventID().run_number();
1241 n_evt = thisFinishedEvtContext->eventID().event_number();
1244 << thisFinishedEvtContext->slot() );
1253 Gaudi::Hive::setCurrentContext( *thisFinishedEvtContext );
1254 m_incidentSvc->fireIncident(Incident(
name(), IncidentType::EndProcessing, *thisFinishedEvtContext ));
1256 ATH_MSG_DEBUG (
"Clearing slot " << thisFinishedEvtContext->slot()
1257 <<
" (event " << thisFinishedEvtContext->evt()
1258 <<
") of the whiteboard" );
1260 StatusCode
sc =
clearWBSlot(thisFinishedEvtContext->slot());
1261 if (!
sc.isSuccess()) {
1262 ATH_MSG_ERROR (
"Whiteboard slot " << thisFinishedEvtContext->slot()
1263 <<
" could not be properly cleared" );
1275 ATH_MSG_INFO (
" ===>>> done processing event #" << n_evt <<
", run #" << n_run
1276 <<
" on slot " << thisFinishedEvtContext->slot() <<
", "
1277 <<
m_proc <<
" events processed so far <<<===" );
1279 ATH_MSG_INFO (
" ===>>> done processing event #" << n_evt <<
", run #" << n_run
1280 <<
" on slot " << thisFinishedEvtContext->slot() <<
", "
1282 <<
" events processed so far <<<===" );
1283 std::ofstream outfile(
"eventLoopHeartBeat.txt");
1285 ATH_MSG_ERROR (
" unable to open: eventLoopHeartBeat.txt" );
1289 outfile <<
" done processing event #" << n_evt <<
", run #" << n_run
1290 <<
" " <<
m_nev <<
" events read so far <<<===" << std::endl;
1295 ATH_MSG_DEBUG (
"drainScheduler thisFinishedEvtContext: " << thisFinishedEvtContext );
1298 return ( fail ? -1 : 1 );
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_ALWAYS(x)
#define ATH_MSG_WARNING(x)
The default ATLAS batch event loop manager.
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
Assign a CLID to EventContext.
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
EventID eventIDFromxAOD(const xAOD::EventInfo *xaod)
Create EventID object from xAOD::EventInfo.
EventType eventTypeFromxAOD(const xAOD::EventInfo *xaod)
Create EventType object from xAOD::EventInfo.
This class provides general information about an event.
Abstract interface for seeking within an event stream.
Extension to IEvtSelector to allow for seeking.
void setProperty(columnar::PythonToolHandle &self, const std::string &key, nb::object value)
An AttributeList represents a logical row of attributes in a metadata table.
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
An AttributeList represents a logical row of attributes in a metadata table.
UnsignedIntegerProperty m_eventPrintoutInterval
IEvtSelector * m_evtSelector
Reference to the Event Selector.
virtual StatusCode stopRun() override
implementation of IEventProcessor::stopRun()
virtual void handle(const Incident &inc) override
IIncidentListenet interfaces.
ServiceHandle< IConversionSvc > IConversionSvc_t
virtual StatusCode initialize() override
implementation of IAppMgrUI::initalize
IntegerProperty m_failureMode
SmartIF< IHiveWhiteBoard > m_whiteboard
Reference to the Whiteboard interface.
StatusCode getEventRoot(IOpaqueAddress *&refpAddr)
Create event address using event selector.
IConversionSvc_t m_histoPersSvc
int drainScheduler(int &finishedEvents)
Drain the scheduler from all actions that may be queued.
number_type m_currentRun
current run number
virtual int size() override
Return the size of the collection.
SmartIF< IAlgExecStateSvc > m_aess
Reference to the Algorithm Execution State Svc.
virtual const std::string & name() const override
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.
StoreGateSvc * eventStore() const
tool_stats m_toolAccept
tool returns StatusCode::SUCCESS counter
virtual StatusCode executeRun(int maxevt) override
implementation of IEventProcessor::executeRun(int maxevt)
tool_store::const_iterator tool_iterator
unsigned int m_nev
events processed
tool_stats m_toolInvoke
tool called counter
IIncidentSvc_t m_incidentSvc
Reference to the incident service.
virtual StatusCode stop() override
implementation of IService::stop
bool m_useSecondaryEventNumber
read event number from secondary input
bool m_requireInputAttributeList
require input attribute list
SmartIF< IProperty > m_appMgrProperty
Property interface of ApplicationMgr.
StoreGateSvc_t m_eventStore
Reference to StoreGateSvc;.
StringProperty m_histPersName
EvtContext * m_evtContext
Gaudi event selector Context (may be used as a cursor by the evt selector)
virtual StatusCode seek(int evt) override
Seek to a given event.
int declareEventRootAddress(EventContext &)
Declare the root address of the event.
AthenaHiveEventLoopMgr()=delete
virtual StatusCode finalize() override
implementation of IAppMgrUI::finalize
virtual StatusCode executeEvent(EventContext &&ctx) override
implementation of IEventProcessor::executeEvent(void* par)
IDataManagerSvc_t m_histoDataMgrSvc
Reference to the Histogram Data Service.
EventContext m_lastEventContext
bool m_scheduledStop
Scheduled stop of event processing.
virtual EventContext createEventContext() override
Create event context.
StatusCode initializeAlgorithms()
Initialize all algorithms and output streams.
virtual ~AthenaHiveEventLoopMgr()
Standard Destructor.
StatusCode clearWBSlot(int evtSlot)
Clear a slot in the WB.
ServiceHandle< Athena::IConditionsCleanerSvc > m_conditionsCleaner
tool_store m_tools
internal tool store
virtual void modifyEventContext(EventContext &ctx, const EventID &eID, bool consume_modifier_stream)
virtual StatusCode writeHistograms(bool force=false)
Dump out histograms as needed.
void setupPreSelectTools(Gaudi::Details::PropertyBase &)
property update handler:sets up the Pre-selection tools
SmartIF< IScheduler > m_schedulerSvc
A shortcut for the scheduler.
virtual int curEvent() const override
Return the current event count.
tool_stats m_toolReject
tool returns StatusCode::FAILURE counter
IEvtIdModifierSvc_t m_evtIdModSvc
SmartIF< IAlgResourcePool > m_algResourcePool
Reference to the Algorithm resource pool.
virtual StatusCode nextEvent(int maxevt) override
implementation of IAppMgrUI::nextEvent. maxevt==0 returns immediately
virtual StatusCode executeAlgorithms()
Run the algorithms for the current event.
unsigned int m_timeStampInt
void resetTimeout(Timeout &instance)
Reset timeout.
static Timeout & instance()
Get reference to Timeout singleton.
void setConditionsRun(EventIDBase::number_type conditionsRun)
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
EventIDBase::number_type number_type
EventID * event_ID()
the unique identification of the event.
Abstract interface for seeking for an event selector.
virtual StatusCode seek(IEvtSelector::Context &c, int evtnum) const =0
Seek to a given event number.
virtual int size(IEvtSelector::Context &c) const =0
Return the size of the collection, or -1 if we can't get the size.
The Athena Transient Store API.
StatusCode recordAddress(const std::string &skey, CxxUtils::RefCountedPtr< IOpaqueAddress > pAddress, bool clearAddressFlag=true)
Create a proxy object using an IOpaqueAddress and a transient key.
StatusCode record(T *p2BRegistered, const TKEY &key)
Record an object with a key.
const T * tryConstRetrieve() const
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
virtual StatusCode clearStore(bool forceRemove=false) override final
clear DataStore contents: called by the event loop mgrs
uint32_t runNumber() const
The current event's run number.
int ir
counter of the current depth
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
void setExtendedEventContext(EventContext &ctx, ExtendedEventContext &&ectx)
Move an extended context into a context object.
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
thread_local event_number_t eventIndex
EventInfo_v1 EventInfo
Definition of the latest event info version.