Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
IAthenaMPTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ATHENAMPTOOLS_IATHENAMPTOOL_H
6 #define ATHENAMPTOOLS_IATHENAMPTOOL_H
7 
8 #include "GaudiKernel/IAlgTool.h"
11 
12 #include <memory>
13 #include <vector>
14 #include <map>
15 
16 namespace AthenaInterprocess {
17  class IMPRunStop;
18 }
19 
20 namespace AthenaMP {
21  struct WorkerOutput{
22  std::string filename;
23  std::string technology;
24  std::string description;
25  std::string access_mode;
26  bool shared;
27  };
28  typedef std::vector<WorkerOutput> SingleWorkerOutputs;
29  typedef std::map<std::string,SingleWorkerOutputs> AllWorkerOutputs;
31 
32  typedef std::unique_ptr<AllWorkerOutputs> AllWorkerOutputs_ptr;
33 }
34 
35 static const InterfaceID IID_IAthenaMPTool( "IAthenaMPTool", 1, 0 );
36 
37 class IAthenaMPTool : virtual public IAlgTool
38 {
39  public:
40  static const InterfaceID& interfaceID() { return IID_IAthenaMPTool; }
41 
42  // Returns number of children processes in the pool. -1 in case of failure
43  virtual int makePool ATLAS_NOT_THREAD_SAFE (int maxevt, int nprocs, const std::string& topdir) = 0;
44 
46 
47  // Pid of the finished process, 0 if no process finished, <0 if wait on the group failed
48  virtual StatusCode wait_once ATLAS_NOT_THREAD_SAFE (pid_t& pid) = 0;
49 
50  virtual void reportSubprocessStatuses() = 0;
51  virtual void subProcessLogs(std::vector<std::string>&) = 0;
53 
54  virtual void useFdsRegistry(std::shared_ptr<AthenaInterprocess::FdsRegistry>) = 0;
55  virtual void setRandString(const std::string& randStr) = 0;
56  virtual void setMaxEvt(int maxEvt) = 0;
57  virtual void setMPRunStop(const AthenaInterprocess::IMPRunStop* runStop) = 0;
58 
59  // Brute force: kill all children
60  virtual void killChildren() = 0;
61 };
62 
63 #endif
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
IAthenaMPTool::setMaxEvt
virtual void setMaxEvt(int maxEvt)=0
pid_t
int32_t pid_t
Definition: FPGATrackSimTypes.h:19
AthenaInterprocess
Definition: FdsRegistry.h:11
IAthenaMPTool::useFdsRegistry
virtual void useFdsRegistry(std::shared_ptr< AthenaInterprocess::FdsRegistry >)=0
IAthenaMPTool::reportSubprocessStatuses
virtual void reportSubprocessStatuses()=0
IAthenaMPTool::generateOutputReport
virtual AthenaMP::AllWorkerOutputs_ptr generateOutputReport()=0
AthenaMP::WorkerOutput::description
std::string description
Definition: IAthenaMPTool.h:24
IAthenaMPTool::interfaceID
static const InterfaceID & interfaceID()
Definition: IAthenaMPTool.h:40
IAthenaMPTool::setMPRunStop
virtual void setMPRunStop(const AthenaInterprocess::IMPRunStop *runStop)=0
IAthenaMPTool::subProcessLogs
virtual void subProcessLogs(std::vector< std::string > &)=0
AthenaMP::AllWorkerOutputsIterator
AllWorkerOutputs::iterator AllWorkerOutputsIterator
Definition: IAthenaMPTool.h:30
AthenaMP::SingleWorkerOutputs
std::vector< WorkerOutput > SingleWorkerOutputs
Definition: IAthenaMPTool.h:28
LHEonly.nprocs
nprocs
Definition: LHEonly.py:17
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArG4FSStartPointFilter.exec
exec
Definition: LArG4FSStartPointFilter.py:103
AthenaMP::WorkerOutput::shared
bool shared
Definition: IAthenaMPTool.h:26
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
AthenaMP::WorkerOutput::access_mode
std::string access_mode
Definition: IAthenaMPTool.h:25
IAthenaMPTool
Definition: IAthenaMPTool.h:38
IAthenaMPTool::ATLAS_NOT_THREAD_SAFE
virtual StatusCode wait_once ATLAS_NOT_THREAD_SAFE(pid_t &pid)=0
IAthenaMPTool::ATLAS_NOT_THREAD_SAFE
virtual int makePool ATLAS_NOT_THREAD_SAFE(int maxevt, int nprocs, const std::string &topdir)=0
IAthenaMPTool::killChildren
virtual void killChildren()=0
FdsRegistry.h
AthenaMP::WorkerOutput::technology
std::string technology
Definition: IAthenaMPTool.h:23
AthenaMP::AllWorkerOutputs_ptr
std::unique_ptr< AllWorkerOutputs > AllWorkerOutputs_ptr
Definition: IAthenaMPTool.h:32
AthenaMP::WorkerOutput
Definition: IAthenaMPTool.h:21
IAthenaMPTool::ATLAS_NOT_THREAD_SAFE
virtual StatusCode exec ATLAS_NOT_THREAD_SAFE()=0
checker_macros.h
Define macros for attributes used to control the static checker.
AthenaInterprocess::IMPRunStop
Definition: IMPRunStop.h:10
AthenaMP::AllWorkerOutputs
std::map< std::string, SingleWorkerOutputs > AllWorkerOutputs
Definition: IAthenaMPTool.h:29
IAthenaMPTool::setRandString
virtual void setRandString(const std::string &randStr)=0
AthenaMP
Definition: IAthenaMPTool.h:20
AthenaMP::WorkerOutput::filename
std::string filename
Definition: IAthenaMPTool.h:22