All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AlgorithmManager Class Reference

The AlgorithmManager class is in charge of the creation of concrete instances of Algorithms. More...

#include <src/ApplicationMgr/AlgorithmManager.h>

Inheritance diagram for AlgorithmManager:
Collaboration diagram for AlgorithmManager:

Classes

struct  AlgorithmItem
 

Public Types

typedef std::list< AlgorithmItemListAlg
 typedefs and classes More...
 
typedef std::map< std::string,
std::string > 
AlgTypeAliasesMap
 
- Public Types inherited from extends1< ComponentManager, IAlgManager >
typedef extends1 base_class
 Typedef to this class. More...
 
typedef extend_interfaces1
< IAlgManager
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from CommonMessaging< implements1< IComponentManager > >
typedef CommonMessaging base_class
 
- Public Types inherited from implements1< IComponentManager >
typedef implements1 base_class
 Typedef to this class. More...
 
typedef extend_interfaces1
< IComponentManager
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from extend_interfaces1< IComponentManager >
typedef
IComponentManager::iid::iids::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from IInterface
enum  Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR }
 Return status. More...
 
typedef Gaudi::InterfaceId
< IInterface, 0, 0 > 
iid
 Interface ID. More...
 
typedef mpl::set1< iidext_iids
 Extra interfaces. More...
 
- Public Types inherited from extend_interfaces1< IAlgManager >
typedef
IAlgManager::iid::iids::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 

Public Member Functions

 AlgorithmManager (IInterface *iface)
 default creator More...
 
virtual ~AlgorithmManager ()
 virtual destructor More...
 
virtual StatusCode addAlgorithm (IAlgorithm *alg)
 implementation of IAlgManager::addAlgorithm More...
 
virtual StatusCode removeAlgorithm (IAlgorithm *alg)
 implementation of IAlgManager::removeAlgorithm More...
 
virtual StatusCode createAlgorithm (const std::string &algtype, const std::string &algname, IAlgorithm *&algorithm, bool managed=false)
 implementation of IAlgManager::createAlgorithm More...
 
virtual bool existsAlgorithm (const std::string &name) const
 implementation of IAlgManager::existsAlgorithm More...
 
virtual const std::vector
< IAlgorithm * > & 
getAlgorithms () const
 implementation of IAlgManager::getAlgorithms More...
 
virtual StatusCode initialize ()
 Initialization (from CONFIGURED to INITIALIZED). More...
 
virtual StatusCode start ()
 Start (from INITIALIZED to RUNNING). More...
 
virtual StatusCode stop ()
 Stop (from RUNNING to INITIALIZED). More...
 
virtual StatusCode finalize ()
 Finalize (from INITIALIZED to CONFIGURED). More...
 
virtual StatusCode reinitialize ()
 Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). More...
 
virtual StatusCode restart ()
 Initialization (from RUNNING to RUNNING, via INITIALIZED). More...
 
const std::string & name () const
 Return the name of the manager (implementation of INamedInterface) More...
 
virtual SmartIF< IAlgorithm > & algorithm (const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)
 Returns a smart pointer to a service. More...
 
AlgTypeAliasesMaptypeAliases ()
 
const AlgTypeAliasesMaptypeAliases () const
 
- Public Member Functions inherited from extends1< ComponentManager, IAlgManager >
 extends1 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments. More...
 
 extends1 (A1 a1, A2 a2)
 Templated constructor with 2 arguments. More...
 
 extends1 (A1 a1)
 Templated constructor with 1 argument. More...
 
 extends1 ()
 Default constructor. More...
 
virtual void * i_cast (const InterfaceID &tid) const
 Implementation of IInterface::i_cast. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)
 Implementation of IInterface::queryInterface. More...
 
virtual std::vector< std::string > getInterfaceNames () const
 Implementation of IInterface::getInterfaceNames. More...
 
virtual ~extends1 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from ComponentManager
 ComponentManager (IInterface *application, const InterfaceID &baseIID)
 Constructor. More...
 
virtual const InterfaceIDcomponentBaseInterface () const
 Basic interface id of the managed components. More...
 
virtual ~ComponentManager ()
 Virtual destructor. More...
 
virtual SmartIF< ISvcLocator > & serviceLocator () const
 Needed to locate the message service. More...
 
virtual StatusCode configure ()
 Configuration (from OFFLINE to CONFIGURED). More...
 
virtual StatusCode terminate ()
 Initialization (from CONFIGURED to OFFLINE). More...
 
virtual Gaudi::StateMachine::State FSMState () const
 Get the current state. More...
 
virtual Gaudi::StateMachine::State targetFSMState () const
 When we are in the middle of a transition, get the state where the transition is leading us. More...
 
- Public Member Functions inherited from CommonMessaging< implements1< IComponentManager > >
 CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3)
 Templated constructor with 3 arguments. More...
 
 CommonMessaging (const A1 &a1, const A2 &a2)
 Templated constructor with 2 arguments. More...
 
 CommonMessaging (const A1 &a1)
 Templated constructor with 1 argument. More...
 
 CommonMessaging ()
 Default constructor. More...
 
virtual ~CommonMessaging ()
 Virtual destructor. More...
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MSG::Level msgLevel () const
 get the output level from the embedded MsgStream More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 
- Public Member Functions inherited from extend_interfaces1< IComponentManager >
virtual ~extend_interfaces1 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IComponentManager
 DeclareInterfaceID (IComponentManager, 1, 0)
 InterfaceID. More...
 
virtual ~IComponentManager ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IStateful
 DeclareInterfaceID (IStateful, 1, 0)
 InterfaceID. More...
 
virtual ~IStateful ()
 
- Public Member Functions inherited from IInterface
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long release ()=0
 Release Interface instance. More...
 
virtual unsigned long refCount () const =0
 Current reference count. More...
 
virtual ~IInterface ()
 Virtual destructor. More...
 
- Public Member Functions inherited from extend_interfaces1< IAlgManager >
virtual ~extend_interfaces1 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IAlgManager
 DeclareInterfaceID (IAlgManager, 6, 0)
 InterfaceID. More...
 
virtual StatusCode getAlgorithm (const std::string &name, IAlgorithm *&alg) const
 Find an algorithm with given name in the list of known algorithms. More...
 
virtual StatusCode initializeAlgorithms ()
 Initializes the list of "managed" algorithms. More...
 
virtual StatusCode startAlgorithms ()
 Starts the list of "managed" algorithms. More...
 
virtual StatusCode stopAlgorithms ()
 Stops the list of "managed" algorithms. More...
 
virtual StatusCode finalizeAlgorithms ()
 Finalizes the list of "managed" algorithms. More...
 
virtual StatusCode reinitializeAlgorithms ()
 Initializes the list of "managed" algorithms. More...
 
virtual StatusCode restartAlgorithms ()
 Starts the list of "managed" algorithms. More...
 
template<typename T >
SmartIF< T > algorithm (const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)
 Returns a smart pointer to the requested interface of a service. More...
 

Private Attributes

ListAlg m_listalg
 List of algorithms maintained by AlgorithmManager. More...
 
std::vector< IAlgorithm * > m_listOfPtrs
 List of pointers to the know services used to implement getAlgorithms() More...
 
AlgTypeAliasesMap m_algTypeAliases
 

Additional Inherited Members

- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 
- Protected Member Functions inherited from CommonMessaging< implements1< IComponentManager > >
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 
- Protected Attributes inherited from ComponentManager
SmartIF< IInterfacem_application
 Pointer to the owner of the manager. More...
 
SmartIF< IStatefulm_stateful
 Pointer to the IStateful interface of the owner. More...
 
InterfaceID m_basicInterfaceId
 Basic interface id of the managed components. More...
 
SmartIF< ISvcLocatorm_svcLocator
 Service locator (needed to access the MessageSvc) More...
 
- Protected Attributes inherited from CommonMessaging< implements1< IComponentManager > >
SmartIF< IMessageSvcm_msgsvc
 Pointer to the message service;. More...
 
std::auto_ptr< MsgStreamm_msgStream
 The predefined message stream. More...
 
bool m_streamWithService
 Flag to create a new MsgStream if it was created without the message service. More...
 

Detailed Description

The AlgorithmManager class is in charge of the creation of concrete instances of Algorithms.

The ApplicationMgr delegates the creation and bookkeeping of algorithms to the algorithm factory. In order to be able to create algorithms from which it does not know the concrete type it requires that the algorithm has been declared in one of 3 possible ways: an abstract static creator function, a dynamic link library or an abstract factory reference.

Author
Pere Mato

Definition at line 31 of file AlgorithmManager.h.

Member Typedef Documentation

typedef std::map<std::string, std::string> AlgorithmManager::AlgTypeAliasesMap

Definition at line 49 of file AlgorithmManager.h.

typedefs and classes

Definition at line 48 of file AlgorithmManager.h.

Constructor & Destructor Documentation

AlgorithmManager::AlgorithmManager ( IInterface iface)

default creator

Definition at line 18 of file AlgorithmManager.cpp.

18  :
19  base_class(application, IAlgorithm::interfaceID())
20 {
21  addRef(); // Initial count set to 1
22 }
extends1 base_class
Typedef to this class.
Definition: extends.h:12
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
static const InterfaceID & interfaceID()
Return an instance of InterfaceID identifying the interface.
Definition: IInterface.h:171
AlgorithmManager::~AlgorithmManager ( )
virtual

virtual destructor

Definition at line 25 of file AlgorithmManager.cpp.

25  {
26 }

Member Function Documentation

StatusCode AlgorithmManager::addAlgorithm ( IAlgorithm alg)
virtual

implementation of IAlgManager::addAlgorithm

Implements IAlgManager.

Definition at line 29 of file AlgorithmManager.cpp.

29  {
30  m_listalg.push_back(alg);
31  return StatusCode::SUCCESS;
32 }
ListAlg m_listalg
List of algorithms maintained by AlgorithmManager.
SmartIF< IAlgorithm > & AlgorithmManager::algorithm ( const Gaudi::Utils::TypeNameString typeName,
const bool  createIf = true 
)
virtual

Returns a smart pointer to a service.

Implements IAlgManager.

Definition at line 105 of file AlgorithmManager.cpp.

105  {
106  ListAlg::iterator it = std::find(m_listalg.begin(), m_listalg.end(), typeName.name());
107  if (it != m_listalg.end()) { // found
108  return it->algorithm;
109  }
110  if (createIf) {
111  IAlgorithm* alg;
112  if (createAlgorithm(typeName.type(), typeName.name(), alg, true).isSuccess()) {
113  return algorithm(typeName, false);
114  }
115  }
116  return no_algorithm;
117 }
virtual SmartIF< IAlgorithm > & algorithm(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)
Returns a smart pointer to a service.
ListAlg m_listalg
List of algorithms maintained by AlgorithmManager.
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:20
const std::string & type() const
virtual StatusCode createAlgorithm(const std::string &algtype, const std::string &algname, IAlgorithm *&algorithm, bool managed=false)
implementation of IAlgManager::createAlgorithm
const std::string & name() const
StatusCode AlgorithmManager::createAlgorithm ( const std::string &  algtype,
const std::string &  algname,
IAlgorithm *&  algorithm,
bool  managed = false 
)
virtual

implementation of IAlgManager::createAlgorithm

Implements IAlgManager.

Definition at line 45 of file AlgorithmManager.cpp.

49 {
50  // Check is the algorithm is already existing
51  if( existsAlgorithm( algname ) ) {
52  // return an error because an algorithm with that name already exists
53  return StatusCode::FAILURE;
54  }
55  std::string actualalgtype(algtype);
56  // a '\' in front of the type name prevents alias replacement
57  if ((actualalgtype.size() > 8) && (actualalgtype.substr(0, 8) == "unalias:")) {
58  actualalgtype = actualalgtype.substr(8);
59  } else {
60  AlgTypeAliasesMap::iterator typeAlias = m_algTypeAliases.find(algtype);
61  if (typeAlias != m_algTypeAliases.end()) {
62  actualalgtype = typeAlias->second;
63  }
64  }
65  algorithm = Algorithm::Factory::create(actualalgtype, algname, serviceLocator().get());
66  if ( algorithm ) {
67  // Check the compatibility of the version of the interface obtained
68  if( !isValidInterface(algorithm) ) {
69  fatal() << "Incompatible interface IAlgorithm version for " << actualalgtype << endmsg;
70  return StatusCode::FAILURE;
71  }
72  StatusCode rc;
73  m_listalg.push_back(AlgorithmItem(algorithm, managed));
74  // this is needed to keep the reference count correct, since isValidInterface(algorithm)
75  // implies an increment of the counter by 1
76  algorithm->release();
77  if ( managed ) {
78  // Bring the created algorithm to the same state of the ApplicationMgr
80  rc = algorithm->sysInitialize();
82  rc = algorithm->sysStart();
83  }
84  }
85  if ( !rc.isSuccess() ) {
86  this->error() << "Failed to initialize algorithm: [" << algname << "]" << endmsg;
87  }
88  }
89  return rc;
90  }
91  this->error() << "Algorithm of type " << actualalgtype
92  << " is unknown (No factory available)." << endmsg;
93 #ifndef _WIN32
94  errno = 0xAFFEDEAD; // code used by Gaudi for library load errors: forces getLastErrorString do use dlerror (on Linux)
95 #endif
96  std::string err = System::getLastErrorString();
97  if (! err.empty()) {
98  this->error() << err << endmsg;
99  }
100  this->error() << "More information may be available by setting the global jobOpt \"PluginDebugLevel\" to 1" << endmsg;
101 
102  return StatusCode::FAILURE;
103 }
virtual SmartIF< ISvcLocator > & serviceLocator() const
Needed to locate the message service.
virtual StatusCode sysStart()=0
Startup method invoked by the framework.
AlgTypeAliasesMap m_algTypeAliases
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
bool isValidInterface(I *i)
Templated function that throws an exception if the version if the interface implemented by the object...
Definition: IInterface.h:257
virtual bool existsAlgorithm(const std::string &name) const
implementation of IAlgManager::existsAlgorithm
MsgStream & err() const
shortcut for the method msgStream(MSG::ERROR)
virtual StatusCode sysInitialize()=0
Initialization method invoked by the framework.
ListAlg m_listalg
List of algorithms maintained by AlgorithmManager.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
tuple rc
Definition: IOTest.py:92
virtual Gaudi::StateMachine::State FSMState() const
Get the current state.
virtual unsigned long release()=0
Release Interface instance.
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
GAUDI_API const std::string getLastErrorString()
Get last system error as string.
Definition: System.cpp:253
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
bool AlgorithmManager::existsAlgorithm ( const std::string &  name) const
virtual

implementation of IAlgManager::existsAlgorithm

Implements IAlgManager.

Definition at line 120 of file AlgorithmManager.cpp.

120  {
121  ListAlg::const_iterator it = std::find(m_listalg.begin(), m_listalg.end(), name);
122  return it != m_listalg.end();
123 }
const std::string & name() const
Return the name of the manager (implementation of INamedInterface)
ListAlg m_listalg
List of algorithms maintained by AlgorithmManager.
StatusCode AlgorithmManager::finalize ( )
virtual

Finalize (from INITIALIZED to CONFIGURED).

Reimplemented from ComponentManager.

Definition at line 171 of file AlgorithmManager.cpp.

171  {
172  StatusCode rc;
173  ListAlg::iterator it = m_listalg.begin();
174  while (it != m_listalg.end()){ // finalize and remove from the list the managed algorithms
175  if (it->managed) {
176  rc = it->algorithm->sysFinalize();
177  if( rc.isFailure() ) return rc;
178  it = m_listalg.erase(it);
179  } else {
180  ++it;
181  }
182  }
183  return rc;
184 }
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:85
ListAlg m_listalg
List of algorithms maintained by AlgorithmManager.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
tuple rc
Definition: IOTest.py:92
const std::vector< IAlgorithm * > & AlgorithmManager::getAlgorithms ( ) const
virtual

implementation of IAlgManager::getAlgorithms

Implements IAlgManager.

Definition at line 126 of file AlgorithmManager.cpp.

127 {
128  m_listOfPtrs.clear();
129  m_listOfPtrs.reserve(m_listalg.size());
130  std::transform( std::begin(m_listalg), std::end(m_listalg),
131  std::back_inserter(m_listOfPtrs),
132  [](ListAlg::const_reference alg) {
133  return const_cast<IAlgorithm*>(alg.algorithm.get());
134  } );
135  return m_listOfPtrs;
136 }
std::vector< IAlgorithm * > m_listOfPtrs
List of pointers to the know services used to implement getAlgorithms()
ListAlg m_listalg
List of algorithms maintained by AlgorithmManager.
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:20
tuple end
Definition: IOTest.py:101
StatusCode AlgorithmManager::initialize ( )
virtual

Initialization (from CONFIGURED to INITIALIZED).

Reimplemented from ComponentManager.

Definition at line 138 of file AlgorithmManager.cpp.

138  {
139  StatusCode rc;
140  ListAlg::iterator it;
141  for (it = m_listalg.begin(); it != m_listalg.end(); ++it) {
142  if (!it->managed) continue;
143  rc = it->algorithm->sysInitialize();
144  if ( rc.isFailure() ) return rc;
145  }
146  return rc;
147 }
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:85
ListAlg m_listalg
List of algorithms maintained by AlgorithmManager.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
tuple rc
Definition: IOTest.py:92
const std::string& AlgorithmManager::name ( ) const
inlinevirtual

Return the name of the manager (implementation of INamedInterface)

Implements CommonMessaging< implements1< IComponentManager > >.

Definition at line 84 of file AlgorithmManager.h.

84  {
85  static std::string _name = "AlgorithmManager";
86  return _name;
87  }
StatusCode AlgorithmManager::reinitialize ( )
virtual

Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).

Reimplemented from ComponentManager.

Definition at line 186 of file AlgorithmManager.cpp.

186  {
187  StatusCode rc;
188  ListAlg::iterator it;
189  for (it = m_listalg.begin(); it != m_listalg.end(); ++it) {
190  if (!it->managed) continue;
191  rc = it->algorithm->sysReinitialize();
192  if( rc.isFailure() ){
193  this->error() << "Unable to re-initialize algorithm: " << it->algorithm->name() << endmsg;
194  return rc;
195  }
196  }
197  return rc;
198 }
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:85
ListAlg m_listalg
List of algorithms maintained by AlgorithmManager.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
tuple rc
Definition: IOTest.py:92
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
StatusCode AlgorithmManager::removeAlgorithm ( IAlgorithm alg)
virtual

implementation of IAlgManager::removeAlgorithm

Implements IAlgManager.

Definition at line 35 of file AlgorithmManager.cpp.

35  {
36  ListAlg::iterator it = std::find(m_listalg.begin(), m_listalg.end(), alg);
37  if (it != m_listalg.end()) {
38  m_listalg.erase(it);
39  return StatusCode::SUCCESS;
40  }
41  return StatusCode::FAILURE;
42 }
ListAlg m_listalg
List of algorithms maintained by AlgorithmManager.
StatusCode AlgorithmManager::restart ( )
virtual

Initialization (from RUNNING to RUNNING, via INITIALIZED).

Reimplemented from ComponentManager.

Definition at line 200 of file AlgorithmManager.cpp.

200  {
201  StatusCode rc;
202  ListAlg::iterator it;
203  for (it = m_listalg.begin(); it != m_listalg.end(); ++it) {
204  if (!it->managed) continue;
205  rc = it->algorithm->sysRestart();
206  if( rc.isFailure() ){
207  this->error() << "Unable to re-initialize algorithm: " << it->algorithm->name() << endmsg;
208  return rc;
209  }
210  }
211  return rc;
212 }
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:85
ListAlg m_listalg
List of algorithms maintained by AlgorithmManager.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
tuple rc
Definition: IOTest.py:92
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
StatusCode AlgorithmManager::start ( )
virtual

Start (from INITIALIZED to RUNNING).

Reimplemented from ComponentManager.

Definition at line 149 of file AlgorithmManager.cpp.

149  {
150  StatusCode rc;
151  ListAlg::iterator it;
152  for (it = m_listalg.begin(); it != m_listalg.end(); ++it) {
153  if (!it->managed) continue;
154  rc = it->algorithm->sysStart();
155  if ( rc.isFailure() ) return rc;
156  }
157  return rc;
158 }
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:85
ListAlg m_listalg
List of algorithms maintained by AlgorithmManager.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
tuple rc
Definition: IOTest.py:92
StatusCode AlgorithmManager::stop ( )
virtual

Stop (from RUNNING to INITIALIZED).

Reimplemented from ComponentManager.

Definition at line 160 of file AlgorithmManager.cpp.

160  {
161  StatusCode rc;
162  ListAlg::iterator it;
163  for (it = m_listalg.begin(); it != m_listalg.end(); ++it) {
164  if (!it->managed) continue;
165  rc = it->algorithm->sysStop();
166  if ( rc.isFailure() ) return rc;
167  }
168  return rc;
169 }
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:85
ListAlg m_listalg
List of algorithms maintained by AlgorithmManager.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
tuple rc
Definition: IOTest.py:92
AlgTypeAliasesMap& AlgorithmManager::typeAliases ( )
inline

Definition at line 91 of file AlgorithmManager.h.

91 { return m_algTypeAliases; }
AlgTypeAliasesMap m_algTypeAliases
const AlgTypeAliasesMap& AlgorithmManager::typeAliases ( ) const
inline

Definition at line 92 of file AlgorithmManager.h.

92 { return m_algTypeAliases; }
AlgTypeAliasesMap m_algTypeAliases

Member Data Documentation

AlgTypeAliasesMap AlgorithmManager::m_algTypeAliases
private

Definition at line 100 of file AlgorithmManager.h.

ListAlg AlgorithmManager::m_listalg
private

List of algorithms maintained by AlgorithmManager.

Definition at line 95 of file AlgorithmManager.h.

std::vector<IAlgorithm*> AlgorithmManager::m_listOfPtrs
mutableprivate

List of pointers to the know services used to implement getAlgorithms()

Definition at line 98 of file AlgorithmManager.h.


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