ATLAS Offline Software
IAthenaMPTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 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 AthenaMP {
17  struct WorkerOutput{
18  std::string filename;
19  std::string technology;
20  std::string description;
21  std::string access_mode;
22  bool shared;
23  };
24  typedef std::vector<WorkerOutput> SingleWorkerOutputs;
25  typedef std::map<std::string,SingleWorkerOutputs> AllWorkerOutputs;
27 
28  typedef std::unique_ptr<AllWorkerOutputs> AllWorkerOutputs_ptr;
29 }
30 
31 static const InterfaceID IID_IAthenaMPTool( "IAthenaMPTool", 1, 0 );
32 
33 class IAthenaMPTool : virtual public IAlgTool
34 {
35  public:
36  static const InterfaceID& interfaceID() { return IID_IAthenaMPTool; }
37 
38  // Returns number of children processes in the pool. -1 in case of failure
39  virtual int makePool ATLAS_NOT_THREAD_SAFE (int maxevt, int nprocs, const std::string& topdir) = 0;
40 
42 
43  // Pid of the finished process, 0 if no process finished, <0 if wait on the group failed
44  virtual StatusCode wait_once ATLAS_NOT_THREAD_SAFE (pid_t& pid) = 0;
45 
46  virtual void reportSubprocessStatuses() = 0;
47  virtual void subProcessLogs(std::vector<std::string>&) = 0;
49 
50  virtual void useFdsRegistry(std::shared_ptr<AthenaInterprocess::FdsRegistry>) = 0;
51  virtual void setRandString(const std::string& randStr) = 0;
52 
53  // Brute force: kill all children
54  virtual void killChildren() = 0;
55 };
56 
57 #endif
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
pid_t
int32_t pid_t
Definition: FPGATrackSimTypes.h:19
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:20
IAthenaMPTool::interfaceID
static const InterfaceID & interfaceID()
Definition: IAthenaMPTool.h:36
IAthenaMPTool::subProcessLogs
virtual void subProcessLogs(std::vector< std::string > &)=0
AthenaMP::AllWorkerOutputsIterator
AllWorkerOutputs::iterator AllWorkerOutputsIterator
Definition: IAthenaMPTool.h:26
AthenaMP::SingleWorkerOutputs
std::vector< WorkerOutput > SingleWorkerOutputs
Definition: IAthenaMPTool.h:24
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:22
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
AthenaMP::WorkerOutput::access_mode
std::string access_mode
Definition: IAthenaMPTool.h:21
IAthenaMPTool
Definition: IAthenaMPTool.h:34
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:19
AthenaMP::AllWorkerOutputs_ptr
std::unique_ptr< AllWorkerOutputs > AllWorkerOutputs_ptr
Definition: IAthenaMPTool.h:28
AthenaMP::WorkerOutput
Definition: IAthenaMPTool.h:17
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.
AthenaMP::AllWorkerOutputs
std::map< std::string, SingleWorkerOutputs > AllWorkerOutputs
Definition: IAthenaMPTool.h:25
IAthenaMPTool::setRandString
virtual void setRandString(const std::string &randStr)=0
AthenaMP
Definition: IAthenaMPTool.h:16
AthenaMP::WorkerOutput::filename
std::string filename
Definition: IAthenaMPTool.h:18