5 #ifndef ATHENAMP_ATHMPEVTLOOPMGR_H
6 #define ATHENAMP_ATHMPEVTLOOPMGR_H
8 #include "GaudiKernel/IEventProcessor.h"
10 #include "GaudiKernel/ToolHandle.h"
21 AthenaInterprocess::IMPRunStop>
35 virtual StatusCode nextEvent(
int maxevt)
override;
36 virtual StatusCode executeEvent(EventContext &&ctx)
override;
37 virtual StatusCode executeRun(
int maxevt)
override;
40 virtual EventContext createEventContext()
override;
46 SmartIF<IService> m_evtSelector{
nullptr};
49 Gaudi::Property<int> m_nWorkers{
this,
"NWorkers", 0,
50 "Number of AthenaMP worker processes"};
52 Gaudi::Property<std::string> m_workerTopDir{
this,
"WorkerTopDir",
"athenaMP_workers",
53 "Sub-directory of the main run directory that contains run directories of all workers"};
55 Gaudi::Property<std::string> m_outputReportName{
this,
"OutputReportFile",
"AthenaMPOutputs",
56 "ASCII file in the main run directory that lists outputs of all workers. Used by Job Transform"};
58 Gaudi::Property<std::string> m_strategy{
this,
"Strategy",
"",
59 "Event processing strategy used by AthenaMP workers. E.g, Shared Queue, Round Robin"};
61 Gaudi::Property<bool> m_isPileup{
this,
"IsPileup",
false,
62 "Is AthenaMP running a PileUp Digitization job?"};
64 Gaudi::Property<bool> m_collectSubprocessLogs{
this,
"CollectSubprocessLogs",
false,
65 "Copy all workers' logs into the main log file at the end of the job?"};
67 ToolHandleArray<IAthenaMPTool> m_tools{
this,
"Tools", {}};
69 Gaudi::Property<int> m_nPollingInterval{
this,
"PollingInterval", 100,
70 "Interval in milliseconds between checks of sub-processes statuses"};
72 Gaudi::Property<int> m_nMemSamplingInterval{
this,
"MemSamplingInterval", 0,
73 "Interval in seconds between taking memory usage samples. 0 - no sampling"};
75 Gaudi::Property<int> m_nEventsBeforeFork{
this,
"EventsBeforeFork", 0,
76 "Number of events to be processed by the main process before forking the workers. 0 - fork after BeginRun incident"};
78 Gaudi::Property<unsigned int> m_eventPrintoutInterval{
this,
"EventPrintoutInterval", 1,
79 "The value to be forwarded to the EventPrintoutInterval property of the AthenaEventLoopMgr"};
81 StringArrayProperty m_execAtPreFork{
this,
"ExecAtPreFork", {},
82 "The value to be forwarded to the ExecAtPreFork property of the AthenaEventLoopMgr"};
84 int m_nChildProcesses{0};
86 bool m_scheduledStop{
false};
96 std::shared_ptr<AthenaInterprocess::FdsRegistry> extractFds();