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
SharedHiveEvtQueueConsumer Class Referencefinalabstract

#include <SharedHiveEvtQueueConsumer.h>

Inheritance diagram for SharedHiveEvtQueueConsumer:
Collaboration diagram for SharedHiveEvtQueueConsumer:

Public Member Functions

 SharedHiveEvtQueueConsumer (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~SharedHiveEvtQueueConsumer () 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 StatusCode wait_once ATLAS_NOT_THREAD_SAFE (pid_t &pid) override
 
virtual void reportSubprocessStatuses () override
 
virtual void subProcessLogs (std::vector< std::string > &) 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 AthenaMP::AllWorkerOutputs_ptr generateOutputReport () 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
 
SmartIF< 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

 SharedHiveEvtQueueConsumer ()
 
 SharedHiveEvtQueueConsumer (const SharedHiveEvtQueueConsumer &)
 
SharedHiveEvtQueueConsumeroperator= (const SharedHiveEvtQueueConsumer &)
 
StatusCode initHive ()
 
int decodeProcessResult ATLAS_NOT_THREAD_SAFE (const AthenaInterprocess::ProcessResult *presult, bool doFinalize)
 
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< int > m_nEventsBeforeFork
 
Gaudi::Property< bool > m_debug
 
Gaudi::Property< bool > m_useSharedWriter
 
int m_rankId {}
 
ServiceHandle< IChronoStatSvc > m_chronoStatSvc
 
SmartIF< IDataSharem_dataShare
 
SmartIF< IEvtSelectorSeekm_evtSelSeek
 
IEvtSelector::Context * m_evtContext {}
 
AthenaInterprocess::SharedQueuem_sharedEventQueue {}
 
AthenaInterprocess::SharedQueuem_sharedRankQueue {}
 
std::map< pid_t, int > m_nProcessedEvents
 
std::queue< pid_tm_finQueue
 
SmartIF< IScheduler > m_schedulerSvc
 
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 19 of file SharedHiveEvtQueueConsumer.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

◆ SharedHiveEvtQueueConsumer() [1/3]

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

Definition at line 41 of file SharedHiveEvtQueueConsumer.cxx.

45  , m_rankId(-1)
46  , m_chronoStatSvc("ChronoStatSvc", name)
47  , m_evtSelSeek(0)
48  , m_evtContext(0)
51 {
52  declareInterface<IAthenaMPTool>(this);
53 
54  m_subprocDirPrefix = "worker_";
55 }

◆ ~SharedHiveEvtQueueConsumer()

SharedHiveEvtQueueConsumer::~SharedHiveEvtQueueConsumer ( )
overridevirtual

Definition at line 59 of file SharedHiveEvtQueueConsumer.cxx.

60 {
61 }

◆ SharedHiveEvtQueueConsumer() [2/3]

SharedHiveEvtQueueConsumer::SharedHiveEvtQueueConsumer ( )
private

◆ SharedHiveEvtQueueConsumer() [3/3]

SharedHiveEvtQueueConsumer::SharedHiveEvtQueueConsumer ( const SharedHiveEvtQueueConsumer )
private

Member Function Documentation

◆ ATLAS_NOT_THREAD_SAFE() [1/5]

virtual StatusCode exec SharedHiveEvtQueueConsumer::ATLAS_NOT_THREAD_SAFE ( )
overridevirtual

Implements IAthenaMPTool.

◆ ATLAS_NOT_THREAD_SAFE() [2/5]

int decodeProcessResult SharedHiveEvtQueueConsumer::ATLAS_NOT_THREAD_SAFE ( const AthenaInterprocess::ProcessResult presult,
bool  doFinalize 
)
private

◆ ATLAS_NOT_THREAD_SAFE() [3/5]

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

◆ ATLAS_NOT_THREAD_SAFE() [4/5]

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

Implements IAthenaMPTool.

◆ ATLAS_NOT_THREAD_SAFE() [5/5]

virtual StatusCode wait_once SharedHiveEvtQueueConsumer::ATLAS_NOT_THREAD_SAFE ( pid_t pid)
overridevirtual

Reimplemented from AthenaMPToolBase.

◆ bootstrap_func() [1/2]

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

Definition at line 234 of file SharedHiveEvtQueueConsumer.cxx.

235 {
236  if (m_debug) {
237  ATH_MSG_INFO("Bootstrap worker PID " << getpid() << " - waiting for SIGUSR1");
238  sigset_t mask, oldmask;
239 
241 
242  sigemptyset (&mask);
243  sigaddset (&mask, SIGUSR1);
244 
245  sigprocmask (SIG_BLOCK, &mask, &oldmask);
247  sigsuspend (&oldmask);
248  sigprocmask (SIG_UNBLOCK, &mask, NULL);
249  }
250 
251  std::unique_ptr<AthenaInterprocess::ScheduledWork> outwork(new AthenaInterprocess::ScheduledWork);
252  outwork->data = malloc(sizeof(int));
253  *(int*)(outwork->data) = 1; // Error code: for now use 0 success, 1 failure
254  outwork->size = sizeof(int);
255 
256  // ...
257  // (possible) TODO: extend outwork with some error message, which will be eventually
258  // reported in the master proces
259  // ...
260 
261  // ________________________ Get IncidentSvc and fire PostFork ________________________
262  SmartIF<IIncidentSvc> p_incidentSvc(serviceLocator()->service("IncidentSvc"));
263  if (!p_incidentSvc) {
264  ATH_MSG_ERROR("Unable to retrieve IncidentSvc");
265  return outwork;
266  }
267  p_incidentSvc->fireIncident(Incident(name(),"PostFork"));
268 
269 
270  // ________________________ Get RankID ________________________
271  //
273  ATH_MSG_ERROR("Unable to get rank ID!");
274  return outwork;
275  }
276  std::ostringstream workindex;
277  workindex<<m_rankId;
278 
279  // ________________________ Worker dir: mkdir ________________________
280  std::filesystem::path worker_rundir(m_subprocTopDir);
281  worker_rundir /= std::filesystem::path(m_subprocDirPrefix+workindex.str());
282  // TODO: this "worker_" can be made configurable too
283 
284  if(mkdir(worker_rundir.string().c_str(),S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)==-1) {
285  ATH_MSG_ERROR("Unable to make worker run directory: " << worker_rundir.string() << ". " << fmterror(errno));
286  return outwork;
287  }
288 
289  // ________________________ Redirect logs ________________________
290  if(redirectLog(worker_rundir.string()))
291  return outwork;
292 
293  ATH_MSG_INFO("Logs redirected in the AthenaMP event worker PID=" << getpid());
294 
295  // ________________________ Update Io Registry ____________________________
296  if(updateIoReg(worker_rundir.string()))
297  return outwork;
298 
299  ATH_MSG_INFO("Io registry updated in the AthenaMP event worker PID=" << getpid());
300 
301  // ________________________ SimParams & DigiParams & PDGTABLE.MeV ____________________________
302  std::filesystem::path abs_worker_rundir = std::filesystem::absolute(worker_rundir);
303  if(std::filesystem::is_regular_file("SimParams.db"))
304  COPY_FILE_HACK("SimParams.db", abs_worker_rundir.string()+"/SimParams.db");
305  if(std::filesystem::is_regular_file("DigitParams.db"))
306  COPY_FILE_HACK("DigitParams.db", abs_worker_rundir.string()+"/DigitParams.db");
307  if(std::filesystem::is_regular_file("PDGTABLE.MeV"))
308  COPY_FILE_HACK("PDGTABLE.MeV", abs_worker_rundir.string()+"/PDGTABLE.MeV");
309 
310  // _______________________ Handle saved PFC (if any) ______________________
311  if(handleSavedPfc(abs_worker_rundir))
312  return outwork;
313 
314  // ________________________ reopen descriptors ____________________________
315  if(reopenFds())
316  return outwork;
317 
318  ATH_MSG_INFO("File descriptors re-opened in the AthenaMP event worker PID=" << getpid());
319 
320  // ________________________ Make Shared Writer Client ________________________
321 
323  SmartIF<IProperty> propertyServer(m_dataShare);
324  if (!propertyServer || propertyServer->setProperty("MakeStreamingToolClient", m_rankId + 1).isFailure()) {
325  ATH_MSG_ERROR("Could not change AthenaPoolCnvSvc MakeClient Property");
326  return outwork;
327  } else {
328  ATH_MSG_DEBUG("Successfully made the conversion service a share client");
329  }
330  }
331 
332  // ________________________ I/O reinit ________________________
333  if(!m_ioMgr->io_reinitialize().isSuccess()) {
334  ATH_MSG_ERROR("Failed to reinitialize I/O");
335  return outwork;
336  } else {
337  ATH_MSG_DEBUG("Successfully reinitialized I/O");
338  }
339 
340  // ________________________ Event selector restart ________________________
341  SmartIF<IService> evtSelSvc(m_evtSelector);
342  if(!evtSelSvc) {
343  ATH_MSG_ERROR("Failed to dyncast event selector to IService");
344  return outwork;
345  }
346  if(!evtSelSvc->start().isSuccess()) {
347  ATH_MSG_ERROR("Failed to restart the event selector");
348  return outwork;
349  } else {
350  ATH_MSG_DEBUG("Successfully restarted the event selector");
351  }
352 
353  // ________________________ Worker dir: chdir ________________________
354  if(chdir(worker_rundir.string().c_str())==-1) {
355  ATH_MSG_ERROR("Failed to chdir to " << worker_rundir.string());
356  return outwork;
357  }
358 
359  // ___________________ Fire UpdateAfterFork incident _________________
360  p_incidentSvc->fireIncident(AthenaInterprocess::UpdateAfterFork(m_rankId,getpid(),name()));
361 
362  // Declare success and return
363  *(int*)(outwork->data) = 0;
364  return outwork;
365 }

◆ 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 > SharedHiveEvtQueueConsumer::exec_func ( )
overridevirtual

Implements AthenaMPToolBase.

Definition at line 369 of file SharedHiveEvtQueueConsumer.cxx.

370 {
371  ATH_MSG_INFO("Exec function in the AthenaMP worker PID=" << getpid());
372 
373  bool all_ok(true);
374 
375  if (!initHive().isSuccess()) {
376  ATH_MSG_FATAL("unable to initialize Hive");
377  all_ok = false;
378  }
379 
380  // Get the value of SkipEvent
381  int skipEvents(0);
382  SmartIF<IProperty> propertyServer(m_evtSelector);
383  if(propertyServer==0) {
384  ATH_MSG_ERROR("Unable to cast event selector to IProperty");
385  all_ok = false;
386  }
387  else {
388  std::string propertyName("SkipEvents");
389  IntegerProperty skipEventsProp(propertyName,skipEvents);
390  if(propertyServer->getProperty(&skipEventsProp).isFailure()) {
391  ATH_MSG_INFO("Event Selector does not have SkipEvents property");
392  }
393  else {
394  skipEvents = skipEventsProp.value();
395  }
396  }
397 
398  IHybridProcessorHelper* hybridHelper = dynamic_cast<IHybridProcessorHelper*>(m_evtProcessor.get());
399  if(!hybridHelper) {
400  ATH_MSG_FATAL("Failed to acquire IHybridProcessorHelper interface");
401  all_ok = false;
402  return std::unique_ptr<AthenaInterprocess::ScheduledWork>();
403  }
404  // Reset the application return code.
405  hybridHelper->resetAppReturnCode();
406 
407  int finishedEvts =0;
408  int createdEvts =0;
409  long intmask = pow(0x100,sizeof(int))-1; // Mask for decoding event number from the value posted to the queue
410  long evtnumAndChunk(0);
411 // unsigned evtCounter(0);
412  int evtnum(0), chunkSize(1);
413 
414  ATH_MSG_INFO("Starting loop on events");
415 
416  StatusCode sc(StatusCode::SUCCESS);
417 
418  while(!m_sharedEventQueue->try_receive_basic<long>(evtnumAndChunk)) {
419  ATH_MSG_DEBUG("Event queue is empty");
420  usleep(1000);
421  }
422  bool loop_ended = (evtnumAndChunk<0);
423  if(!loop_ended) {
424  ATH_MSG_DEBUG("Received value from the queue 0x" << std::hex << evtnumAndChunk << std::dec);
425  chunkSize = evtnumAndChunk >> (sizeof(int)*8);
426  evtnum = evtnumAndChunk & intmask;
427  ATH_MSG_INFO("Received from the queue: event num=" << evtnum << " chunk size=" << chunkSize);
428  hybridHelper->setCurrentEventNum(++evtnum);
429  }
430 
431  bool no_more_events = false;
432 
433  while(!loop_ended) {
434  ATH_MSG_DEBUG(" -> createdEvts: " << createdEvts);
435 
436  if(!hybridHelper->terminateLoop() // No scheduled loop termination
437  && !no_more_events // We are not yet done getting events
438  && m_schedulerSvc->freeSlots()>0) { // There are still free slots in the scheduler
439  ATH_MSG_DEBUG("createdEvts: " << createdEvts << ", freeslots: " << m_schedulerSvc->freeSlots());
440 
441  auto ctx = m_evtProcessor->createEventContext();
442  if(!ctx.valid()) {
443  sc = StatusCode::FAILURE;
444  }
445  else {
446  sc = m_evtProcessor->executeEvent(std::move(ctx));
447  }
448 
449  if (sc.isFailure()) {
450  ATH_MSG_ERROR("Terminating event processing loop due to errors");
451  loop_ended = true;
452  }
453  else {
454  ++createdEvts;
455  if(--chunkSize==0) {
456  // Fetch next chunk
457  while(!m_sharedEventQueue->try_receive_basic<long>(evtnumAndChunk)) {
458  ATH_MSG_DEBUG("Event queue is empty");
459  usleep(1000);
460  }
461  if(evtnumAndChunk<0) {
462  no_more_events = true;
463  evtnumAndChunk *= -1;
464  ATH_MSG_DEBUG("No more events are expected. The total number of events for this job = " << evtnumAndChunk);
465  }
466  else {
467  ATH_MSG_DEBUG("Received value from the queue 0x" << std::hex << evtnumAndChunk << std::dec);
468  chunkSize = evtnumAndChunk >> (sizeof(int)*8);
469  evtnum = evtnumAndChunk & intmask;
470  ATH_MSG_INFO("Received from the queue: event num=" << evtnum << " chunk size=" << chunkSize);
471  }
472  }
473  // Advance to the next event
474  if(!no_more_events) {
475  hybridHelper->setCurrentEventNum(++evtnum);
476  }
477  }
478  }
479  else {
480  // all the events were created but not all finished or the slots were
481  // all busy: the scheduler should finish its job
482  ATH_MSG_DEBUG("Draining the scheduler");
483 
484  // Pull out of the scheduler the finished events
485  int ir = hybridHelper->drainScheduler(finishedEvts,true);
486  if(ir < 0) {
487  // some sort of error draining scheduler;
488  loop_ended = true;
489  sc = StatusCode::FAILURE;
490  }
491  else if(ir == 0) {
492  // no more events in scheduler
493  if(no_more_events) {
494  // We are done
495  loop_ended = true;
496  sc = StatusCode::SUCCESS;
497  }
498  }
499  else {
500  // keep going!
501  }
502  }
503  } // end main loop on finished events
504 
505  if(all_ok) {
506  if(m_evtProcessor->executeRun(0).isFailure()) {
507  ATH_MSG_ERROR("Could not finalize the Run");
508  all_ok=false;
509  } else {
510  if(m_evtSelSeek->seek(*m_evtContext, evtnumAndChunk+skipEvents).isFailure()) {
511  ATH_MSG_DEBUG("Seek past maxevt to " << evtnumAndChunk+skipEvents << " returned failure. As expected...");
512  }
513  }
514  }
515 
516  std::unique_ptr<AthenaInterprocess::ScheduledWork> outwork(new AthenaInterprocess::ScheduledWork);
517 
518  // Return value: "ERRCODE|Func_Flag|NEvt"
519  int outsize = 2*sizeof(int)+sizeof(AthenaMPToolBase::Func_Flag);
520  void* outdata = malloc(outsize);
521  *(int*)(outdata) = (all_ok?0:1); // Error code: for now use 0 success, 1 failure
523  memcpy((char*)outdata+sizeof(int),&func,sizeof(func));
524  memcpy((char*)outdata+sizeof(int)+sizeof(func),&createdEvts,sizeof(int));
525 
526  outwork->data = outdata;
527  outwork->size = outsize;
528  // ...
529  // (possible) TODO: extend outwork with some error message, which will be eventually
530  // reported in the master proces
531  // ...
532  return outwork;
533 }

◆ 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 > SharedHiveEvtQueueConsumer::fin_func ( )
overridevirtual

Implements AthenaMPToolBase.

Definition at line 538 of file SharedHiveEvtQueueConsumer.cxx.

539 {
540  ATH_MSG_INFO("Fin function in the AthenaMP worker PID=" << getpid());
541 
542  bool all_ok(true);
543 
544  if(m_appMgr->stop().isFailure()) {
545  ATH_MSG_ERROR("Unable to stop AppMgr");
546  all_ok=false;
547  } else {
548  if(m_appMgr->finalize().isFailure()) {
549  std::cerr << "Unable to finalize AppMgr" << std::endl;
550  all_ok=false;
551  }
552  }
553 
554  std::unique_ptr<AthenaInterprocess::ScheduledWork> outwork(new AthenaInterprocess::ScheduledWork);
555 
556  // Return value: "ERRCODE|Func_Flag|NEvt" (Here NEvt=-1)
557  int outsize = 2*sizeof(int)+sizeof(AthenaMPToolBase::Func_Flag);
558  void* outdata = malloc(outsize);
559  *(int*)(outdata) = (all_ok?0:1); // Error code: for now use 0 success, 1 failure
561  memcpy((char*)outdata+sizeof(int),&func,sizeof(func));
562  int nEvt = -1;
563  memcpy((char*)outdata+sizeof(int)+sizeof(func),&nEvt,sizeof(int));
564 
565  outwork->data = outdata;
566  outwork->size = outsize;
567 
568  return outwork;
569 }

◆ finalize()

StatusCode SharedHiveEvtQueueConsumer::finalize ( )
overridevirtual

Reimplemented from AthenaMPToolBase.

Definition at line 94 of file SharedHiveEvtQueueConsumer.cxx.

95 {
96  if (m_evtContext) {
97  ATH_CHECK( evtSelector()->releaseContext (m_evtContext) );
98  m_evtContext = nullptr;
99  }
100 
101  delete m_sharedRankQueue;
102  return StatusCode::SUCCESS;
103 }

◆ fmterror()

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

Definition at line 358 of file AthenaMPToolBase.cxx.

359 {
360  char buf[256];
361  strerror_r(errnum, buf, sizeof(buf));
362  return std::string(buf);
363 }

◆ generateOutputReport()

AthenaMP::AllWorkerOutputs_ptr AthenaMPToolBase::generateOutputReport ( )
overridevirtualinherited

Implements IAthenaMPTool.

Reimplemented in EvtRangeProcessor, EvtRangeScatterer, SharedEvtQueueProvider, and SharedWriterTool.

Definition at line 131 of file AthenaMPToolBase.cxx.

132 {
134 
135  if(m_fileMgrLog.empty()) {
136  ATH_MSG_WARNING(name() << " cannot make output report because FileMgr has not been configured to write log file!");
137  }
138  else {
139  // Collect output files made by the workers
140  std::string line;
141  for(int i=0;i<m_nprocs;++i) {
142  // Get the name of FileMgr log
143  std::ostringstream workindex;
144  workindex<<i;
146  logFilePath /= std::filesystem::path(m_subprocDirPrefix+workindex.str());
147  std::filesystem::path logFile(logFilePath);
149  if(!(std::filesystem::exists(logFile)&&std::filesystem::is_regular_file(logFile))) {
150  ATH_MSG_WARNING(logFile.string() << " either does not exist or is not a regular file. Skipping");
151  continue;
152  }
153 
154  ATH_MSG_DEBUG("FileMgr log file (" << i << ") " << logFile);
155 
156  std::ifstream inpStream(logFile.string().c_str());
157  std::set<std::string> reportedFiles; // Don't report the same file twice
158  while(!inpStream.eof()) {
159  std::getline(inpStream,line);
160  if(line.find("WRITE")!=std::string::npos) {
161  // Parse the entry
162  size_t startpos(0);
163  std::vector<std::string> entries;
164  while(startpos<line.size()) {
165  while(line[startpos]==' ')
166  startpos++;
167 
168  size_t endpos = line.find(' ',startpos);
169  if(endpos==std::string::npos) endpos = line.size();
170  entries.push_back(line.substr(startpos,endpos-startpos));
171  startpos=endpos+1;
172  }
173 
174  // enties[0] is filename
175  std::filesystem::path filenamePath(entries[0]);
176  std::filesystem::path basename = filenamePath.filename();
177  if(reportedFiles.find(basename.string())==reportedFiles.end())
178  reportedFiles.insert(basename.string());
179  else
180  continue;
181  std::filesystem::path absolutename = basename.is_absolute() ? basename : std::filesystem::absolute(std::filesystem::path(logFilePath)/=basename);
182  AthenaMP::AllWorkerOutputsIterator it1 = jobOutputs->find(basename.string());
183  if(it1==jobOutputs->end()) {
184  (*jobOutputs)[basename.string()] = AthenaMP::SingleWorkerOutputs();
185  (*jobOutputs)[basename.string()].reserve(m_nprocs);
186  }
187 
188  AthenaMP::WorkerOutput newOutput;
189  newOutput.filename = absolutename.string();
190  newOutput.technology = entries[1];
191  newOutput.description = entries[2];
192  newOutput.access_mode = entries[3];
193  newOutput.shared = (line.find("SHARED")!=std::string::npos);
194 
195  (*jobOutputs)[basename.string()].push_back(newOutput);
196  }
197  }
198  }
199  }
200  return jobOutputs;
201 }

◆ handleSavedPfc()

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

Definition at line 421 of file AthenaMPToolBase.cxx.

422 {
423  if(std::filesystem::is_regular_file("PoolFileCatalog.xml.AthenaMP-saved"))
424  COPY_FILE_HACK("PoolFileCatalog.xml.AthenaMP-saved",dest_path.string()+"/PoolFileCatalog.xml");
425  return 0;
426 }

◆ initHive()

StatusCode SharedHiveEvtQueueConsumer::initHive ( )
private

Definition at line 637 of file SharedHiveEvtQueueConsumer.cxx.

637  {
638 
639  if (m_evtProcessor.release().isFailure()) {
640  ATH_MSG_INFO("could not release old EventProcessor ");
641  }
642 
643  ISvcManager* pISM(dynamic_cast<ISvcManager*>(serviceLocator().get()));
644  if (pISM == 0) {
645  ATH_MSG_ERROR("initHive: Could not get SvcManager");
646  } else {
647  if (pISM->removeService(m_evtProcessor.name()).isFailure()) {
648  ATH_MSG_ERROR("initHive: could not remove " << m_evtProcessor.name()
649  << " from SvcManager");
650  }
651  }
652 
653  m_evtProcessor = ServiceHandle<IEventProcessor>("AthenaMtesEventLoopMgr",name());
654 
655  if (m_evtProcessor.retrieve().isFailure()) {
656  ATH_MSG_ERROR("could not setup " << m_evtProcessor.typeAndName());
657  return StatusCode::FAILURE;
658  }
659 
660  m_schedulerSvc = serviceLocator()->service("AvalancheSchedulerSvc");
661 
662  // m_whiteboard = serviceLocator()->service(m_whiteboardName);
663  // if( !m_whiteboard.isValid() ) {
664  // ATH_MSG_FATAL( "Error retrieving " << m_whiteboardName
665  // << " interface IHiveWhiteBoard." );
666  // return StatusCode::FAILURE;
667  // }
668 
669  // m_schedulerSvc = serviceLocator()->service(m_schedulerName);
670  // if ( !m_schedulerSvc.isValid()){
671  // ATH_MSG_FATAL( "Error retrieving SchedulerSvc interface ISchedulerSvc." );
672  // return StatusCode::FAILURE;
673  // }
674  // // Setup algorithm resource pool
675  // m_algResourcePool = serviceLocator()->service("AlgResourcePool");
676  // if( !m_algResourcePool.isValid() ) {
677  // ATH_MSG_FATAL ("Error retrieving AlgResourcePool");
678  // return StatusCode::FAILURE;
679  // }
680 
681  // sc = m_eventStore.retrieve();
682  // if( !sc.isSuccess() ) {
683  // ATH_MSG_FATAL("Error retrieving pointer to StoreGateSvc");
684  // return sc;
685  // }
686 
687 
688  return StatusCode::SUCCESS;
689 
690 }

◆ initialize()

StatusCode SharedHiveEvtQueueConsumer::initialize ( )
overridevirtual

Reimplemented from AthenaMPToolBase.

Definition at line 65 of file SharedHiveEvtQueueConsumer.cxx.

66 {
67  ATH_MSG_DEBUG("In initialize");
68 
70  if(!sc.isSuccess())
71  return sc;
72 
73  m_evtSelSeek = serviceLocator()->service(m_evtSelName);
74  ATH_CHECK( m_evtSelSeek.isValid() );
75  ATH_CHECK( evtSelector()->createContext (m_evtContext) );
76 
77  ATH_CHECK(m_chronoStatSvc.retrieve());
78 
79  SmartIF<IConversionSvc> cnvSvc(serviceLocator()->service("AthenaPoolCnvSvc"));
80  m_dataShare = SmartIF<IDataShare>(cnvSvc);
81  if(!m_dataShare) {
82  if(m_useSharedWriter) {
83  ATH_MSG_ERROR("Error retrieving AthenaPoolCnvSvc " << cnvSvc);
84  return StatusCode::FAILURE;
85  }
86  }
87 
88  return StatusCode::SUCCESS;
89 }

◆ 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 213 of file AthenaMPToolBase.cxx.

214 {
216  kill(child.getProcessID(),SIGKILL);
217  }
218 }

◆ 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 281 of file AthenaMPToolBase.cxx.

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

◆ 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 444 of file AthenaMPToolBase.cxx.

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

◆ reopenFds()

int AthenaMPToolBase::reopenFds ( )
protectedinherited

Definition at line 365 of file AthenaMPToolBase.cxx.

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

◆ reportSubprocessStatuses()

void SharedHiveEvtQueueConsumer::reportSubprocessStatuses ( )
overridevirtual

Reimplemented from AthenaMPToolBase.

Definition at line 199 of file SharedHiveEvtQueueConsumer.cxx.

200 {
201  ATH_MSG_INFO("Statuses of event processors");
202  const std::vector<AthenaInterprocess::ProcessStatus>& statuses = m_processGroup->getStatuses();
203  for(size_t i=0; i<statuses.size(); ++i) {
204  // Get the number of events processed by this worker
205  std::map<pid_t,int>::const_iterator it = m_nProcessedEvents.find(statuses[i].pid);
206  msg(MSG::INFO) << "*** Process PID=" << statuses[i].pid
207  << ". Status " << ((statuses[i].exitcode)?"FAILURE":"SUCCESS")
208  << ". Number of events processed: ";
209  if(it==m_nProcessedEvents.end())
210  msg(MSG::INFO) << "N/A" << endmsg;
211  else
212  msg(MSG::INFO) << it->second << endmsg;
213  }
214 }

◆ setRandString()

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

Implements IAthenaMPTool.

Definition at line 208 of file AthenaMPToolBase.cxx.

209 {
210  m_randStr = randStr;
211 }

◆ subProcessLogs()

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

Implements IAthenaMPTool.

Definition at line 219 of file SharedHiveEvtQueueConsumer.cxx.

220 {
221  filenames.clear();
222  for(int i=0; i<m_nprocs; ++i) {
223  std::ostringstream workerIndex;
224  workerIndex << i;
225  std::filesystem::path worker_rundir(m_subprocTopDir);
226  worker_rundir /= std::filesystem::path(m_subprocDirPrefix+workerIndex.str());
227  filenames.push_back(worker_rundir.string()+std::string("/AthenaMP.log"));
228  }
229 }

◆ 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 337 of file AthenaMPToolBase.cxx.

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

◆ 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 203 of file AthenaMPToolBase.cxx.

204 {
206 }

◆ waitForSignal()

void AthenaMPToolBase::waitForSignal ( )
protectedinherited

Definition at line 428 of file AthenaMPToolBase.cxx.

429 {
430  ATH_MSG_INFO("Bootstrap worker PID " << getpid() << " - waiting for SIGUSR1");
431  sigset_t mask, oldmask;
432 
434 
435  sigemptyset (&mask);
436  sigaddset (&mask, SIGUSR1);
437 
438  sigprocmask (SIG_BLOCK, &mask, &oldmask);
440  sigsuspend (&oldmask);
441  sigprocmask (SIG_UNBLOCK, &mask, NULL);
442 }

Member Data Documentation

◆ m_appMgr

ServiceHandle<IAppMgrUI> AthenaMPToolBase::m_appMgr
protectedinherited

Definition at line 91 of file AthenaMPToolBase.h.

◆ m_chronoStatSvc

ServiceHandle<IChronoStatSvc> SharedHiveEvtQueueConsumer::m_chronoStatSvc
private

Definition at line 72 of file SharedHiveEvtQueueConsumer.h.

◆ m_dataShare

SmartIF<IDataShare> SharedHiveEvtQueueConsumer::m_dataShare
private

Definition at line 73 of file SharedHiveEvtQueueConsumer.h.

◆ m_debug

Gaudi::Property<bool> SharedHiveEvtQueueConsumer::m_debug
private
Initial value:
{
this, "Debug", false,
"Perform extra debugging if true. The default is false."}

Definition at line 61 of file SharedHiveEvtQueueConsumer.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_evtContext

IEvtSelector::Context* SharedHiveEvtQueueConsumer::m_evtContext {}
private

Definition at line 75 of file SharedHiveEvtQueueConsumer.h.

◆ m_evtProcessor

ServiceHandle<IEventProcessor> AthenaMPToolBase::m_evtProcessor
protectedinherited

Definition at line 90 of file AthenaMPToolBase.h.

◆ m_evtSelector

SmartIF<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_evtSelSeek

SmartIF<IEvtSelectorSeek> SharedHiveEvtQueueConsumer::m_evtSelSeek
private

Definition at line 74 of file SharedHiveEvtQueueConsumer.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_finQueue

std::queue<pid_t> SharedHiveEvtQueueConsumer::m_finQueue
private

Definition at line 81 of file SharedHiveEvtQueueConsumer.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_nEventsBeforeFork

Gaudi::Property<int> SharedHiveEvtQueueConsumer::m_nEventsBeforeFork
private
Initial value:
{
this, "EventsBeforeFork", 0,
"The number of events before forking the workers. The default is 0."}

Definition at line 57 of file SharedHiveEvtQueueConsumer.h.

◆ m_nProcessedEvents

std::map<pid_t,int> SharedHiveEvtQueueConsumer::m_nProcessedEvents
private

Definition at line 80 of file SharedHiveEvtQueueConsumer.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 SharedHiveEvtQueueConsumer::m_rankId {}
private

Definition at line 70 of file SharedHiveEvtQueueConsumer.h.

◆ m_schedulerSvc

SmartIF<IScheduler> SharedHiveEvtQueueConsumer::m_schedulerSvc
private

Definition at line 83 of file SharedHiveEvtQueueConsumer.h.

◆ m_sharedEventQueue

AthenaInterprocess::SharedQueue* SharedHiveEvtQueueConsumer::m_sharedEventQueue {}
private

Definition at line 77 of file SharedHiveEvtQueueConsumer.h.

◆ m_sharedRankQueue

AthenaInterprocess::SharedQueue* SharedHiveEvtQueueConsumer::m_sharedRankQueue {}
private

Definition at line 78 of file SharedHiveEvtQueueConsumer.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_useSharedWriter

Gaudi::Property<bool> SharedHiveEvtQueueConsumer::m_useSharedWriter
private
Initial value:
{
this, "UseSharedWriter", false,
"Use SharedWriter to merge worker outputs on-the-fly if true. The default is false."}

Definition at line 65 of file SharedHiveEvtQueueConsumer.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
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
checkFileSG.line
line
Definition: checkFileSG.py:75
IHybridProcessorHelper::setCurrentEventNum
virtual void setCurrentEventNum(int num)=0
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
AthenaMPToolBase::ESRANGE_BADINPFILE
@ ESRANGE_BADINPFILE
Definition: AthenaMPToolBase.h:62
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
AthenaMP::WorkerOutput::description
std::string description
Definition: IAthenaMPTool.h:20
SharedHiveEvtQueueConsumer::m_schedulerSvc
SmartIF< IScheduler > m_schedulerSvc
Definition: SharedHiveEvtQueueConsumer.h:83
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
AthenaInterprocess::UpdateAfterFork
Definition: Incidents.h:22
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:29
skel.it
it
Definition: skel.GENtoEVGEN.py:396
AthenaMPToolBase::fmterror
std::string fmterror(int errnum)
Definition: AthenaMPToolBase.cxx:358
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
AthenaMPToolBase::m_evtSelName
std::string m_evtSelName
Definition: AthenaMPToolBase.h:86
AthenaInterprocess::SharedQueue::try_receive_basic
bool try_receive_basic(T &)
Definition: SharedQueue.h:119
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
AthenaMPToolBase::ESRANGE_SEEKFAILED
@ ESRANGE_SEEKFAILED
Definition: AthenaMPToolBase.h:59
SharedHiveEvtQueueConsumer::m_sharedRankQueue
AthenaInterprocess::SharedQueue * m_sharedRankQueue
Definition: SharedHiveEvtQueueConsumer.h:78
AthenaMPToolBase::m_fileMgrLog
std::string m_fileMgrLog
Definition: AthenaMPToolBase.h:95
AthExHiveOpts.chunkSize
chunkSize
Definition: AthExHiveOpts.py:101
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
AthenaMP::AllWorkerOutputsIterator
AllWorkerOutputs::iterator AllWorkerOutputsIterator
Definition: IAthenaMPTool.h:26
AthenaMP::SingleWorkerOutputs
std::vector< WorkerOutput > SingleWorkerOutputs
Definition: IAthenaMPTool.h:24
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
jetMakeRefSamples.skipEvents
int skipEvents
Definition: jetMakeRefSamples.py:56
COPY_FILE_HACK
#define COPY_FILE_HACK(_src, _dest)
Definition: copy_file_icc_hack.h:15
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
SharedHiveEvtQueueConsumer::m_nProcessedEvents
std::map< pid_t, int > m_nProcessedEvents
Definition: SharedHiveEvtQueueConsumer.h:80
IHybridProcessorHelper
Helper interface for implementing hybrid MP+MT. Used by the Hybrid Shared Event Queue Consumer MP too...
Definition: IHybridProcessorHelper.h:16
sigset_t
int sigset_t
Definition: SealSignal.h:80
SharedHiveEvtQueueConsumer::m_sharedEventQueue
AthenaInterprocess::SharedQueue * m_sharedEventQueue
Definition: SharedHiveEvtQueueConsumer.h:77
Cut::signal
@ signal
Definition: SUSYToolsAlg.cxx:67
SharedHiveEvtQueueConsumer::m_evtSelSeek
SmartIF< IEvtSelectorSeek > m_evtSelSeek
Definition: SharedHiveEvtQueueConsumer.h:74
AthenaMPToolBase::m_evtSelector
SmartIF< IEvtSelector > m_evtSelector
Definition: AthenaMPToolBase.h:94
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
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
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
lumiFormat.i
int i
Definition: lumiFormat.py:85
python.DecayParser.buf
buf
print ("=> [%s]"cmd)
Definition: DecayParser.py:27
SharedHiveEvtQueueConsumer::m_dataShare
SmartIF< IDataShare > m_dataShare
Definition: SharedHiveEvtQueueConsumer.h:73
DetDescrDictionaryDict::it1
std::vector< HWIdentifier >::iterator it1
Definition: DetDescrDictionaryDict.h:17
AthenaMPToolBase::Func_Flag
Func_Flag
Definition: AthenaMPToolBase.h:65
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
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:444
SharedHiveEvtQueueConsumer_d::pauseForDebug
void pauseForDebug(int)
Definition: SharedHiveEvtQueueConsumer.cxx:34
AthenaMPToolBase::AthenaMPToolBase
AthenaMPToolBase()
AthenaMP::WorkerOutput::shared
bool shared
Definition: IAthenaMPTool.h:22
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
AthenaMPToolBase::evtSelector
IEvtSelector * evtSelector()
Definition: AthenaMPToolBase.h:81
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
AthenaMP::WorkerOutput::access_mode
std::string access_mode
Definition: IAthenaMPTool.h:21
TrigInDetValidation_Base.malloc
malloc
Definition: TrigInDetValidation_Base.py:132
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:337
AthenaMPToolBase::initialize
virtual StatusCode initialize() override
Definition: AthenaMPToolBase.cxx:55
AthenaInterprocess::SharedQueue::receive_basic
bool receive_basic(T &)
Definition: SharedQueue.h:124
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
SharedHiveEvtQueueConsumer::m_evtContext
IEvtSelector::Context * m_evtContext
Definition: SharedHiveEvtQueueConsumer.h:75
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:228
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:281
AthenaInterprocess::Process
Definition: Process.h:17
LArG4FSStartPointFilter.outdata
outdata
Definition: LArG4FSStartPointFilter.py:62
SharedHiveEvtQueueConsumer_d::sig_done
std::atomic< bool > sig_done
Definition: SharedHiveEvtQueueConsumer.cxx:33
grepfile.filenames
list filenames
Definition: grepfile.py:34
Trk::open
@ open
Definition: BinningType.h:40
ir
int ir
counter of the current depth
Definition: fastadd.cxx:49
SharedHiveEvtQueueConsumer::initHive
StatusCode initHive()
Definition: SharedHiveEvtQueueConsumer.cxx:637
SharedHiveEvtQueueConsumer::m_rankId
int m_rankId
Definition: SharedHiveEvtQueueConsumer.h:70
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthenaMP::WorkerOutput::technology
std::string technology
Definition: IAthenaMPTool.h:19
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
SharedHiveEvtQueueConsumer::m_chronoStatSvc
ServiceHandle< IChronoStatSvc > m_chronoStatSvc
Definition: SharedHiveEvtQueueConsumer.h:72
AthenaMP::WorkerOutput
Definition: IAthenaMPTool.h:17
IHybridProcessorHelper::drainScheduler
virtual int drainScheduler(int &finishedEvts, bool report)=0
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
IHybridProcessorHelper::resetAppReturnCode
virtual void resetAppReturnCode()=0
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
entries
double entries
Definition: listroot.cxx:49
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
AthenaMPToolBase::m_subprocDirPrefix
std::string m_subprocDirPrefix
Definition: AthenaMPToolBase.h:85
AthenaMPToolBase::m_subprocTopDir
std::string m_subprocTopDir
Definition: AthenaMPToolBase.h:84
python.dummyaccess.exists
def exists(filename)
Definition: dummyaccess.py:9
AthenaMPToolBase::ESRANGE_NOTFOUND
@ ESRANGE_NOTFOUND
Definition: AthenaMPToolBase.h:58
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
jetMakeRefSamples.logFile
string logFile
Definition: jetMakeRefSamples.py:57
AthenaMPToolBase::handleSavedPfc
int handleSavedPfc(const std::filesystem::path &dest_path)
Definition: AthenaMPToolBase.cxx:421
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
SharedHiveEvtQueueConsumer::m_useSharedWriter
Gaudi::Property< bool > m_useSharedWriter
Definition: SharedHiveEvtQueueConsumer.h:65
AthenaMPToolBase::FUNC_BOOTSTRAP
@ FUNC_BOOTSTRAP
Definition: AthenaMPToolBase.h:66
AthenaMPToolBase::reopenFds
int reopenFds()
Definition: AthenaMPToolBase.cxx:365
SharedHiveEvtQueueConsumer::m_debug
Gaudi::Property< bool > m_debug
Definition: SharedHiveEvtQueueConsumer.h:61
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
AthenaMP::WorkerOutput::filename
std::string filename
Definition: IAthenaMPTool.h:18
fitman.k
k
Definition: fitman.py:528
AthenaMPToolBase_d::sig_done
std::atomic< bool > sig_done
Definition: AthenaMPToolBase.cxx:26
IHybridProcessorHelper::terminateLoop
virtual bool terminateLoop()=0
ServiceHandle< IEventProcessor >
AthenaMPToolBase::m_evtProcessor
ServiceHandle< IEventProcessor > m_evtProcessor
Definition: AthenaMPToolBase.h:90
beamspotman.basename
basename
Definition: beamspotman.py:640