ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
SharedWriterTool Class Referencefinalabstract

#include <SharedWriterTool.h>

Inheritance diagram for SharedWriterTool:
Collaboration diagram for SharedWriterTool:

Public Member Functions

 SharedWriterTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~SharedWriterTool () override
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
virtual int makePool ATLAS_NOT_THREAD_SAFE (int maxevt, int nprocs, const std::string &topdir) override
 
virtual StatusCode exec ATLAS_NOT_THREAD_SAFE () override
 
virtual void subProcessLogs (std::vector< std::string > &) override
 
virtual AthenaMP::AllWorkerOutputs_ptr generateOutputReport () override
 
virtual std::unique_ptr< AthenaInterprocess::ScheduledWorkbootstrap_func () override
 
virtual std::unique_ptr< AthenaInterprocess::ScheduledWorkexec_func () override
 
virtual std::unique_ptr< AthenaInterprocess::ScheduledWorkfin_func () override
 
virtual StatusCode wait_once ATLAS_NOT_THREAD_SAFE (pid_t &pid) override
 
virtual void reportSubprocessStatuses () override
 
virtual void useFdsRegistry (std::shared_ptr< AthenaInterprocess::FdsRegistry >) override
 
virtual void setRandString (const std::string &randStr) override
 
virtual void killChildren () override
 
virtual std::unique_ptr< AthenaInterprocess::ScheduledWork > virtual operator() ATLAS_NOT_THREAD_SAFE(const AthenaInterprocess std::unique_ptr< AthenaInterprocess::ScheduledWorkbootstrap_func ()=0
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 
virtual std::unique_ptr< ScheduledWork > operator () ATLAS_NOT_THREAD_SAFE(const ScheduledWork &)=0
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Types

enum  ESRange_Status {
  ESRANGE_SUCCESS, ESRANGE_NOTFOUND, ESRANGE_SEEKFAILED, ESRANGE_PROCFAILED,
  ESRANGE_FILENOTMADE, ESRANGE_BADINPFILE
}
 
enum  Func_Flag { FUNC_BOOTSTRAP, FUNC_EXEC, FUNC_FIN }
 

Protected Member Functions

int mapAsyncFlag ATLAS_NOT_THREAD_SAFE (Func_Flag flag, pid_t pid=0)
 
int redirectLog (const std::string &rundir, bool addTimeStamp=true)
 
int updateIoReg (const std::string &rundir)
 
std::string fmterror (int errnum)
 
int reopenFds ()
 
int handleSavedPfc (const std::filesystem::path &dest_path)
 
void waitForSignal ()
 
IEvtSelector * evtSelector ()
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Protected Attributes

int m_nprocs
 
std::string m_subprocTopDir
 
std::string m_subprocDirPrefix
 
std::string m_evtSelName
 
AthenaInterprocess::ProcessGroupm_processGroup
 
ServiceHandle< IEventProcessor > m_evtProcessor
 
ServiceHandle< IAppMgrUI > m_appMgr
 
ServiceHandle< IFileMgr > m_fileMgr
 
ServiceHandle< IIoComponentMgr > m_ioMgr
 
IEvtSelector * m_evtSelector
 
std::string m_fileMgrLog
 
std::shared_ptr< AthenaInterprocess::FdsRegistrym_fdsRegistry
 
std::string m_randStr
 
Gaudi::Property< bool > m_isPileup {this, "IsPileup", false, "Flag for configuring PileUpEventLoopMgr"}
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

 SharedWriterTool ()
 
 SharedWriterTool (const SharedWriterTool &)
 
SharedWriterTooloperator= (const SharedWriterTool &)
 
int reopenFd (int fd, const std::string &name)
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

Gaudi::Property< bool > m_nMotherProcess
 
Gaudi::Property< bool > m_debug
 
int m_rankId
 
AthenaInterprocess::SharedQueuem_sharedRankQueue
 
IConversionSvc * m_cnvSvc
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 12 of file SharedWriterTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ ESRange_Status

enum AthenaMPToolBase::ESRange_Status
protectedinherited
Enumerator
ESRANGE_SUCCESS 
ESRANGE_NOTFOUND 
ESRANGE_SEEKFAILED 
ESRANGE_PROCFAILED 
ESRANGE_FILENOTMADE 
ESRANGE_BADINPFILE 

Definition at line 56 of file AthenaMPToolBase.h.

◆ Func_Flag

enum AthenaMPToolBase::Func_Flag
protectedinherited
Enumerator
FUNC_BOOTSTRAP 
FUNC_EXEC 
FUNC_FIN 

Definition at line 65 of file AthenaMPToolBase.h.

65  {
67  , FUNC_EXEC
68  , FUNC_FIN
69  };

Constructor & Destructor Documentation

◆ SharedWriterTool() [1/3]

SharedWriterTool::SharedWriterTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 18 of file SharedWriterTool.cxx.

22  , m_rankId(0)
23  , m_sharedRankQueue(nullptr)
24  , m_cnvSvc(0)
25 {
26  m_subprocDirPrefix = "shared_writer";
27 }

◆ ~SharedWriterTool()

SharedWriterTool::~SharedWriterTool ( )
overridevirtual

Definition at line 29 of file SharedWriterTool.cxx.

30 {
31 }

◆ SharedWriterTool() [2/3]

SharedWriterTool::SharedWriterTool ( )
private

◆ SharedWriterTool() [3/3]

SharedWriterTool::SharedWriterTool ( const SharedWriterTool )
private

Member Function Documentation

◆ ATLAS_NOT_THREAD_SAFE() [1/4]

virtual StatusCode exec SharedWriterTool::ATLAS_NOT_THREAD_SAFE ( )
overridevirtual

Implements IAthenaMPTool.

◆ ATLAS_NOT_THREAD_SAFE() [2/4]

int mapAsyncFlag AthenaMPToolBase::ATLAS_NOT_THREAD_SAFE ( Func_Flag  flag,
pid_t  pid = 0 
)
protectedinherited

◆ ATLAS_NOT_THREAD_SAFE() [3/4]

virtual int makePool SharedWriterTool::ATLAS_NOT_THREAD_SAFE ( int  maxevt,
int  nprocs,
const std::string &  topdir 
)
overridevirtual

Implements IAthenaMPTool.

◆ ATLAS_NOT_THREAD_SAFE() [4/4]

virtual StatusCode wait_once AthenaMPToolBase::ATLAS_NOT_THREAD_SAFE ( pid_t pid)
overridevirtualinherited

◆ bootstrap_func() [1/2]

std::unique_ptr< AthenaInterprocess::ScheduledWork > SharedWriterTool::bootstrap_func ( )
overridevirtual

Definition at line 135 of file SharedWriterTool.cxx.

136 {
137  // It's possible to debug SharedWriter just like any other AthenaMP worker.
138  // The following procedure provides a minimal explanation on how this can be achieved:
139  //
140  // Terminal #1:
141  // * Run athena w/ debugging enabled, e.g. athena.py --debugWorker --stdcmalloc --nprocs=8 [...]
142  // * In this mode, workers will be stopped after fork(), waiting for SIGUSR1 to be resumed
143  // * Find the PID of the worker to be debugged (printed by the job in stdout)
144  //
145  // Terminal #2:
146  // * Attach gdb to the relevant worker, i.e. gdb python PID
147  // * Once the symbols are loaded, one can perform any gdb action such as setting breakpoints etc.
148  // * Once ready, send SIGUSR1 to the worker to resume work, i.e. signal SIGUSR1 (in gdb)
149  //
150  // Terminal #3:
151  // * Send SIGUSR1 to the remaining workers (easiest to use htop)
152  //
153  // However, note that sometimes Shared I/O infrastructure struggles with timing problems,
154  // such as server/client(s) starting/stopping too early/later. Debugging can change this
155  // behavior so please keep this in mind.
156  if(m_debug) waitForSignal();
157 
158  std::unique_ptr<AthenaInterprocess::ScheduledWork> outwork(new AthenaInterprocess::ScheduledWork);
159  outwork->data = malloc(sizeof(int));
160  *(int*)(outwork->data) = 1; // Error code: for now use 0 success, 1 failure
161  outwork->size = sizeof(int);
162 
163  // ...
164  // (possible) TODO: extend outwork with some error message, which will be eventually
165  // reported in the master proces
166  // ...
167 
168  // ________________________ Get RankID ________________________
169  //
171  ATH_MSG_ERROR("Unable to get rank ID!");
172  return outwork;
173  }
174  // Writer dir: mkdir
175  std::filesystem::path writer_rundir(m_subprocTopDir);
176  writer_rundir /= std::filesystem::path(m_subprocDirPrefix);
177 
178  if(mkdir(writer_rundir.string().c_str(),S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)==-1) {
179  ATH_MSG_ERROR("Unable to make writer run directory: " << writer_rundir.string() << ". " << fmterror(errno));
180  return outwork;
181  }
182 
183  // __________ Redirect logs unless we want to attach debugger ____________
184  if(!m_debug) {
185  if(redirectLog(writer_rundir.string()))
186  return outwork;
187 
188  ATH_MSG_INFO("Logs redirected in the AthenaMP Shared Writer PID=" << getpid());
189  }
190 
191  // Update Io Registry
192  if(updateIoReg(writer_rundir.string()))
193  return outwork;
194 
195  ATH_MSG_INFO("Io registry updated in the AthenaMP Shared Writer PID=" << getpid());
196 
197  // _______________________ Handle saved PFC (if any) ______________________
198  std::filesystem::path abs_writer_rundir = std::filesystem::absolute(writer_rundir);
199  if(handleSavedPfc(abs_writer_rundir))
200  return outwork;
201 
202  // Reopen file descriptors
203  if(reopenFds())
204  return outwork;
205 
206  ATH_MSG_INFO("File descriptors re-opened in the AthenaMP Shared Writer PID=" << getpid());
207 
208  // Try to initialize AthenaRootSharedWriterSvc early on
209  IAthenaSharedWriterSvc* sharedWriterSvc;
210  StatusCode sc = serviceLocator()->service("AthenaRootSharedWriterSvc", sharedWriterSvc);
211  if(sc.isFailure() || sharedWriterSvc == nullptr) {
212  ATH_MSG_WARNING("Error retrieving AthenaRootSharedWriterSvc from SharedWriterTool::bootstrap_func()");
213  }
214 
215  // Use IDataShare to make ConversionSvc a Share Server
216  IDataShare* cnvSvc = dynamic_cast<IDataShare*>(m_cnvSvc);
217  if (cnvSvc == 0 || !cnvSvc->makeServer(-m_nprocs - 1 - 1024 * m_rankId).isSuccess()) {
218  ATH_MSG_ERROR("Failed to make the conversion service a share server");
219  return outwork;
220  }
221  else {
222  ATH_MSG_DEBUG("Successfully made the conversion service a share server");
223  }
224 
225  // ________________________ I/O reinit ________________________
226  if(!m_ioMgr->io_reinitialize().isSuccess()) {
227  ATH_MSG_ERROR("Failed to reinitialize I/O");
228  return outwork;
229  } else {
230  ATH_MSG_DEBUG("Successfully reinitialized I/O");
231  }
232 
233  // Writer dir: chdir
234  if(chdir(writer_rundir.string().c_str())==-1) {
235  ATH_MSG_ERROR("Failed to chdir to " << writer_rundir.string());
236  return outwork;
237  }
238 
239  // Declare success and return
240  *(int*)(outwork->data) = 0;
241  return outwork;
242 }

◆ bootstrap_func() [2/2]

virtual std::unique_ptr<AthenaInterprocess::ScheduledWork> virtual operator () ATLAS_NOT_THREAD_SAFE ( const AthenaInterprocess std::unique_ptr<AthenaInterprocess::ScheduledWork> AthenaMPToolBase::bootstrap_func ( )
pure virtualinherited

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtSelector()

IEvtSelector* AthenaMPToolBase::evtSelector ( )
inlineprotectedinherited

Definition at line 81 of file AthenaMPToolBase.h.

81 { return m_evtSelector; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ exec_func()

std::unique_ptr< AthenaInterprocess::ScheduledWork > SharedWriterTool::exec_func ( )
overridevirtual

Implements AthenaMPToolBase.

Definition at line 244 of file SharedWriterTool.cxx.

245 {
246  ATH_MSG_INFO("Exec function in the AthenaMP Shared Writer PID=" << getpid());
247  bool all_ok=true;
248 
249  IAthenaSharedWriterSvc* sharedWriterSvc;
250  StatusCode sc = serviceLocator()->service("AthenaRootSharedWriterSvc", sharedWriterSvc);
251  if(sc.isFailure() || sharedWriterSvc==0) {
252  ATH_MSG_ERROR("Error retrieving AthenaRootSharedWriterSvc");
253  all_ok=false;
254  } else if(!sharedWriterSvc->share(m_nprocs, m_nMotherProcess.value()).isSuccess()) {
255  ATH_MSG_ERROR("Exec function could not share data");
256  all_ok=false;
257  }
258  AthCnvSvc* cnvSvc = dynamic_cast<AthCnvSvc*>(m_cnvSvc);
259  if (cnvSvc == 0 || !cnvSvc->disconnectOutput("").isSuccess()) {
260  ATH_MSG_ERROR("Exec function could not disconnectOutput");
261  all_ok=false;
262  }
263 
264  if(m_appMgr->stop().isFailure()) {
265  ATH_MSG_ERROR("Unable to stop AppMgr");
266  all_ok=false;
267  }
268  else {
269  if(m_appMgr->finalize().isFailure()) {
270  std::cerr << "Unable to finalize AppMgr" << std::endl;
271  all_ok=false;
272  }
273  }
274 
275  std::unique_ptr<AthenaInterprocess::ScheduledWork> outwork(new AthenaInterprocess::ScheduledWork);
276  outwork->data = malloc(sizeof(int));
277  *(int*)(outwork->data) = (all_ok?0:1); // Error code: for now use 0 success, 1 failure
278  outwork->size = sizeof(int);
279 
280  // ...
281  // (possible) TODO: extend outwork with some error message, which will be eventually
282  // reported in the master proces
283  // ...
284  return outwork;
285 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ fin_func()

std::unique_ptr< AthenaInterprocess::ScheduledWork > SharedWriterTool::fin_func ( )
overridevirtual

Implements AthenaMPToolBase.

Definition at line 287 of file SharedWriterTool.cxx.

288 {
289  // Dummy
290  std::unique_ptr<AthenaInterprocess::ScheduledWork> outwork(new AthenaInterprocess::ScheduledWork);
291  outwork->data = malloc(sizeof(int));
292  *(int*)(outwork->data) = 0; // Error code: for now use 0 success, 1 failure
293  outwork->size = sizeof(int);
294  return outwork;
295 }

◆ finalize()

StatusCode SharedWriterTool::finalize ( )
overridevirtual

Reimplemented from AthenaMPToolBase.

Definition at line 43 of file SharedWriterTool.cxx.

44 {
45  ATH_MSG_DEBUG("In finalize");
46 
47  delete m_sharedRankQueue;
48  return StatusCode::SUCCESS;
49 }

◆ fmterror()

std::string AthenaMPToolBase::fmterror ( int  errnum)
protectedinherited

Definition at line 362 of file AthenaMPToolBase.cxx.

363 {
364  char buf[256];
365  strerror_r(errnum, buf, sizeof(buf));
366  return std::string(buf);
367 }

◆ generateOutputReport()

AthenaMP::AllWorkerOutputs_ptr SharedWriterTool::generateOutputReport ( )
overridevirtual

Reimplemented from AthenaMPToolBase.

Definition at line 129 of file SharedWriterTool.cxx.

130 {
132  return jobOutputs;
133 }

◆ handleSavedPfc()

int AthenaMPToolBase::handleSavedPfc ( const std::filesystem::path &  dest_path)
protectedinherited

Definition at line 425 of file AthenaMPToolBase.cxx.

426 {
427  if(std::filesystem::is_regular_file("PoolFileCatalog.xml.AthenaMP-saved"))
428  COPY_FILE_HACK("PoolFileCatalog.xml.AthenaMP-saved",dest_path.string()+"/PoolFileCatalog.xml");
429  return 0;
430 }

◆ initialize()

StatusCode SharedWriterTool::initialize ( )
overridevirtual

Reimplemented from AthenaMPToolBase.

Definition at line 33 of file SharedWriterTool.cxx.

34 {
35  ATH_MSG_DEBUG("In initialize");
36 
38  ATH_CHECK(serviceLocator()->service("AthenaPoolCnvSvc", m_cnvSvc));
39 
40  return StatusCode::SUCCESS;
41 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& IAthenaMPTool::interfaceID ( )
inlinestaticinherited

Definition at line 36 of file IAthenaMPTool.h.

36 { return IID_IAthenaMPTool; }

◆ killChildren()

void AthenaMPToolBase::killChildren ( )
overridevirtualinherited

Implements IAthenaMPTool.

Definition at line 210 of file AthenaMPToolBase.cxx.

211 {
213  kill(child.getProcessID(),SIGKILL);
214  }
215 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ operator()

virtual std::unique_ptr<ScheduledWork> AthenaInterprocess::IMessageDecoder::operator ( ) const &
pure virtualinherited

◆ operator=()

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ redirectLog()

int AthenaMPToolBase::redirectLog ( const std::string &  rundir,
bool  addTimeStamp = true 
)
protectedinherited

Definition at line 278 of file AthenaMPToolBase.cxx.

279 {
280  // Redirect both stdout and stderr to the same file AthenaMP.log
281  int dup2result1(0), dup2result2(0);
282 
283  int newout = open(std::string(rundir+"/AthenaMP.log").c_str(),O_CREAT | O_RDWR, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
284  if(newout==-1) {
285  ATH_MSG_ERROR("Unable to open log file in the run directory. " << fmterror(errno));
286  return -1;
287  }
288  dup2result1 = dup2(newout, STDOUT_FILENO);
289  dup2result2 = dup2(newout, STDERR_FILENO);
290  TEMP_FAILURE_RETRY(close(newout));
291  if(dup2result1==-1) {
292  ATH_MSG_ERROR("Unable to redirect standard output. " << fmterror(errno));
293  return -1;
294  }
295  if(dup2result2==-1) {
296  ATH_MSG_ERROR("Unable to redirect standard error. " << fmterror(errno));
297  return -1;
298  }
299 
300  if(addTimeStamp) {
301  IMessageSvc* messageSvc(0);
302  StatusCode sc = serviceLocator()->service("MessageSvc",messageSvc);
303  if(sc.isFailure()) {
304  ATH_MSG_ERROR("Error retrieving IMessageSvc");
305  return -1;
306  }
307 
308  IProperty* propertyServer = dynamic_cast<IProperty*>(messageSvc);
309  if(propertyServer==0) {
310  ATH_MSG_ERROR("Unable to cast message svc to IProperty");
311  return -1;
312  }
313 
314  std::string propertyName("Format");
315  std::string oldFormat("");
316  StringProperty formatProp(propertyName,oldFormat);
317  sc = propertyServer->getProperty(&formatProp);
318  if(sc.isFailure()) {
319  ATH_MSG_WARNING("Message Service does not have Format property");
320  }
321  else {
322  oldFormat = formatProp.value();
323  if(oldFormat.find("%t")==std::string::npos) {
324  // Add time stamps
325  std::string newFormat("%t " + oldFormat);
326  StringProperty newFormatProp(propertyName,newFormat);
327  if(propertyServer->setProperty(newFormatProp).isFailure()) {
328  ATH_MSG_ERROR("Unable to set new Format property on the Message Service");
329  return -1;
330  }
331  }
332  else {
333  ATH_MSG_DEBUG("MsgSvc format already contains timestamps. Nothing to be done");
334  }
335  }
336  }
337 
338  return 0;
339 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ reopenFd()

int AthenaMPToolBase::reopenFd ( int  fd,
const std::string &  name 
)
privateinherited

Definition at line 448 of file AthenaMPToolBase.cxx.

449 {
450  ATH_MSG_DEBUG("Attempting to reopen descriptor for " << name);
451  int old_openflags = fcntl(fd,F_GETFL,0);
452  switch(old_openflags & O_ACCMODE) {
453  case O_RDONLY: {
454  ATH_MSG_DEBUG("The File Access Mode is RDONLY");
455  break;
456  }
457  case O_WRONLY: {
458  ATH_MSG_DEBUG("The File Access Mode is WRONLY");
459  break;
460  }
461  case O_RDWR: {
462  ATH_MSG_DEBUG("The File Access Mode is RDWR");
463  break;
464  }
465  }
466 
467  int old_descflags = fcntl(fd,F_GETFD,0);
468  off_t oldpos = lseek(fd,0,SEEK_CUR);
469  if(oldpos==-1) {
470  if(errno==ESPIPE) {
471  ATH_MSG_WARNING("Dealing with PIPE. Skipping ... (FIXME!)");
472  }
473  else {
474  ATH_MSG_ERROR("When re-opening file descriptors lseek failed on " << name << ". " << fmterror(errno));
475  return -1;
476  }
477  }
478  else {
479  Io::Fd newfd = open(name.c_str(),old_openflags);
480  if(newfd==-1) {
481  ATH_MSG_ERROR("When re-opening file descriptors unable to open " << name << " for reading. " << fmterror(errno));
482  return -1;
483  }
484  if(lseek(newfd,oldpos,SEEK_SET)==-1){
485  ATH_MSG_ERROR("When re-opening file descriptors lseek failed on the newly opened " << name << ". " << fmterror(errno));
486  TEMP_FAILURE_RETRY(close(newfd));
487  return -1;
488  }
489  TEMP_FAILURE_RETRY(close(fd));
490  if(dup2(newfd,fd)==-1) {
491  ATH_MSG_ERROR("When re-opening file descriptors unable to duplicate descriptor for " << name << ". " << fmterror(errno));
492  TEMP_FAILURE_RETRY(close(newfd));
493  return -1;
494  }
495  if(fcntl(fd,F_SETFD,old_descflags)==-1) {
496  ATH_MSG_ERROR("When re-opening file descriptors unable to set descriptor flags for " << name << ". " << fmterror(errno));
497  TEMP_FAILURE_RETRY(close(newfd));
498  return -1;
499  }
500  TEMP_FAILURE_RETRY(close(newfd));
501  }
502  return 0;
503 }

◆ reopenFds()

int AthenaMPToolBase::reopenFds ( )
protectedinherited

Definition at line 369 of file AthenaMPToolBase.cxx.

370 {
371  // Reopen file descriptors.
372  // First go over all open files, which have been registered with the FileMgr
373  // Then also check the FdsRegistry, in case it contains some files not registered with the FileMgr
374  std::set<int> fdLog;
375 
376  // Query the FileMgr contents
377  std::vector<const Io::FileAttr*> filemgrFiles;
378  std::vector<const Io::FileAttr*>::const_iterator itFile;
379  unsigned filenum = m_fileMgr->getFiles(filemgrFiles); // Get attributes for open files only. We don't care about closed ones at this point
380  if(filenum!=filemgrFiles.size())
381  ATH_MSG_WARNING("getFiles returned " << filenum << " while vector size is " << filemgrFiles.size());
382 
383  for(itFile=filemgrFiles.begin();itFile!=filemgrFiles.end();++itFile) {
384  ATH_MSG_DEBUG("* " << **itFile);
385  const std::string& filename = (**itFile).name();
386  Io::Fd fd = (**itFile).fd();
387 
388  if(fd==-1) {
389  // It is legal to have fd=-1 for remote inputs
390  // On the other hand, these inputs should not remain open after fork. The issue being tracked at ATEAM-434.
391  // So, this hopefully is a temporary patch
392  ATH_MSG_WARNING("FD=-1 detected on an open file retrieved from FileMgr. Skip FD reopening. File name: " << filename);
393  continue;
394  }
395 
396  if(reopenFd(fd,filename))
397  return -1;
398 
399  fdLog.insert(fd);
400  }
401 
402  // Check the FdsRegistry
403  for(const AthenaInterprocess::FdsRegistryEntry& regEntry : *m_fdsRegistry) {
404  if(fdLog.find(regEntry.fd)!=fdLog.end()) {
405  ATH_MSG_DEBUG("The file from FdsRegistry " << regEntry.name << " was registered with FileMgr. Skip reopening");
406  }
407  else {
408  ATH_MSG_WARNING("The file " << regEntry.name << " has not been registered with the FileMgr!");
409 
410  if(regEntry.fd==-1) {
411  // Same protection as the one above
412  ATH_MSG_WARNING("FD=-1 detected on an open file retrieved from FD Registry. Skip FD reopening. File name: " << regEntry.name);
413  continue;
414  }
415 
416  if(reopenFd(regEntry.fd,regEntry.name))
417  return -1;
418 
419  fdLog.insert(regEntry.fd);
420  }
421  }
422  return 0;
423 }

◆ reportSubprocessStatuses()

void AthenaMPToolBase::reportSubprocessStatuses ( )
overridevirtualinherited

Implements IAthenaMPTool.

Reimplemented in EvtRangeProcessor, SharedEvtQueueConsumer, and SharedHiveEvtQueueConsumer.

Definition at line 120 of file AthenaMPToolBase.cxx.

121 {
122  ATH_MSG_INFO("Statuses of sub-processes");
123  const std::vector<AthenaInterprocess::ProcessStatus>& statuses = m_processGroup->getStatuses();
124  for(size_t i=0; i<statuses.size(); ++i)
125  ATH_MSG_INFO("*** Process PID=" << statuses[i].pid << ". Status " << ((statuses[i].exitcode)?"FAILURE":"SUCCESS"));
126 }

◆ setRandString()

void AthenaMPToolBase::setRandString ( const std::string &  randStr)
overridevirtualinherited

Implements IAthenaMPTool.

Definition at line 205 of file AthenaMPToolBase.cxx.

206 {
207  m_randStr = randStr;
208 }

◆ subProcessLogs()

void SharedWriterTool::subProcessLogs ( std::vector< std::string > &  filenames)
overridevirtual

Implements IAthenaMPTool.

Definition at line 121 of file SharedWriterTool.cxx.

122 {
123  filenames.clear();
124  std::filesystem::path writer_rundir(m_subprocTopDir);
125  writer_rundir/= std::filesystem::path(m_subprocDirPrefix);
126  filenames.push_back(writer_rundir.string()+std::string("/AthenaMP.log"));
127 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateIoReg()

int AthenaMPToolBase::updateIoReg ( const std::string &  rundir)
protectedinherited

Definition at line 341 of file AthenaMPToolBase.cxx.

342 {
343  if (!m_ioMgr.retrieve().isSuccess()) {
344  ATH_MSG_ERROR("Error retrieving IoComponentMgr");
345  return -1;
346  } else {
347  ATH_MSG_DEBUG("Successfully retrieved IoComponentMgr");
348  }
349 
350  // update the IoRegistry for the new workdir - make sure we use absolute path
352  if(!m_ioMgr->io_update_all(abs_rundir.string()).isSuccess()) {
353  ATH_MSG_ERROR("Error updating IoRegistry");
354  return -1;
355  } else {
356  ATH_MSG_DEBUG("Successfully updated IoRegistry");
357  }
358 
359  return 0;
360 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

◆ useFdsRegistry()

void AthenaMPToolBase::useFdsRegistry ( std::shared_ptr< AthenaInterprocess::FdsRegistry registry)
overridevirtualinherited

Implements IAthenaMPTool.

Definition at line 200 of file AthenaMPToolBase.cxx.

201 {
203 }

◆ waitForSignal()

void AthenaMPToolBase::waitForSignal ( )
protectedinherited

Definition at line 432 of file AthenaMPToolBase.cxx.

433 {
434  ATH_MSG_INFO("Bootstrap worker PID " << getpid() << " - waiting for SIGUSR1");
435  sigset_t mask, oldmask;
436 
438 
439  sigemptyset (&mask);
440  sigaddset (&mask, SIGUSR1);
441 
442  sigprocmask (SIG_BLOCK, &mask, &oldmask);
444  sigsuspend (&oldmask);
445  sigprocmask (SIG_UNBLOCK, &mask, NULL);
446 }

Member Data Documentation

◆ m_appMgr

ServiceHandle<IAppMgrUI> AthenaMPToolBase::m_appMgr
protectedinherited

Definition at line 91 of file AthenaMPToolBase.h.

◆ m_cnvSvc

IConversionSvc* SharedWriterTool::m_cnvSvc
private

Definition at line 52 of file SharedWriterTool.h.

◆ m_debug

Gaudi::Property<bool> SharedWriterTool::m_debug
private
Initial value:
{
this, "Debug", false,
"Are we running in debug mode? The default is false"}

Definition at line 45 of file SharedWriterTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtProcessor

ServiceHandle<IEventProcessor> AthenaMPToolBase::m_evtProcessor
protectedinherited

Definition at line 90 of file AthenaMPToolBase.h.

◆ m_evtSelector

IEvtSelector* AthenaMPToolBase::m_evtSelector
protectedinherited

Definition at line 94 of file AthenaMPToolBase.h.

◆ m_evtSelName

std::string AthenaMPToolBase::m_evtSelName
protectedinherited

Definition at line 86 of file AthenaMPToolBase.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_fdsRegistry

std::shared_ptr<AthenaInterprocess::FdsRegistry> AthenaMPToolBase::m_fdsRegistry
protectedinherited

Definition at line 96 of file AthenaMPToolBase.h.

◆ m_fileMgr

ServiceHandle<IFileMgr> AthenaMPToolBase::m_fileMgr
protectedinherited

Definition at line 92 of file AthenaMPToolBase.h.

◆ m_fileMgrLog

std::string AthenaMPToolBase::m_fileMgrLog
protectedinherited

Definition at line 95 of file AthenaMPToolBase.h.

◆ m_ioMgr

ServiceHandle<IIoComponentMgr> AthenaMPToolBase::m_ioMgr
protectedinherited

Definition at line 93 of file AthenaMPToolBase.h.

◆ m_isPileup

Gaudi::Property<bool> AthenaMPToolBase::m_isPileup {this, "IsPileup", false, "Flag for configuring PileUpEventLoopMgr"}
protectedinherited

Definition at line 99 of file AthenaMPToolBase.h.

◆ m_nMotherProcess

Gaudi::Property<bool> SharedWriterTool::m_nMotherProcess
private
Initial value:
{
this, "MotherProcess", false,
"Expect mother process to write event data. The default is false."}

Definition at line 42 of file SharedWriterTool.h.

◆ m_nprocs

int AthenaMPToolBase::m_nprocs
protectedinherited

Definition at line 83 of file AthenaMPToolBase.h.

◆ m_processGroup

AthenaInterprocess::ProcessGroup* AthenaMPToolBase::m_processGroup
protectedinherited

Definition at line 88 of file AthenaMPToolBase.h.

◆ m_randStr

std::string AthenaMPToolBase::m_randStr
protectedinherited

Definition at line 97 of file AthenaMPToolBase.h.

◆ m_rankId

int SharedWriterTool::m_rankId
private

Definition at line 49 of file SharedWriterTool.h.

◆ m_sharedRankQueue

AthenaInterprocess::SharedQueue* SharedWriterTool::m_sharedRankQueue
private

Definition at line 51 of file SharedWriterTool.h.

◆ m_subprocDirPrefix

std::string AthenaMPToolBase::m_subprocDirPrefix
protectedinherited

Definition at line 85 of file AthenaMPToolBase.h.

◆ m_subprocTopDir

std::string AthenaMPToolBase::m_subprocTopDir
protectedinherited

Definition at line 84 of file AthenaMPToolBase.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
python.Dso.registry
registry
Definition: Control/AthenaServices/python/Dso.py:159
python.DQPostProcessMod.rundir
def rundir(fname)
Definition: DQPostProcessMod.py:116
AthenaInterprocess::ProcessGroup::getStatuses
const std::vector< ProcessStatus > & getStatuses() const
Definition: ProcessGroup.cxx:204
SharedWriterTool::m_sharedRankQueue
AthenaInterprocess::SharedQueue * m_sharedRankQueue
Definition: SharedWriterTool.h:51
AthenaMPToolBase::waitForSignal
void waitForSignal()
Definition: AthenaMPToolBase.cxx:432
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:126
AthenaMPToolBase::ESRANGE_BADINPFILE
@ ESRANGE_BADINPFILE
Definition: AthenaMPToolBase.h:62
AthenaMPToolBase::m_evtSelector
IEvtSelector * m_evtSelector
Definition: AthenaMPToolBase.h:94
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
plot_material.mkdir
def mkdir(path, recursive=True)
Definition: plot_material.py:16
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
AthenaMPToolBase::m_processGroup
AthenaInterprocess::ProcessGroup * m_processGroup
Definition: AthenaMPToolBase.h:88
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
AthenaInterprocess::ScheduledWork
Definition: IMessageDecoder.h:12
AthenaMPToolBase::m_randStr
std::string m_randStr
Definition: AthenaMPToolBase.h:97
AthenaMPToolBase::m_nprocs
int m_nprocs
Definition: AthenaMPToolBase.h:83
AthenaMPToolBase::FUNC_FIN
@ FUNC_FIN
Definition: AthenaMPToolBase.h:68
AthenaInterprocess::ProcessGroup::getChildren
const std::vector< Process > & getChildren() const
Definition: ProcessGroup.cxx:197
plotting.yearwise_luminosity.absolute
absolute
Definition: yearwise_luminosity.py:32
AthenaMPToolBase::fmterror
std::string fmterror(int errnum)
Definition: AthenaMPToolBase.cxx:362
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
DeMoUpdate.statuses
list statuses
Definition: DeMoUpdate.py:568
athena.exitcode
int exitcode
Definition: athena.py:159
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
AthenaMPToolBase::ESRANGE_SEEKFAILED
@ ESRANGE_SEEKFAILED
Definition: AthenaMPToolBase.h:59
SharedWriterTool::m_rankId
int m_rankId
Definition: SharedWriterTool.h:49
SharedWriterTool::m_cnvSvc
IConversionSvc * m_cnvSvc
Definition: SharedWriterTool.h:52
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
Fd
IIoSvc::Fd Fd
Definition: IoSvc.cxx:22
sigaddset
#define sigaddset(x, y)
Definition: SealSignal.h:84
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthenaMPToolBase::FUNC_EXEC
@ FUNC_EXEC
Definition: AthenaMPToolBase.h:67
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
COPY_FILE_HACK
#define COPY_FILE_HACK(_src, _dest)
Definition: copy_file_icc_hack.h:15
IDataShare
Abstract interface for sharing data.
Definition: IDataShare.h:28
sigset_t
int sigset_t
Definition: SealSignal.h:80
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthenaMPToolBase::m_appMgr
ServiceHandle< IAppMgrUI > m_appMgr
Definition: AthenaMPToolBase.h:91
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
IAthenaSharedWriterSvc
Definition: IAthenaSharedWriterSvc.h:12
lumiFormat.i
int i
Definition: lumiFormat.py:92
python.DecayParser.buf
buf
print ("=> [%s]"cmd)
Definition: DecayParser.py:27
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthenaMPToolBase::reopenFd
int reopenFd(int fd, const std::string &name)
Definition: AthenaMPToolBase.cxx:448
AthenaMPToolBase::AthenaMPToolBase
AthenaMPToolBase()
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AthenaMPToolBase_d::pauseForDebug
void pauseForDebug(int)
Definition: AthenaMPToolBase.cxx:27
AthenaMPToolBase::ESRANGE_SUCCESS
@ ESRANGE_SUCCESS
Definition: AthenaMPToolBase.h:57
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
TrigInDetValidation_Base.malloc
malloc
Definition: TrigInDetValidation_Base.py:129
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
AthenaMPToolBase::updateIoReg
int updateIoReg(const std::string &rundir)
Definition: AthenaMPToolBase.cxx:341
AthenaMPToolBase::initialize
virtual StatusCode initialize() override
Definition: AthenaMPToolBase.cxx:55
IDataShare::makeServer
virtual StatusCode makeServer(int num)=0
Make this a server.
AthenaInterprocess::SharedQueue::receive_basic
bool receive_basic(T &)
Definition: SharedQueue.h:124
SharedWriterTool::m_nMotherProcess
Gaudi::Property< bool > m_nMotherProcess
Definition: SharedWriterTool.h:42
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
ReadFromCoolCompare.fd
fd
Definition: ReadFromCoolCompare.py:196
SharedWriterTool::m_debug
Gaudi::Property< bool > m_debug
Definition: SharedWriterTool.h:45
Cut::signal
@ signal
Definition: SUSYToolsAlg.cxx:64
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
AthenaMPToolBase::ESRANGE_PROCFAILED
@ ESRANGE_PROCFAILED
Definition: AthenaMPToolBase.h:60
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
AthenaMPToolBase::m_ioMgr
ServiceHandle< IIoComponentMgr > m_ioMgr
Definition: AthenaMPToolBase.h:93
AthenaMPToolBase::redirectLog
int redirectLog(const std::string &rundir, bool addTimeStamp=true)
Definition: AthenaMPToolBase.cxx:278
AthenaInterprocess::Process
Definition: Process.h:17
IAthenaSharedWriterSvc::share
virtual StatusCode share(int numClients=0, bool motherClient=false)=0
grepfile.filenames
list filenames
Definition: grepfile.py:34
Trk::open
@ open
Definition: BinningType.h:40
HFORType::kill
@ kill
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthenaInterprocess::FdsRegistryEntry
Definition: FdsRegistry.h:13
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthenaMP::AllWorkerOutputs_ptr
std::unique_ptr< AllWorkerOutputs > AllWorkerOutputs_ptr
Definition: IAthenaMPTool.h:28
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
AthCnvSvc::disconnectOutput
virtual StatusCode disconnectOutput(const std::string &output)
Disconnect output files from the service.
Definition: AthCnvSvc.cxx:437
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
AthenaMPToolBase::m_subprocDirPrefix
std::string m_subprocDirPrefix
Definition: AthenaMPToolBase.h:85
AthenaMPToolBase::m_subprocTopDir
std::string m_subprocTopDir
Definition: AthenaMPToolBase.h:84
AthenaMPToolBase::ESRANGE_NOTFOUND
@ ESRANGE_NOTFOUND
Definition: AthenaMPToolBase.h:58
AthenaMPToolBase::handleSavedPfc
int handleSavedPfc(const std::filesystem::path &dest_path)
Definition: AthenaMPToolBase.cxx:425
AthenaMPToolBase::m_fileMgr
ServiceHandle< IFileMgr > m_fileMgr
Definition: AthenaMPToolBase.h:92
AthenaMP::AllWorkerOutputs
std::map< std::string, SingleWorkerOutputs > AllWorkerOutputs
Definition: IAthenaMPTool.h:25
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
AthenaMPToolBase::FUNC_BOOTSTRAP
@ FUNC_BOOTSTRAP
Definition: AthenaMPToolBase.h:66
AthCnvSvc
Definition: AthCnvSvc.h:67
AthenaMPToolBase::reopenFds
int reopenFds()
Definition: AthenaMPToolBase.cxx:369
sigemptyset
#define sigemptyset(x)
Definition: SealSignal.h:82
AthenaMPToolBase::ESRANGE_FILENOTMADE
@ ESRANGE_FILENOTMADE
Definition: AthenaMPToolBase.h:61
AthenaMPToolBase::m_fdsRegistry
std::shared_ptr< AthenaInterprocess::FdsRegistry > m_fdsRegistry
Definition: AthenaMPToolBase.h:96
fitman.k
k
Definition: fitman.py:528
AthenaMPToolBase_d::sig_done
std::atomic< bool > sig_done
Definition: AthenaMPToolBase.cxx:26