Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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"
13 #include <memory>
14 
15 class IAthenaMPTool;
16 class ISvcLocator;
17 
18 class ATLAS_NOT_THREAD_SAFE AthMpEvtLoopMgr : public extends<AthService,
19  IEventProcessor,
20  AthenaInterprocess::IMPRunStop>
21 {
22  public:
23  AthMpEvtLoopMgr(const std::string& name, ISvcLocator* svcLocator);
24  virtual ~AthMpEvtLoopMgr();
25 
26  virtual StatusCode initialize() override;
27  virtual StatusCode finalize() override;
28 
29  virtual StatusCode nextEvent(int maxevt) override;
30  virtual StatusCode executeEvent(EventContext &&ctx) override;
31  virtual StatusCode executeRun(int maxevt) override;
32  virtual StatusCode stopRun() override;
33 
34  virtual EventContext createEventContext() override;
35 
36  virtual bool stopScheduled() const override {return m_scheduledStop;};
37 
38  private:
40  SmartIF<IService> m_evtSelector;
42  std::string m_workerTopDir;
43  std::string m_outputReportName;
44  std::string m_strategy;
45  bool m_isPileup;
47  ToolHandleArray<IAthenaMPTool> m_tools;
49  int m_nPollingInterval; // in milliseconds
50  int m_nMemSamplingInterval; // in seconds
53  StringArrayProperty m_execAtPreFork;
55  bool m_scheduledStop{false};
56 
57  // vectors for collecting memory samples
58  std::vector<unsigned long> m_samplesRss;
59  std::vector<unsigned long> m_samplesPss;
60  std::vector<unsigned long> m_samplesSize;
61  std::vector<unsigned long> m_samplesSwap;
62 
66 
67  StatusCode wait();
68  StatusCode generateOutputReport();
69  std::shared_ptr<AthenaInterprocess::FdsRegistry> extractFds();
70  StatusCode updateSkipEvents(int skipEvents);
71 };
72 
73 #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:52
AthMpEvtLoopMgr::m_isPileup
bool m_isPileup
Definition: AthMpEvtLoopMgr.h:45
AthMpEvtLoopMgr::stopScheduled
virtual bool stopScheduled() const override
Definition: AthMpEvtLoopMgr.h:36
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
columnar::operator=
AccessorTemplate & operator=(AccessorTemplate &&that)
Definition: VectorColumn.h:88
AthMpEvtLoopMgr::m_nPollingInterval
int m_nPollingInterval
Definition: AthMpEvtLoopMgr.h:49
initialize
void initialize()
Definition: run_EoverP.cxx:894
AthMpEvtLoopMgr::m_samplesRss
std::vector< unsigned long > m_samplesRss
Definition: AthMpEvtLoopMgr.h:58
AthMpEvtLoopMgr::m_nChildProcesses
int m_nChildProcesses
Definition: AthMpEvtLoopMgr.h:48
AthMpEvtLoopMgr::m_nEventsBeforeFork
int m_nEventsBeforeFork
Definition: AthMpEvtLoopMgr.h:51
AthMpEvtLoopMgr::m_tools
ToolHandleArray< IAthenaMPTool > m_tools
Definition: AthMpEvtLoopMgr.h:47
AthMpEvtLoopMgr::m_samplesSize
std::vector< unsigned long > m_samplesSize
Definition: AthMpEvtLoopMgr.h:60
AthMpEvtLoopMgr::m_outputReportName
std::string m_outputReportName
Definition: AthMpEvtLoopMgr.h:43
AthMpEvtLoopMgr::m_nWorkers
int m_nWorkers
Definition: AthMpEvtLoopMgr.h:41
jetMakeRefSamples.skipEvents
int skipEvents
Definition: jetMakeRefSamples.py:56
AthMpEvtLoopMgr::m_workerTopDir
std::string m_workerTopDir
Definition: AthMpEvtLoopMgr.h:42
AthMpEvtLoopMgr::m_samplesPss
std::vector< unsigned long > m_samplesPss
Definition: AthMpEvtLoopMgr.h:59
AthMpEvtLoopMgr::m_evtSelector
SmartIF< IService > m_evtSelector
Definition: AthMpEvtLoopMgr.h:40
AthMpEvtLoopMgr::m_nMemSamplingInterval
int m_nMemSamplingInterval
Definition: AthMpEvtLoopMgr.h:50
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:61
IAthenaMPTool
Definition: IAthenaMPTool.h:38
AthMpEvtLoopMgr::m_strategy
std::string m_strategy
Definition: AthMpEvtLoopMgr.h:44
AthMpEvtLoopMgr::AthMpEvtLoopMgr
AthMpEvtLoopMgr()
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
FdsRegistry.h
AthMpEvtLoopMgr::m_execAtPreFork
StringArrayProperty m_execAtPreFork
Definition: AthMpEvtLoopMgr.h:53
AthMpEvtLoopMgr
Definition: AthMpEvtLoopMgr.h:21
AthService.h
AthMpEvtLoopMgr::m_masterPid
pid_t m_masterPid
Definition: AthMpEvtLoopMgr.h:54
AthMpEvtLoopMgr::m_evtProcessor
ServiceHandle< IEventProcessor > m_evtProcessor
Definition: AthMpEvtLoopMgr.h:36
IMPRunStop.h
AthMpEvtLoopMgr::m_collectSubprocessLogs
bool m_collectSubprocessLogs
Definition: AthMpEvtLoopMgr.h:46
ServiceHandle< IEventProcessor >