ATLAS Offline Software
Loading...
Searching...
No Matches
EL::AnaReentrantAlgorithmWrapper Class Referencefinal

an IAlgorithmWrapper for AnaReentrantAlgorithm More...

#include <AnaReentrantAlgorithmWrapper.h>

Inheritance diagram for EL::AnaReentrantAlgorithmWrapper:
Collaboration diagram for EL::AnaReentrantAlgorithmWrapper:

Public Member Functions

void testInvariant () const
 test the invariant of this object
 AnaReentrantAlgorithmWrapper ()
 standard default constructor for serialization
 AnaReentrantAlgorithmWrapper (AnaReentrantAlgorithmConfig val_config)
 standard constructor
virtual std::string_view getName () const override
virtual bool hasName (const std::string &name) const override
 whether this algorithm has the given name
virtual std::unique_ptr< IAlgorithmWrappermakeClone () const override
 make a clone of this algorithm
virtual StatusCode initialize (const AlgorithmWorkerData &workerData) override
 call initialize on the algorithm
virtual StatusCode execute () override
 call execute on the algorithm
virtual StatusCode finalize () override
 call finalize on the algorithm
virtual::StatusCode fileExecute () override
 call fileExecute on the algorithm
virtual::StatusCode beginInputFile () override
 call beginInputFile on the algorithm
virtual::StatusCode endInputFile () override
 call endInputFile on the algorithm
virtual AlgorithmgetLegacyAlg ()
 get the legacy algorithm, if we wrap one
virtual StatusCode postExecute ()
 call postExecute on the algorithm

Private Attributes

AnaReentrantAlgorithmConfig m_config
 the algorithm configuration
std::unique_ptr< AnaReentrantAlgorithmm_algorithm
 the actual algorithm (once instantiated)

Detailed Description

Constructor & Destructor Documentation

◆ AnaReentrantAlgorithmWrapper() [1/2]

EL::AnaReentrantAlgorithmWrapper::AnaReentrantAlgorithmWrapper ( )
inline

standard default constructor for serialization

Definition at line 33 of file AnaReentrantAlgorithmWrapper.h.

33{};

◆ AnaReentrantAlgorithmWrapper() [2/2]

EL::AnaReentrantAlgorithmWrapper::AnaReentrantAlgorithmWrapper ( AnaReentrantAlgorithmConfig val_config)

standard constructor

Definition at line 35 of file AnaReentrantAlgorithmWrapper.cxx.

37 : m_config (std::move (val_config))
38 {
39 RCU_NEW_INVARIANT (this);
40 }
#define RCU_NEW_INVARIANT(x)
Definition Assert.h:233
AnaReentrantAlgorithmConfig m_config
the algorithm configuration

Member Function Documentation

◆ beginInputFile()

StatusCode EL::AnaReentrantAlgorithmWrapper::beginInputFile ( )
overridevirtual

call beginInputFile on the algorithm

Implements EL::IAlgorithmWrapper.

Definition at line 125 of file AnaReentrantAlgorithmWrapper.cxx.

127 {
128 // no-op
129 return StatusCode::SUCCESS;
130 }

◆ endInputFile()

StatusCode EL::AnaReentrantAlgorithmWrapper::endInputFile ( )
overridevirtual

call endInputFile on the algorithm

Implements EL::IAlgorithmWrapper.

Definition at line 134 of file AnaReentrantAlgorithmWrapper.cxx.

136 {
137 // no-op
138 return StatusCode::SUCCESS;
139 }

◆ execute()

StatusCode EL::AnaReentrantAlgorithmWrapper::execute ( )
overridevirtual

call execute on the algorithm

Implements EL::IAlgorithmWrapper.

Definition at line 86 of file AnaReentrantAlgorithmWrapper.cxx.

88 {
89 using namespace msgAlgorithmConfig;
90 RCU_READ_INVARIANT (this);
91 if (m_algorithm->sysExecute(Gaudi::Hive::currentContext()).isFailure())
92 {
93 ANA_MSG_ERROR ("failed to call execute() on algorithm: " << m_config.name());
94 return StatusCode::FAILURE;
95 }
96 return StatusCode::SUCCESS;
97 }
#define RCU_READ_INVARIANT(x)
Definition Assert.h:229
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
std::unique_ptr< AnaReentrantAlgorithm > m_algorithm
the actual algorithm (once instantiated)

◆ fileExecute()

StatusCode EL::AnaReentrantAlgorithmWrapper::fileExecute ( )
overridevirtual

call fileExecute on the algorithm

Implements EL::IAlgorithmWrapper.

Definition at line 116 of file AnaReentrantAlgorithmWrapper.cxx.

118 {
119 // no-op
120 return StatusCode::SUCCESS;
121 }

◆ finalize()

StatusCode EL::AnaReentrantAlgorithmWrapper::finalize ( )
overridevirtual

call finalize on the algorithm

Implements EL::IAlgorithmWrapper.

Definition at line 101 of file AnaReentrantAlgorithmWrapper.cxx.

103 {
104 using namespace msgAlgorithmConfig;
105 RCU_READ_INVARIANT (this);
106 if (m_algorithm->sysFinalize().isFailure())
107 {
108 ANA_MSG_ERROR ("failed to call finalize() on algorithm: " << m_config.name());
109 return StatusCode::FAILURE;
110 }
111 return StatusCode::SUCCESS;
112 }

◆ getLegacyAlg()

virtual Algorithm * EL::IAlgorithmWrapper::getLegacyAlg ( )
inlinevirtualinherited

get the legacy algorithm, if we wrap one

Reimplemented in EL::AlgorithmMemoryWrapper, EL::AlgorithmTimerWrapper, and EL::AlgorithmWrapper.

Definition at line 64 of file IAlgorithmWrapper.h.

64{return nullptr;};

◆ getName()

std::string_view EL::AnaReentrantAlgorithmWrapper::getName ( ) const
overridevirtual

Inherited Members

Implements EL::IAlgorithmWrapper.

Definition at line 44 of file AnaReentrantAlgorithmWrapper.cxx.

46 {
47 RCU_READ_INVARIANT (this);
48 return m_config.name();
49 }

◆ hasName()

bool EL::AnaReentrantAlgorithmWrapper::hasName ( const std::string & name) const
overridevirtual

whether this algorithm has the given name

Implements EL::IAlgorithmWrapper.

Definition at line 53 of file AnaReentrantAlgorithmWrapper.cxx.

55 {
56 RCU_READ_INVARIANT (this);
57 return m_config.name() == name;
58 }

◆ initialize()

StatusCode EL::AnaReentrantAlgorithmWrapper::initialize ( const AlgorithmWorkerData & workerData)
overridevirtual

call initialize on the algorithm

Implements EL::IAlgorithmWrapper.

Definition at line 71 of file AnaReentrantAlgorithmWrapper.cxx.

73 {
74 using namespace msgAlgorithmConfig;
76 if (m_config.makeAlgorithm (m_algorithm, workerData).isFailure())
77 {
78 ANA_MSG_ERROR ("failed to create AnaReentrantAlgorithm: " << m_config.name());
79 return StatusCode::FAILURE;
80 }
81 return StatusCode::SUCCESS;
82 }
#define RCU_CHANGE_INVARIANT(x)
Definition Assert.h:231

◆ makeClone()

std::unique_ptr< IAlgorithmWrapper > EL::AnaReentrantAlgorithmWrapper::makeClone ( ) const
overridevirtual

make a clone of this algorithm

Implements EL::IAlgorithmWrapper.

Definition at line 62 of file AnaReentrantAlgorithmWrapper.cxx.

64 {
65 RCU_READ_INVARIANT (this);
66 return std::make_unique<AnaReentrantAlgorithmWrapper> (m_config);
67 }

◆ postExecute()

virtual StatusCode EL::IAlgorithmWrapper::postExecute ( )
inlinevirtualinherited

call postExecute on the algorithm

Reimplemented in EL::AlgorithmMemoryWrapper, EL::AlgorithmTimerWrapper, and EL::AlgorithmWrapper.

Definition at line 73 of file IAlgorithmWrapper.h.

73{return StatusCode::SUCCESS;};

◆ testInvariant()

void EL::AnaReentrantAlgorithmWrapper::testInvariant ( ) const

test the invariant of this object

Public Members

Definition at line 27 of file AnaReentrantAlgorithmWrapper.cxx.

29 {
30 RCU_INVARIANT (!m_config.name().empty());
31 }
#define RCU_INVARIANT(x)
Definition Assert.h:201

Member Data Documentation

◆ m_algorithm

std::unique_ptr<AnaReentrantAlgorithm> EL::AnaReentrantAlgorithmWrapper::m_algorithm
private

the actual algorithm (once instantiated)

Please note (and do not remove) the comment at the end of the line. This specifically excludes this member from serialization.

Definition at line 76 of file AnaReentrantAlgorithmWrapper.h.

◆ m_config

AnaReentrantAlgorithmConfig EL::AnaReentrantAlgorithmWrapper::m_config
private

the algorithm configuration

Private Members

Definition at line 69 of file AnaReentrantAlgorithmWrapper.h.


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