ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
EL::Detail::ManagerData Struct Referencefinal

an internal data structure for passing data between different manager objects anbd step More...

#include <ManagerData.h>

Collaboration diagram for EL::Detail::ManagerData:

Public Member Functions

 ManagerData () noexcept
 standard constructor More...
 
 ~ManagerData () noexcept
 standard destructor More...
 
void addManager (std::unique_ptr< Manager > manager)
 add the given manager More...
 
::StatusCode run ()
 run all the managers from start to finish More...
 

Public Attributes

const Driverdriver {nullptr}
 the driver we are working on/with More...
 
std::string submitDir
 the path to the submission directory More...
 
SubmitDirMode submitDirMode {SubmitDirMode::NO_CLOBBER}
 the mode with which we handle the submission directory More...
 
bool resubmit {false}
 whether we are merely resubmitting this job More...
 
std::string resubmitOption
 if we are resubmitting, the resubmit option chosen More...
 
SH::MetaObject options
 the options with which we submit this job More...
 
Jobjob {nullptr}
 the user job we are submitting More...
 
bool submitted {false}
 whether we successfully submitted the job in this process More...
 
bool retrieved {false}
 whether we successfully retrieved the job in this process More...
 
bool completed {false}
 whether the job completed More...
 
std::unique_ptr< BatchJobbatchJob
 if we run in batch, the batch job object we are using More...
 
std::vector< std::size_t > batchJobIndices
 if we run in batch, this is the list of job-indices to run More...
 
std::string batchName
 the name of the submission script to use. More...
 
std::string batchInit
 any additional code we need for setting up the batch job. More...
 
std::string batchJobId
 the code needed for setting EL_JOBID More...
 
bool batchSkipReleaseSetup {false}
 whether to skip the release setup More...
 
std::string batchWriteLocation
 the directory location for writing batch output More...
 
std::string batchSubmitLocation
 the directory location with batch input configuration More...
 
bool sharedFileSystem {true}
 whether we have/use a shared file system More...
 
std::set< std::size_t > batchJobSuccess
 the list of successful, failed, unknown batch segments More...
 
std::set< std::size_t > batchJobFailure
 
std::set< std::size_t > batchJobUnknown
 
ManagerStep step {ManagerStep::initial}
 the current ManagerStep More...
 
ManagerStep nextStep {ManagerStep::initial}
 the next ManagerStep More...
 
std::map< std::pair< ManagerOrder, std::string >, std::unique_ptr< Manager > > managers
 the list of managers to run More...
 

Detailed Description

an internal data structure for passing data between different manager objects anbd step

Essentially Manager objects don't talk to each other directly and don't cache any information between steps. So any data that needs to get stored and passed around instead gets added to this structure. Among other things this means that managers are only fairly loosely coupled and don't really need to know about each other.

Generally only some of the information in this structure will be used for any given operation. That is considered acceptable, as the cost of extra members in this data structure are very low. Though it does make for a rather large data structure.

Definition at line 45 of file ManagerData.h.

Constructor & Destructor Documentation

◆ ManagerData()

EL::Detail::ManagerData::ManagerData ( )
noexcept

standard constructor

This is mostly defined, so that this include file doesn't need to include a whole bunch of other files, just to destruct their objects

Definition at line 30 of file ManagerData.cxx.

32  {}

◆ ~ManagerData()

EL::Detail::ManagerData::~ManagerData ( )
noexcept

standard destructor

This is mostly defined, so that this include file doesn't need to include a whole bunch of other files, just to destruct their objects

Definition at line 36 of file ManagerData.cxx.

38  {}

Member Function Documentation

◆ addManager()

void EL::Detail::ManagerData::addManager ( std::unique_ptr< Manager manager)

add the given manager

Guarantee
strong
Failures
duplicate order entry
out of memory I

Definition at line 42 of file ManagerData.cxx.

44  {
45  if (managers.find (manager->getManagerOrder()) != managers.end())
46  throw std::logic_error ("duplicate manager order " + std::to_string (unsigned (manager->getManagerOrder().first)) + " " + manager->getManagerOrder().second);
47  managers.insert (std::make_pair (manager->getManagerOrder(), std::move (manager)));
48  }

◆ run()

StatusCode EL::Detail::ManagerData::run ( )

run all the managers from start to finish

Guarantee
basic
Failures
manager errors

Definition at line 52 of file ManagerData.cxx.

54  {
56  throw std::logic_error ("ManagerData::run() called twice");
57 
58  do
59  {
60  step = nextStep;
61  nextStep = Detail::ManagerStep (unsigned (step) + 1);
62  ANA_MSG_DEBUG ("running step " << unsigned (step) << " / " << unsigned (Detail::ManagerStep::final));
63  for (const auto& manager : managers)
64  {
65  if (manager.second->doManagerStep (*this).isFailure())
66  {
67  ANA_MSG_ERROR ("while performing manager step " << unsigned (step));
68  ANA_MSG_ERROR ("on submission directory " << submitDir);
69  return ::StatusCode::FAILURE;
70  }
71  }
72  } while (step != Detail::ManagerStep::final);
73  return ::StatusCode::SUCCESS;
74  }

Member Data Documentation

◆ batchInit

std::string EL::Detail::ManagerData::batchInit

any additional code we need for setting up the batch job.

if multiple files are used, {JOBID} will be replaced with the index of the current file.

Some batch systems need extra lines when making there submission scripts, which can either be specially formatted option lines or just some special commands.

Definition at line 120 of file ManagerData.h.

◆ batchJob

std::unique_ptr<BatchJob> EL::Detail::ManagerData::batchJob

if we run in batch, the batch job object we are using

Definition at line 96 of file ManagerData.h.

◆ batchJobFailure

std::set<std::size_t> EL::Detail::ManagerData::batchJobFailure

Definition at line 160 of file ManagerData.h.

◆ batchJobId

std::string EL::Detail::ManagerData::batchJobId

the code needed for setting EL_JOBID

Normally one can just pass the index of the job as the first argument to the execution script, but some systems instead use environment variables rationale.

This is not used if we have separate execution scripts from the job.

Definition at line 131 of file ManagerData.h.

◆ batchJobIndices

std::vector<std::size_t> EL::Detail::ManagerData::batchJobIndices

if we run in batch, this is the list of job-indices to run

Definition at line 100 of file ManagerData.h.

◆ batchJobSuccess

std::set<std::size_t> EL::Detail::ManagerData::batchJobSuccess

the list of successful, failed, unknown batch segments

Definition at line 159 of file ManagerData.h.

◆ batchJobUnknown

std::set<std::size_t> EL::Detail::ManagerData::batchJobUnknown

Definition at line 161 of file ManagerData.h.

◆ batchName

std::string EL::Detail::ManagerData::batchName

the name of the submission script to use.

if this contains {JOBID} it will create one script for each job id

Some batch systems are picky about names. Others don't allow passing arguments into submission scripts. So this allows being flexible.

Definition at line 110 of file ManagerData.h.

◆ batchSkipReleaseSetup

bool EL::Detail::ManagerData::batchSkipReleaseSetup {false}

whether to skip the release setup

Some batch drivers will setup the release in their own way, or will not need a release setup. Setting this to true will skip the standard release setup.

Besides avoiding to create the release setup commands, this will also suppress errors when the cmake-work-directory can not be located.

Definition at line 143 of file ManagerData.h.

◆ batchSubmitLocation

std::string EL::Detail::ManagerData::batchSubmitLocation

the directory location with batch input configuration

Definition at line 151 of file ManagerData.h.

◆ batchWriteLocation

std::string EL::Detail::ManagerData::batchWriteLocation

the directory location for writing batch output

Definition at line 147 of file ManagerData.h.

◆ completed

bool EL::Detail::ManagerData::completed {false}

whether the job completed

Definition at line 93 of file ManagerData.h.

◆ driver

const Driver* EL::Detail::ManagerData::driver {nullptr}

the driver we are working on/with

Definition at line 63 of file ManagerData.h.

◆ job

Job* EL::Detail::ManagerData::job {nullptr}

the user job we are submitting

Definition at line 82 of file ManagerData.h.

◆ managers

std::map<std::pair<ManagerOrder,std::string>,std::unique_ptr<Manager> > EL::Detail::ManagerData::managers

the list of managers to run

Definition at line 175 of file ManagerData.h.

◆ nextStep

ManagerStep EL::Detail::ManagerData::nextStep {ManagerStep::initial}

the next ManagerStep

By having this part of the manager data I am able to adjust the flow order via the managers (if desired)

Definition at line 171 of file ManagerData.h.

◆ options

SH::MetaObject EL::Detail::ManagerData::options

the options with which we submit this job

Definition at line 79 of file ManagerData.h.

◆ resubmit

bool EL::Detail::ManagerData::resubmit {false}

whether we are merely resubmitting this job

Definition at line 73 of file ManagerData.h.

◆ resubmitOption

std::string EL::Detail::ManagerData::resubmitOption

if we are resubmitting, the resubmit option chosen

Definition at line 76 of file ManagerData.h.

◆ retrieved

bool EL::Detail::ManagerData::retrieved {false}

whether we successfully retrieved the job in this process

Definition at line 90 of file ManagerData.h.

◆ sharedFileSystem

bool EL::Detail::ManagerData::sharedFileSystem {true}

whether we have/use a shared file system

Definition at line 155 of file ManagerData.h.

◆ step

ManagerStep EL::Detail::ManagerData::step {ManagerStep::initial}

the current ManagerStep

Definition at line 165 of file ManagerData.h.

◆ submitDir

std::string EL::Detail::ManagerData::submitDir

the path to the submission directory

Definition at line 66 of file ManagerData.h.

◆ submitDirMode

SubmitDirMode EL::Detail::ManagerData::submitDirMode {SubmitDirMode::NO_CLOBBER}

the mode with which we handle the submission directory

Definition at line 70 of file ManagerData.h.

◆ submitted

bool EL::Detail::ManagerData::submitted {false}

whether we successfully submitted the job in this process

Definition at line 86 of file ManagerData.h.


The documentation for this struct was generated from the following files:
ANA_MSG_ERROR
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:294
EL::Detail::ManagerStep::final
@ final
EL::Detail::ManagerData::step
ManagerStep step
the current ManagerStep
Definition: ManagerData.h:165
EL::Detail::ManagerStep
ManagerStep
the individual steps of preparing a job for submission
Definition: ManagerStep.h:42
EL::Detail::ManagerStep::initial
@ initial
this is just the initial step we do, nothing really happens here
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
EL::Detail::ManagerData::nextStep
ManagerStep nextStep
the next ManagerStep
Definition: ManagerData.h:171
EL::Detail::ManagerData::submitDir
std::string submitDir
the path to the submission directory
Definition: ManagerData.h:66
python.Logging.manager
manager
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/Logging.py:92
EL::Detail::ManagerData::managers
std::map< std::pair< ManagerOrder, std::string >, std::unique_ptr< Manager > > managers
the list of managers to run
Definition: ManagerData.h:175
ANA_MSG_DEBUG
#define ANA_MSG_DEBUG(xmsg)
Macro printing debug messages.
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:288