ATLAS Offline Software
MPIHiveEventLoopMgr.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef ATHENASERVICES_MPIHIVEEVENTLOOPMGR_H
8 #define ATHENASERVICES_MPIHIVEEVENTLOOPMGR_H
9 
14 // Base class headers
15 #include "AthenaHiveEventLoopMgr.h"
16 
17 // Athena headers
19 #include "EventInfo/EventID.h" /* number_type */
20 
21 // Gaudi headers
22 #include "Gaudi/Property.h"
23 
24 // Standard includes
25 #include <string>
26 
35  // for Hive
36  protected:
38  ServiceHandle<IMPIClusterSvc> m_clusterSvc{this, "MPIClusterSvc", "",
39  "MPIClusterSvc"};
40 
44  StatusCode insertEvent(int eventIdx, bool& endOfStream,
45  std::int64_t requestTime_ns);
49  StatusCode masterEventLoop(int maxEvt);
50 
51  // Keeps track of events already processed
55 
56  public:
58  MPIHiveEventLoopMgr(const std::string& name, ISvcLocator* svcLoc);
62  virtual StatusCode initialize() override;
64  virtual StatusCode finalize() override;
66  virtual StatusCode nextEvent(int maxevt) override;
67 
68  private:
70  UnsignedIntegerProperty m_firstEventIndex{
71  this, "FirstEventIndex", 0, "First event index (Exec.SkipEvents)"};
73 
74  StoreGateSvc* eventStore() const;
75 };
76 
77 #endif // ATHENASERVICES_MPIHIVEEVENTLOOPMGR_H
MPIHiveEventLoopMgr::insertEvent
StatusCode insertEvent(int eventIdx, bool &endOfStream, std::int64_t requestTime_ns)
Insert an event into the local scheduler.
Definition: MPIHiveEventLoopMgr.cxx:324
AthenaHiveEventLoopMgr
The default ATLAS batch event loop manager.
Definition: AthenaHiveEventLoopMgr.h:72
MPIHiveEventLoopMgr::m_evtSelectorCurrentPos
int m_evtSelectorCurrentPos
Definition: MPIHiveEventLoopMgr.h:72
AthenaHiveEventLoopMgr::name
virtual const std::string & name() const override
Definition: AthenaHiveEventLoopMgr.h:228
MPIHiveEventLoopMgr::MPIHiveEventLoopMgr
MPIHiveEventLoopMgr(const std::string &name, ISvcLocator *svcLoc)
Standard Constructor.
Definition: MPIHiveEventLoopMgr.cxx:21
MPIHiveEventLoopMgr
The MPI event loop manager.
Definition: MPIHiveEventLoopMgr.h:34
AthenaHiveEventLoopMgr.h
The default ATLAS batch event loop manager.
MPIHiveEventLoopMgr::~MPIHiveEventLoopMgr
virtual ~MPIHiveEventLoopMgr()
Standard Destructor.
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:120
EventID.h
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
MPIHiveEventLoopMgr::workerEventLoop
StatusCode workerEventLoop()
Worker event loop (runs on worker, requests events over MPI)
Definition: MPIHiveEventLoopMgr.cxx:210
MPIHiveEventLoopMgr::m_nLocalFinishedEvts
int m_nLocalFinishedEvts
Definition: MPIHiveEventLoopMgr.h:54
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MPIHiveEventLoopMgr::m_firstEventIndex
UnsignedIntegerProperty m_firstEventIndex
Definition: MPIHiveEventLoopMgr.h:70
MPIHiveEventLoopMgr::masterEventLoop
StatusCode masterEventLoop(int maxEvt)
Master event loop (runs on master, provides events over MPI)
Definition: MPIHiveEventLoopMgr.cxx:62
MPIHiveEventLoopMgr::drainLocalScheduler
StatusCode drainLocalScheduler()
Drain the local scheduler of any (at least one) completed events.
Definition: MPIHiveEventLoopMgr.cxx:355
MPIHiveEventLoopMgr::initialize
virtual StatusCode initialize() override
implementation of IAppMgrUI::initalize
Definition: MPIHiveEventLoopMgr.cxx:30
MPIHiveEventLoopMgr::finalize
virtual StatusCode finalize() override
implementation of IAppMgrUI::finalize
Definition: MPIHiveEventLoopMgr.cxx:38
MPIHiveEventLoopMgr::m_nLocalCreatedEvts
int m_nLocalCreatedEvts
Definition: MPIHiveEventLoopMgr.h:52
MPIHiveEventLoopMgr::m_clusterSvc
ServiceHandle< IMPIClusterSvc > m_clusterSvc
Reference to the MPIClusterSvc.
Definition: MPIHiveEventLoopMgr.h:38
IMPIClusterSvc.h
MPIHiveEventLoopMgr::eventStore
StoreGateSvc * eventStore() const
Definition: MPIHiveEventLoopMgr.cxx:483
MPIHiveEventLoopMgr::nextEvent
virtual StatusCode nextEvent(int maxevt) override
implementation of IAppMgrUI::nextEvent. maxevt==0 returns immediately
Definition: MPIHiveEventLoopMgr.cxx:44
ServiceHandle< IMPIClusterSvc >
MPIHiveEventLoopMgr::m_nLocalSkippedEvts
int m_nLocalSkippedEvts
Definition: MPIHiveEventLoopMgr.h:53