![]() |
ATLAS Offline Software
|
#include <EvtRangeProcessor.h>
Public Member Functions | |
EvtRangeProcessor (const std::string &type, const std::string &name, const IInterface *parent) | |
virtual | ~EvtRangeProcessor () override |
virtual StatusCode | initialize () 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 AthenaMP::AllWorkerOutputs_ptr | generateOutputReport () override |
virtual std::unique_ptr< AthenaInterprocess::ScheduledWork > | bootstrap_func () override |
virtual std::unique_ptr< AthenaInterprocess::ScheduledWork > | exec_func () override |
virtual std::unique_ptr< AthenaInterprocess::ScheduledWork > | fin_func () override |
virtual StatusCode | finalize () override |
virtual void | useFdsRegistry (std::shared_ptr< AthenaInterprocess::FdsRegistry >) override |
virtual void | setRandString (const std::string &randStr) override |
virtual void | setMaxEvt (int maxEvt) override |
virtual void | setMPRunStop (const AthenaInterprocess::IMPRunStop *runStop) override |
virtual void | killChildren () override |
virtual std::unique_ptr< AthenaInterprocess::ScheduledWork > virtual operator() ATLAS_NOT_THREAD_SAFE(const AthenaInterprocess std::unique_ptr< AthenaInterprocess::ScheduledWork > | bootstrap_func ()=0 |
virtual std::unique_ptr< ScheduledWork > | operator () ATLAS_NOT_THREAD_SAFE(const ScheduledWork &)=0 |
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 () |
Protected Attributes | |
int | m_nprocs {-1} |
Number of workers spawned by the master process. More... | |
int | m_maxEvt {-1} |
Maximum number of events assigned to the job. More... | |
std::string | m_subprocTopDir |
Top run directory for subprocesses. More... | |
std::string | m_subprocDirPrefix |
For ex. "worker__". More... | |
std::string | m_evtSelName |
Name of the event selector. More... | |
AthenaInterprocess::ProcessGroup * | m_processGroup {nullptr} |
const AthenaInterprocess::IMPRunStop * | m_mpRunStop {nullptr} |
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::FdsRegistry > | m_fdsRegistry |
std::string | m_randStr |
Gaudi::Property< bool > | m_isPileup {this, "IsPileup", false, "Flag for configuring PileUpEventLoopMgr"} |
Private Types | |
enum | ProcessState { PROC_STATE_INIT, PROC_STATE_EXEC, PROC_STATE_FIN, PROC_STATE_STOP } |
Private Member Functions | |
StatusCode startProcess | ATLAS_NOT_THREAD_SAFE () |
StatusCode | setNewInputFile (const std::string &newFile) |
void | reportError (yampl::ISocket *socket, AthenaMPToolBase::ESRange_Status status) |
int | reopenFd (int fd, const std::string &name) |
Private Attributes | |
Gaudi::Property< int > | m_nEventsBeforeFork {this, "EventsBeforeFork", 0, "Number of events before forking"} |
Gaudi::Property< std::string > | m_channel2Scatterer {this, "Channel2Scatterer", {}} |
Gaudi::Property< std::string > | m_channel2EvtSel {this, "Channel2EvtSel", {}} |
Gaudi::Property< bool > | m_debug {this, "Debug", false} |
int | m_rankId {-1} |
Each worker has its own unique RankID from the range (0,...,m_nprocs-1) More... | |
int | m_activeWorkers {0} |
Keep track of the number of workers. More... | |
std::string | m_inpFile |
Cached name of the input file. To avoid reopening. More... | |
ServiceHandle< IChronoStatSvc > | m_chronoStatSvc |
ServiceHandle< IIncidentSvc > | m_incidentSvc |
SmartIF< IEvtSelectorSeek > | m_evtSeek |
std::unique_ptr< AthenaInterprocess::SharedQueue > | m_sharedRankQueue |
AthenaInterprocess::SharedQueue * | m_sharedFailedPidQueue {nullptr} |
std::map< pid_t, int > | m_nProcessedEvents |
std::deque< pid_t > | m_finQueue |
std::map< pid_t, ProcessState > | m_procStates |
Definition at line 25 of file EvtRangeProcessor.h.
|
protectedinherited |
Enumerator | |
---|---|
ESRANGE_SUCCESS | |
ESRANGE_NOTFOUND | |
ESRANGE_SEEKFAILED | |
ESRANGE_PROCFAILED | |
ESRANGE_FILENOTMADE | |
ESRANGE_BADINPFILE |
Definition at line 58 of file AthenaMPToolBase.h.
|
protectedinherited |
Enumerator | |
---|---|
FUNC_BOOTSTRAP | |
FUNC_EXEC | |
FUNC_FIN |
Definition at line 67 of file AthenaMPToolBase.h.
|
private |
Enumerator | |
---|---|
PROC_STATE_INIT | |
PROC_STATE_EXEC | |
PROC_STATE_FIN | |
PROC_STATE_STOP |
Definition at line 56 of file EvtRangeProcessor.h.
EvtRangeProcessor::EvtRangeProcessor | ( | const std::string & | type, |
const std::string & | name, | ||
const IInterface * | parent | ||
) |
Definition at line 33 of file EvtRangeProcessor.cxx.
|
overridevirtual |
Definition at line 43 of file EvtRangeProcessor.cxx.
|
private |
|
overridevirtual |
|
protectedinherited |
|
overridevirtual |
|
overridevirtual |
Reimplemented from AthenaMPToolBase.
|
overridevirtual |
Definition at line 357 of file EvtRangeProcessor.cxx.
|
pure virtualinherited |
|
inlineprotectedinherited |
Definition at line 83 of file AthenaMPToolBase.h.
|
overridevirtual |
Implements AthenaMPToolBase.
Definition at line 473 of file EvtRangeProcessor.cxx.
|
overridevirtual |
Implements AthenaMPToolBase.
Definition at line 684 of file EvtRangeProcessor.cxx.
|
overridevirtualinherited |
Reimplemented in SharedEvtQueueConsumer, SharedHiveEvtQueueConsumer, EvtRangeScatterer, and SharedWriterTool.
Definition at line 86 of file AthenaMPToolBase.cxx.
|
protectedinherited |
Definition at line 332 of file AthenaMPToolBase.cxx.
|
overridevirtual |
|
protectedinherited |
Definition at line 395 of file AthenaMPToolBase.cxx.
|
overridevirtual |
|
overridevirtualinherited |
Definition at line 200 of file AthenaMPToolBase.cxx.
|
pure virtualinherited |
|
protectedinherited |
Definition at line 268 of file AthenaMPToolBase.cxx.
|
privateinherited |
Definition at line 418 of file AthenaMPToolBase.cxx.
|
protectedinherited |
Definition at line 339 of file AthenaMPToolBase.cxx.
|
private |
Definition at line 773 of file EvtRangeProcessor.cxx.
|
overridevirtual |
|
inlineoverridevirtualinherited |
Definition at line 44 of file AthenaMPToolBase.h.
|
inlineoverridevirtualinherited |
Definition at line 45 of file AthenaMPToolBase.h.
|
private |
Definition at line 739 of file EvtRangeProcessor.cxx.
|
overridevirtualinherited |
Definition at line 195 of file AthenaMPToolBase.cxx.
|
overridevirtual |
Definition at line 339 of file EvtRangeProcessor.cxx.
|
protectedinherited |
Definition at line 321 of file AthenaMPToolBase.cxx.
|
overridevirtualinherited |
Definition at line 190 of file AthenaMPToolBase.cxx.
|
protectedinherited |
Definition at line 402 of file AthenaMPToolBase.cxx.
|
private |
Keep track of the number of workers.
Definition at line 69 of file EvtRangeProcessor.h.
|
protectedinherited |
Definition at line 95 of file AthenaMPToolBase.h.
|
private |
Definition at line 65 of file EvtRangeProcessor.h.
|
private |
Definition at line 64 of file EvtRangeProcessor.h.
|
private |
Definition at line 72 of file EvtRangeProcessor.h.
|
private |
Definition at line 66 of file EvtRangeProcessor.h.
|
protectedinherited |
Definition at line 94 of file AthenaMPToolBase.h.
|
private |
Definition at line 74 of file EvtRangeProcessor.h.
|
protectedinherited |
Definition at line 98 of file AthenaMPToolBase.h.
|
protectedinherited |
Name of the event selector.
Definition at line 89 of file AthenaMPToolBase.h.
|
protectedinherited |
Definition at line 100 of file AthenaMPToolBase.h.
|
protectedinherited |
Definition at line 96 of file AthenaMPToolBase.h.
|
protectedinherited |
Definition at line 99 of file AthenaMPToolBase.h.
|
private |
Definition at line 80 of file EvtRangeProcessor.h.
|
private |
Definition at line 73 of file EvtRangeProcessor.h.
|
private |
Cached name of the input file. To avoid reopening.
Definition at line 70 of file EvtRangeProcessor.h.
|
protectedinherited |
Definition at line 97 of file AthenaMPToolBase.h.
|
protectedinherited |
Definition at line 103 of file AthenaMPToolBase.h.
|
protectedinherited |
Maximum number of events assigned to the job.
Definition at line 86 of file AthenaMPToolBase.h.
|
protectedinherited |
Definition at line 92 of file AthenaMPToolBase.h.
|
private |
Definition at line 63 of file EvtRangeProcessor.h.
|
private |
Definition at line 79 of file EvtRangeProcessor.h.
|
protectedinherited |
Number of workers spawned by the master process.
Definition at line 85 of file AthenaMPToolBase.h.
|
protectedinherited |
Definition at line 91 of file AthenaMPToolBase.h.
|
private |
Definition at line 81 of file EvtRangeProcessor.h.
|
protectedinherited |
Definition at line 101 of file AthenaMPToolBase.h.
|
private |
Each worker has its own unique RankID from the range (0,...,m_nprocs-1)
Definition at line 68 of file EvtRangeProcessor.h.
|
private |
Definition at line 77 of file EvtRangeProcessor.h.
|
private |
Definition at line 76 of file EvtRangeProcessor.h.
|
protectedinherited |
For ex. "worker__".
Definition at line 88 of file AthenaMPToolBase.h.
|
protectedinherited |
Top run directory for subprocesses.
Definition at line 87 of file AthenaMPToolBase.h.