39 m_timerTool = tool<ISequencerTimerTool>(
"SequencerTimerTool" );
60 return Error(
"Can not initialize " + myAlg->
name(), status );
70 m_nthreads = tbb::task_scheduler_init::default_num_threads();
101 debug() <<
"Algorithm wrapper " << &*it <<
" around the algorithm " << it->algorithm()->name()
102 <<
" received return status code " << it->m_returncode <<
endmsg;
106 if ( !( it->m_returncode.isSuccess() ) )
return it->m_returncode;
132 auto jos = service<IJobOptionsSvc>(
"JobOptionsSvc" );
133 bool addedContext =
false;
134 bool addedRootInTES =
false;
137 auto appMgr = service<IAlgManager>(
"ApplicationMgr" );
140 for ( it = nameVector.
begin(); nameVector.
end() != it; it++ ) {
151 bool foundContext =
false;
152 bool foundRootInTES =
false;
153 const auto properties = jos->getProperties( theName );
157 if (
"Context" == p->name() ) {
160 if (
"RootInTES" == p->name() ) {
161 foundRootInTES =
true;
167 jos->addPropertyToCatalogue( theName, contextProperty ).ignore();
170 if ( !foundRootInTES && !
rootInTES().empty() ) {
172 jos->addPropertyToCatalogue( theName, rootInTESProperty ).ignore();
173 addedRootInTES =
true;
181 if ( result.
isSuccess() ) myIAlg = myAlg;
192 if ( addedContext ) {
193 jos->removePropertyFromCatalogue( theName,
"Context" ).ignore();
194 addedContext =
false;
196 if ( addedRootInTES ) {
197 jos->removePropertyFromCatalogue( theName,
"RootInTES" ).ignore();
198 addedRootInTES =
false;
229 warning() << theName <<
" is not an Algorithm - failed dynamic_cast" <<
endmsg;
233 warning() <<
"Unable to find or create " << theName <<
endmsg;
240 msg <<
"Member list: ";
245 if ( myAlg->
name() != myAlgType ) {
246 msg << myAlgType <<
"/";
248 return msg << myAlg->
name();
275 m_timerTool = tool<ISequencerTimerTool>(
"SequencerTimerTool" );
StatusCode initialize() override
Algorithm initialization.
Gaudi::Property< bool > m_measureTime
StatusCode execute() override
Algorithm execution.
Definition of the MsgStream class used to transmit messages.
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
Gaudi::Property< bool > m_modeOR
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
StatusCode createSubAlgorithm(const std::string &type, const std::string &name, Algorithm *&pSubAlg)
Create a sub algorithm.
Algorithm * algorithm() const
const std::string & name() const override
The identifying name of the algorithm object.
Implementation of property with value of concrete type.
virtual StatusCode sysStart()=0
Startup method invoked by the framework.
const std::string & rootInTES() const
Returns the "rootInTES" string.
bool isExecuted() const override
Has this algorithm been executed since the last reset?
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
StatusCode initialize() override
standard initialization method
bool isSuccess() const
Test for a status code of SUCCESS.
StatusCode Error(const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const
Print the error message and return with the given StatusCode.
StatusCode decodeNames()
Decode a vector of string.
const std::string & context() const
Returns the "context" string. Used to identify different processing states.
bool isFailure() const
Test for a status code of FAILURE.
virtual StatusCode sysInitialize()=0
Initialization method invoked by the framework.
Provide serialization function (output only) for some common STL classes (vectors, lists, pairs, maps) plus GaudiUtils::Map and GaudiUtils::HashMap.
StatusCode finalize() override
Algorithm finalization.
TYPE * get() const
Get interface pointer.
bool isEnabled() const override
Is this algorithm enabled or disabled?
Helper class to parse a string of format "type/name".
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
This class is used for returning status codes from appropriate routines.
StatusCode finalize() override
standard finalization method
#define DECLARE_ALGORITHM_FACTORY(x)
The useful base class for data processing algorithms.
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Gaudi::Property< unsigned short > m_nthreads
Stream & ostream_joiner(Stream &os, Iterator first, Iterator last, Separator sep, OutputElement output=OutputElement{})
tbb::task_group m_task_group
TBB task group.
const std::vector< Algorithm * > * subAlgorithms() const
List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms.
Base class from which all concrete algorithm classes should be derived.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
bool isValid() const
Allow for check if smart pointer is valid.
const std::string & type() const
std::vector< AlgorithmEntry > m_entries
List of algorithms to process.
void setExecuted(bool state) const override
Set the executed flag to the specified state.
void membershipHandler(Gaudi::Details::PropertyBase &theProp)
for asynchronous changes in the list of algorithms
Gaudi::Property< std::vector< std::string > > m_names
ISequencerTimerTool * m_timerTool
Pointer to the timer tool.
int m_timer
Timer number for the sequencer.
const std::string & name() const
std::string typeName(const std::type_info &typ)
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
StatusCode sysInitialize() override
Initialization method invoked by the framework.
StatusCode release(const IInterface *interface) const
Manual forced (and 'safe') release of the active tool or service.
void run(GaudiParallelizer &prlzr)
Thread task executor method to wrap an algorithm execution in.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Gaudi::StateMachine::State FSMState() const override
returns the current state of the algorithm