ATLAS Offline Software
AthMpEvtLoopMgr.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ATHENAMP_ATHMPEVTLOOPMGR_H
6 #define ATHENAMP_ATHMPEVTLOOPMGR_H
7 
8 #include "GaudiKernel/IEventProcessor.h"
10 #include "GaudiKernel/ToolHandle.h"
12 #include <memory>
13 
14 class IAthenaMPTool;
15 class ISvcLocator;
16 
17 class ATLAS_NOT_THREAD_SAFE AthMpEvtLoopMgr : public extends<AthService,
18  IEventProcessor>
19 {
20  public:
21  AthMpEvtLoopMgr(const std::string& name, ISvcLocator* svcLocator);
22  virtual ~AthMpEvtLoopMgr();
23 
24  virtual StatusCode initialize() override;
25  virtual StatusCode finalize() override;
26 
27  virtual StatusCode nextEvent(int maxevt) override;
28  virtual StatusCode executeEvent(EventContext &&ctx) override;
29  virtual StatusCode executeRun(int maxevt) override;
30  virtual StatusCode stopRun() override;
31 
32  virtual EventContext createEventContext() override;
33 
34  private:
36  SmartIF<IService> m_evtSelector;
38  std::string m_workerTopDir;
39  std::string m_outputReportName;
40  std::string m_strategy;
41  bool m_isPileup;
43  ToolHandleArray<IAthenaMPTool> m_tools;
45  int m_nPollingInterval; // in milliseconds
46  int m_nMemSamplingInterval; // in seconds
49  StringArrayProperty m_execAtPreFork;
51 
52  // vectors for collecting memory samples
53  std::vector<unsigned long> m_samplesRss;
54  std::vector<unsigned long> m_samplesPss;
55  std::vector<unsigned long> m_samplesSize;
56  std::vector<unsigned long> m_samplesSwap;
57 
60  AthMpEvtLoopMgr& operator = (const AthMpEvtLoopMgr&);
61 
62  StatusCode wait();
63  StatusCode generateOutputReport();
64  std::shared_ptr<AthenaInterprocess::FdsRegistry> extractFds();
65  StatusCode updateSkipEvents(int skipEvents);
66 };
67 
68 #endif
AthMpEvtLoopMgr::AthMpEvtLoopMgr
AthMpEvtLoopMgr(const AthMpEvtLoopMgr &)
pid_t
int32_t pid_t
Definition: FPGATrackSimTypes.h:19
AthMpEvtLoopMgr::m_eventPrintoutInterval
unsigned int m_eventPrintoutInterval
Definition: AthMpEvtLoopMgr.h:48
AthMpEvtLoopMgr::m_isPileup
bool m_isPileup
Definition: AthMpEvtLoopMgr.h:41
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
AthMpEvtLoopMgr::m_nPollingInterval
int m_nPollingInterval
Definition: AthMpEvtLoopMgr.h:45
initialize
void initialize()
Definition: run_EoverP.cxx:894
AthMpEvtLoopMgr::m_samplesRss
std::vector< unsigned long > m_samplesRss
Definition: AthMpEvtLoopMgr.h:53
AthMpEvtLoopMgr::m_nChildProcesses
int m_nChildProcesses
Definition: AthMpEvtLoopMgr.h:44
AthMpEvtLoopMgr::m_nEventsBeforeFork
int m_nEventsBeforeFork
Definition: AthMpEvtLoopMgr.h:47
AthMpEvtLoopMgr::m_tools
ToolHandleArray< IAthenaMPTool > m_tools
Definition: AthMpEvtLoopMgr.h:43
AthMpEvtLoopMgr::m_samplesSize
std::vector< unsigned long > m_samplesSize
Definition: AthMpEvtLoopMgr.h:55
AthMpEvtLoopMgr::m_outputReportName
std::string m_outputReportName
Definition: AthMpEvtLoopMgr.h:39
AthMpEvtLoopMgr::m_nWorkers
int m_nWorkers
Definition: AthMpEvtLoopMgr.h:37
jetMakeRefSamples.skipEvents
int skipEvents
Definition: jetMakeRefSamples.py:56
AthMpEvtLoopMgr::m_workerTopDir
std::string m_workerTopDir
Definition: AthMpEvtLoopMgr.h:38
AthMpEvtLoopMgr::m_samplesPss
std::vector< unsigned long > m_samplesPss
Definition: AthMpEvtLoopMgr.h:54
AthMpEvtLoopMgr::m_evtSelector
SmartIF< IService > m_evtSelector
Definition: AthMpEvtLoopMgr.h:36
AthMpEvtLoopMgr::m_nMemSamplingInterval
int m_nMemSamplingInterval
Definition: AthMpEvtLoopMgr.h:46
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthMpEvtLoopMgr::m_samplesSwap
std::vector< unsigned long > m_samplesSwap
Definition: AthMpEvtLoopMgr.h:56
IAthenaMPTool
Definition: IAthenaMPTool.h:34
AthMpEvtLoopMgr::m_strategy
std::string m_strategy
Definition: AthMpEvtLoopMgr.h:40
AthMpEvtLoopMgr::AthMpEvtLoopMgr
AthMpEvtLoopMgr()
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
FdsRegistry.h
AthMpEvtLoopMgr::m_execAtPreFork
StringArrayProperty m_execAtPreFork
Definition: AthMpEvtLoopMgr.h:49
AthMpEvtLoopMgr
Definition: AthMpEvtLoopMgr.h:19
AthService.h
AthMpEvtLoopMgr::m_masterPid
pid_t m_masterPid
Definition: AthMpEvtLoopMgr.h:50
AthMpEvtLoopMgr::m_evtProcessor
ServiceHandle< IEventProcessor > m_evtProcessor
Definition: AthMpEvtLoopMgr.h:35
AthMpEvtLoopMgr::m_collectSubprocessLogs
bool m_collectSubprocessLogs
Definition: AthMpEvtLoopMgr.h:42
ServiceHandle< IEventProcessor >