ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
EL::JobConfig Class Referencefinal

the job configuration that is independent of driver and dataset More...

#include <JobConfig.h>

Inheritance diagram for EL::JobConfig:
Collaboration diagram for EL::JobConfig:

Public Member Functions

void testInvariant () const
 test the invariant of this object More...
 
 JobConfig () noexcept
 standard constructor More...
 
 JobConfig (const JobConfig &that)
 standard copy constructor More...
 
 JobConfig (JobConfig &&that) noexcept
 standard move constructor More...
 
virtual ~JobConfig () noexcept
 standard destructor More...
 
JobConfigoperator= (const JobConfig &that)
 standard assignment operator More...
 
JobConfigoperator= (JobConfig &&that) noexcept
 standard move assignment operator More...
 
void swap (JobConfig &that) noexcept
 standard swap More...
 
::StatusCode addAlgorithm (std::unique_ptr< IAlgorithmWrapper > &&val_algorithm)
 add an algorithm More...
 
const IAlgorithmWrappergetAlgorithm (std::string_view name) const noexcept
 get the algorithm with the given name, or nullptr if there is no algorithm with that name More...
 
std::vector< std::unique_ptr< EL::IAlgorithmWrapper > > extractAlgorithms ()
 extract the list of algorithms from this object More...
 
std::size_t numberOfAlgorithms () const noexcept
 get the number of algorithms configured More...
 

Private Member Functions

 ClassDef (JobConfig, 1)
 

Private Attributes

std::size_t m_algorithmCount = 0
 the number of algorithms added More...
 
std::vector< std::unique_ptr< EL::IAlgorithmWrapper > > m_algorithms
 the list of algorithms added More...
 

Detailed Description

the job configuration that is independent of driver and dataset

This is a work in progress (03 Feb 18), but essentially the idea is that this will contain he generic configuration of the user job (whatever that is), which will then be combined with the configuration for how it is to be run and with the configuration for which data to run over.

For now (03 Feb 18) this is just the list of algorithms we configured. That way that code is bundled in a single place and I can add some extra checks. There used to be some issues with the grid driver not correctly detecting when algorithms could not be loaded, which should be avoided this way.

Definition at line 38 of file JobConfig.h.

Constructor & Destructor Documentation

◆ JobConfig() [1/3]

EL::JobConfig::JobConfig ( )
noexcept

standard constructor

Guarantee
no-fail

◆ JobConfig() [2/3]

EL::JobConfig::JobConfig ( const JobConfig that)

standard copy constructor

Guarantee
strong
Failures
out of memory II
algorithm clone failures

◆ JobConfig() [3/3]

EL::JobConfig::JobConfig ( JobConfig &&  that)
noexcept

standard move constructor

Guarantee
no-fail

◆ ~JobConfig()

virtual EL::JobConfig::~JobConfig ( )
virtualnoexcept

standard destructor

Guarantee
no-fail

Member Function Documentation

◆ addAlgorithm()

::StatusCode EL::JobConfig::addAlgorithm ( std::unique_ptr< IAlgorithmWrapper > &&  val_algorithm)

add an algorithm

Guarantee
strong
Failures
out of memory II
algorithm of same name already present
Precondition
val_algorithm != nullptr

◆ ClassDef()

EL::JobConfig::ClassDef ( JobConfig  ,
 
)
private

◆ extractAlgorithms()

std::vector<std::unique_ptr<EL::IAlgorithmWrapper> > EL::JobConfig::extractAlgorithms ( )

extract the list of algorithms from this object

This will check for any possible streaming errors before extracting.

Guarantee
strong
Failures
streaming errors

◆ getAlgorithm()

const IAlgorithmWrapper* EL::JobConfig::getAlgorithm ( std::string_view  name) const
noexcept

get the algorithm with the given name, or nullptr if there is no algorithm with that name

Guarantee
no-fail

◆ numberOfAlgorithms()

std::size_t EL::JobConfig::numberOfAlgorithms ( ) const
noexcept

get the number of algorithms configured

Guarantee
no-fail

◆ operator=() [1/2]

JobConfig& EL::JobConfig::operator= ( const JobConfig that)

standard assignment operator

Guarantee
strong
Failures
out of memory II
algorithm clone failures

◆ operator=() [2/2]

JobConfig& EL::JobConfig::operator= ( JobConfig &&  that)
noexcept

standard move assignment operator

Guarantee
no-fail

◆ swap()

void EL::JobConfig::swap ( JobConfig that)
noexcept

standard swap

Guarantee
no-fail

◆ testInvariant()

void EL::JobConfig::testInvariant ( ) const

test the invariant of this object

Guarantee
no-fail

Member Data Documentation

◆ m_algorithmCount

std::size_t EL::JobConfig::m_algorithmCount = 0
private

the number of algorithms added

This is used to double-check that we didn't lose any algorithms during serialization.

Definition at line 155 of file JobConfig.h.

◆ m_algorithms

std::vector<std::unique_ptr<EL::IAlgorithmWrapper> > EL::JobConfig::m_algorithms
private

the list of algorithms added

\warn This may contain nullptr if the clone failed (usually due to missing dictionaries/libraries). All users of this member need to check it regularly.

Definition at line 163 of file JobConfig.h.


The documentation for this class was generated from the following file: