Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
AlgorithmHistory Class Reference

AlgorithmHistory class definition. More...

#include <GaudiKernel/AlgorithmHistory.h>

Inheritance diagram for AlgorithmHistory:
Collaboration diagram for AlgorithmHistory:

Public Types

typedef std::vector< const AlgorithmHistory * > HistoryList
 
- Public Types inherited from IVersHistoryObj
typedef std::vector< Gaudi::Details::PropertyBase * > PropertyList
 

Public Member Functions

 AlgorithmHistory (const Gaudi::Algorithm &alg, const JobHistory *job)
 
 AlgorithmHistory (const std::string &algVersion, const std::string &algName, const std::string &algType, const PropertyList &props, const HistoryList &subHists)
 
virtual ~AlgorithmHistory ()
 
const CLIDclID () const override
 Retrieve reference to class definition structure. More...
 
const std::stringalgorithm_type () const
 
const std::stringalgorithm_version () const
 
const std::stringalgorithm_name () const
 
const Gaudi::Algorithmalgorithm () const
 
const PropertyListproperties () const override
 
const HistoryListsubalgorithm_histories () const
 
const JobHistoryjobHistory () const
 
void dump (std::ostream &, const bool isXML=false, int indent=0) const override
 
const std::stringname () const override
 
const std::stringtype () const override
 
const std::stringversion () const override
 
- Public Member Functions inherited from HistoryObj
 HistoryObj ()=default
 
virtual ~HistoryObj ()=default
 
const CLIDclID () const override
 Retrieve reference to class definition structure. More...
 
- Public Member Functions inherited from DataObject
 DataObject ()
 Standard Constructor. More...
 
 DataObject (const DataObject &rhs)
 Copy Constructor. More...
 
DataObjectoperator= (const DataObject &rhs)
 Assignment Operator. More...
 
 DataObject (DataObject &&rhs)
 Move Constructor. More...
 
DataObjectoperator= (DataObject &&rhs)
 Move Assignment Operator. More...
 
virtual ~DataObject ()
 Standard Destructor. More...
 
virtual unsigned long addRef ()
 Add reference to object. More...
 
virtual unsigned long release ()
 release reference to object More...
 
const std::stringname () const
 Retreive DataObject name. It is the name when registered in the store. More...
 
virtual StatusCode update ()
 Provide empty placeholder for internal object reconfiguration callback. More...
 
void setRegistry (IRegistry *pRegistry)
 Set pointer to Registry. More...
 
IRegistryregistry () const
 Get pointer to Registry. More...
 
LinkManagerlinkMgr () const
 Retrieve Link manager. More...
 
unsigned char version () const
 Retrieve version number of this object representation. More...
 
void setVersion (unsigned char vsn)
 Set version number of this object representation. More...
 
unsigned long refCount () const
 Return the refcount. More...
 
virtual std::ostreamfillStream (std::ostream &s) const
 Fill the output stream (ASCII) More...
 
- Public Member Functions inherited from IVersHistoryObj
virtual ~IVersHistoryObj ()=default
 

Static Public Member Functions

static const CLIDclassID ()
 
- Static Public Member Functions inherited from HistoryObj
static const CLIDclassID ()
 
static std::string convert_string (const std::string &)
 
- Static Public Member Functions inherited from DataObject
static const CLIDclassID ()
 Retrieve reference to class definition structure (static access) More...
 

Private Attributes

std::string m_algorithm_type
 
std::string m_algorithm_version
 
std::string m_algorithm_name
 
const Gaudi::Algorithmm_algorithm
 
PropertyList m_properties
 
HistoryList m_subalgorithm_histories
 
const JobHistorym_jobHistory
 

Additional Inherited Members

- Protected Member Functions inherited from HistoryObj
virtual void indent (std::ostream &, int) const
 

Detailed Description

AlgorithmHistory class definition.

Author
: Charles Leggett

Definition at line 28 of file AlgorithmHistory.h.

Member Typedef Documentation

Constructor & Destructor Documentation

AlgorithmHistory::AlgorithmHistory ( const Gaudi::Algorithm alg,
const JobHistory job 
)
explicit

Definition at line 29 of file AlgorithmHistory.cpp.

30  : m_algorithm_type( System::typeinfoName( typeid( alg ) ) )
31  , m_algorithm_version( alg.version() )
32  , m_algorithm_name( alg.name() )
33  , m_algorithm( &alg )
34  , m_properties( alg.getProperties() )
35  , m_jobHistory( job ) {}
const std::vector< Gaudi::Details::PropertyBase * > & getProperties() const override
get all properties
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:309
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:635
std::string m_algorithm_type
std::string m_algorithm_version
PropertyList m_properties
std::string m_algorithm_name
const std::string & version() const override
Definition: Algorithm.cpp:639
const Gaudi::Algorithm * m_algorithm
const JobHistory * m_jobHistory
AlgorithmHistory::AlgorithmHistory ( const std::string algVersion,
const std::string algName,
const std::string algType,
const PropertyList props,
const HistoryList subHists 
)
explicit

Definition at line 39 of file AlgorithmHistory.cpp.

42  : m_algorithm_type( algType )
43  , // FIXME type_info???
44  m_algorithm_version( algVersion )
45  , m_algorithm_name( algName )
46  , m_algorithm( nullptr )
47  , m_properties( props )
48  , m_subalgorithm_histories( subHists )
49  , m_jobHistory( nullptr ) {}
std::string m_algorithm_type
std::string m_algorithm_version
HistoryList m_subalgorithm_histories
PropertyList m_properties
std::string m_algorithm_name
const Gaudi::Algorithm * m_algorithm
const JobHistory * m_jobHistory
AlgorithmHistory::~AlgorithmHistory ( )
virtual

Definition at line 55 of file AlgorithmHistory.cpp.

55  {
56  for ( auto& i : m_subalgorithm_histories ) delete i;
57 }
HistoryList m_subalgorithm_histories

Member Function Documentation

const Gaudi::Algorithm* AlgorithmHistory::algorithm ( ) const
inline

Definition at line 80 of file AlgorithmHistory.h.

80 { return m_algorithm; }
const Gaudi::Algorithm * m_algorithm
const std::string& AlgorithmHistory::algorithm_name ( ) const
inline

Definition at line 77 of file AlgorithmHistory.h.

77 { return m_algorithm_name; }
std::string m_algorithm_name
const std::string& AlgorithmHistory::algorithm_type ( ) const
inline

Definition at line 71 of file AlgorithmHistory.h.

71 { return m_algorithm_type; }
std::string m_algorithm_type
const std::string& AlgorithmHistory::algorithm_version ( ) const
inline

Definition at line 74 of file AlgorithmHistory.h.

74 { return m_algorithm_version; }
std::string m_algorithm_version
const CLID & AlgorithmHistory::classID ( )
static

Definition at line 61 of file AlgorithmHistory.cpp.

61  {
62 
63  static const CLID CLID_AlgorithmHistory = 56809101; // from `clid AlgorithmHistory`
64  return CLID_AlgorithmHistory;
65 }
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
const CLID& AlgorithmHistory::clID ( ) const
inlineoverridevirtual

Retrieve reference to class definition structure.

Retrieve Pointer to class definition structure.

Reimplemented from DataObject.

Definition at line 67 of file AlgorithmHistory.h.

67 { return classID(); }
static const CLID & classID()
void AlgorithmHistory::dump ( std::ostream ost,
const bool  isXML = false,
int  indent = 0 
) const
overridevirtual

Implements HistoryObj.

Definition at line 69 of file AlgorithmHistory.cpp.

69  {
70 
71  if ( !isXML ) {
72  ost << "Type: " << algorithm_type() << endl;
73  ost << "Name: " << algorithm_name() << endl;
74  ost << "Version: " << algorithm_version() << endl;
75  // Properties.
76  ost << "Properties: [" << endl;
77  ;
78  for ( const auto& iprop : properties() ) {
79  iprop->fillStream( ost );
80  ost << endl;
81  }
82  ost << "]" << endl;
83  } else {
84  ind += 2;
85  indent( ost, ind );
86  ost << "<COMPONENT name=\"" << algorithm_name() << "\" class=\"" << convert_string( algorithm_type() )
87  << "\" version=\"" << algorithm_version() << "\">" << std::endl;
88 
89  for ( const auto& iprop : properties() ) {
90  indent( ost, ind + 2 );
91  ost << "<PROPERTY name=\"" << iprop->name() << "\" value=\"" << convert_string( iprop->toString() )
92  << "\" documentation=\"" << convert_string( iprop->documentation() ) << "\">" << std::endl;
93  }
94 
95  indent( ost, ind );
96  ost << "</COMPONENT>" << std::endl;
97  }
98 }
T endl(T...args)
const PropertyList & properties() const override
const std::string & algorithm_name() const
virtual void indent(std::ostream &, int) const
Definition: HistoryObj.cpp:46
static std::string convert_string(const std::string &)
Definition: HistoryObj.cpp:20
const std::string & algorithm_version() const
const std::string & algorithm_type() const
const JobHistory* AlgorithmHistory::jobHistory ( ) const
inline

Definition at line 89 of file AlgorithmHistory.h.

89 { return m_jobHistory; }
const JobHistory * m_jobHistory
const std::string& AlgorithmHistory::name ( ) const
inlineoverridevirtual

Implements IVersHistoryObj.

Definition at line 93 of file AlgorithmHistory.h.

93 { return algorithm_name(); }
const std::string & algorithm_name() const
const PropertyList& AlgorithmHistory::properties ( ) const
inlineoverridevirtual

Implements IVersHistoryObj.

Definition at line 83 of file AlgorithmHistory.h.

83 { return m_properties; }
PropertyList m_properties
const HistoryList& AlgorithmHistory::subalgorithm_histories ( ) const
inline

Definition at line 86 of file AlgorithmHistory.h.

86 { return m_subalgorithm_histories; }
HistoryList m_subalgorithm_histories
const std::string& AlgorithmHistory::type ( ) const
inlineoverridevirtual

Implements IVersHistoryObj.

Definition at line 94 of file AlgorithmHistory.h.

94 { return algorithm_type(); }
const std::string & algorithm_type() const
const std::string& AlgorithmHistory::version ( ) const
inlineoverridevirtual

Implements IVersHistoryObj.

Definition at line 95 of file AlgorithmHistory.h.

95 { return algorithm_version(); }
const std::string & algorithm_version() const

Member Data Documentation

const Gaudi::Algorithm* AlgorithmHistory::m_algorithm
private

Definition at line 45 of file AlgorithmHistory.h.

std::string AlgorithmHistory::m_algorithm_name
private

Definition at line 42 of file AlgorithmHistory.h.

std::string AlgorithmHistory::m_algorithm_type
private

Definition at line 36 of file AlgorithmHistory.h.

std::string AlgorithmHistory::m_algorithm_version
private

Definition at line 39 of file AlgorithmHistory.h.

const JobHistory* AlgorithmHistory::m_jobHistory
private

Definition at line 54 of file AlgorithmHistory.h.

PropertyList AlgorithmHistory::m_properties
private

Definition at line 48 of file AlgorithmHistory.h.

HistoryList AlgorithmHistory::m_subalgorithm_histories
private

Definition at line 51 of file AlgorithmHistory.h.


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