The Gaudi Framework  master (37c0b60a)
AlgorithmHistory Class Reference

#include </builds/gaudi/Gaudi/GaudiKernel/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 (std::string algVersion, std::string algName, 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
 
std::ostreamdump (std::ostream &, bool isXML, int indent) const override
 
const std::stringname () const override
 
const std::stringtype () const override
 
const std::stringversion () const override
 
- Public Member Functions inherited from HistoryObj
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 ()
 Retrieve Link manager. More...
 
const LinkManagerlinkMgr () const
 
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
 

Friends

std::ostreamoperator<< (std::ostream &lhs, const AlgorithmHistory &rhs)
 

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 38 of file AlgorithmHistory.h.

Member Typedef Documentation

◆ HistoryList

Constructor & Destructor Documentation

◆ AlgorithmHistory() [1/2]

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

Definition at line 39 of file AlgorithmHistory.cpp.

40  : m_algorithm_type( System::typeinfoName( typeid( alg ) ) )
41  , m_algorithm_version( alg.version() )
42  , m_algorithm_name( alg.name() )
43  , m_algorithm( &alg )
44  , m_properties( alg.getProperties() )
45  , m_jobHistory( job ) {}

◆ AlgorithmHistory() [2/2]

AlgorithmHistory::AlgorithmHistory ( std::string  algVersion,
std::string  algName,
std::string  algType,
const PropertyList props,
const HistoryList subHists 
)
explicit

Definition at line 49 of file AlgorithmHistory.cpp.

52  : m_algorithm_type( std::move( algType ) ) // FIXME type_info???
53  , m_algorithm_version( std::move( algVersion ) )
54  , m_algorithm_name( std::move( algName ) )
55  , m_algorithm( nullptr )
56  , m_properties( props )
57  , m_subalgorithm_histories( subHists )
58  , m_jobHistory( nullptr ) {}

◆ ~AlgorithmHistory()

AlgorithmHistory::~AlgorithmHistory ( )
virtual

Definition at line 64 of file AlgorithmHistory.cpp.

64  {
65  for ( auto& i : m_subalgorithm_histories ) delete i;
66 }

Member Function Documentation

◆ algorithm()

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

Definition at line 90 of file AlgorithmHistory.h.

90 { return m_algorithm; }

◆ algorithm_name()

const std::string& AlgorithmHistory::algorithm_name ( ) const
inline

Definition at line 87 of file AlgorithmHistory.h.

87 { return m_algorithm_name; }

◆ algorithm_type()

const std::string& AlgorithmHistory::algorithm_type ( ) const
inline

Definition at line 81 of file AlgorithmHistory.h.

81 { return m_algorithm_type; }

◆ algorithm_version()

const std::string& AlgorithmHistory::algorithm_version ( ) const
inline

Definition at line 84 of file AlgorithmHistory.h.

84 { return m_algorithm_version; }

◆ classID()

const CLID & AlgorithmHistory::classID ( )
static

Definition at line 70 of file AlgorithmHistory.cpp.

70  {
71 
72  static const CLID CLID_AlgorithmHistory = 56809101; // from `clid AlgorithmHistory`
73  return CLID_AlgorithmHistory;
74 }

◆ clID()

const CLID& AlgorithmHistory::clID ( ) const
inlineoverridevirtual

Retrieve reference to class definition structure.

Retrieve Pointer to class definition structure.

Reimplemented from DataObject.

Definition at line 77 of file AlgorithmHistory.h.

77 { return classID(); }

◆ dump()

std::ostream & AlgorithmHistory::dump ( std::ostream ost,
bool  isXML,
int  indent 
) const
overridevirtual

Implements HistoryObj.

Definition at line 78 of file AlgorithmHistory.cpp.

78  {
79 
80  if ( !isXML ) {
81  ost << "Type: " << algorithm_type() << endl;
82  ost << "Name: " << algorithm_name() << endl;
83  ost << "Version: " << algorithm_version() << endl;
84  // Properties.
85  ost << "Properties: [" << endl;
86  ;
87  for ( const auto& iprop : properties() ) {
88  iprop->fillStream( ost );
89  ost << endl;
90  }
91  ost << "]" << endl;
92  } else {
93  ind += 2;
94  indent( ost, ind );
95  ost << "<COMPONENT name=\"" << algorithm_name() << "\" class=\"" << convert_string( algorithm_type() )
96  << "\" version=\"" << algorithm_version() << "\">" << std::endl;
97 
98  for ( const auto& iprop : properties() ) {
99  indent( ost, ind + 2 );
100  ost << "<PROPERTY name=\"" << iprop->name() << "\" value=\"" << convert_string( iprop->toString() )
101  << "\" documentation=\"" << convert_string( iprop->documentation() ) << "\">" << std::endl;
102  }
103 
104  indent( ost, ind );
105  ost << "</COMPONENT>" << std::endl;
106  }
107  return ost;
108 }

◆ jobHistory()

const JobHistory* AlgorithmHistory::jobHistory ( ) const
inline

Definition at line 99 of file AlgorithmHistory.h.

99 { return m_jobHistory; }

◆ name()

const std::string& AlgorithmHistory::name ( ) const
inlineoverridevirtual

Implements IVersHistoryObj.

Definition at line 103 of file AlgorithmHistory.h.

103 { return algorithm_name(); }

◆ properties()

const PropertyList& AlgorithmHistory::properties ( ) const
inlineoverridevirtual

Implements IVersHistoryObj.

Definition at line 93 of file AlgorithmHistory.h.

93 { return m_properties; }

◆ subalgorithm_histories()

const HistoryList& AlgorithmHistory::subalgorithm_histories ( ) const
inline

Definition at line 96 of file AlgorithmHistory.h.

96 { return m_subalgorithm_histories; }

◆ type()

const std::string& AlgorithmHistory::type ( ) const
inlineoverridevirtual

Implements IVersHistoryObj.

Definition at line 104 of file AlgorithmHistory.h.

104 { return algorithm_type(); }

◆ version()

const std::string& AlgorithmHistory::version ( ) const
inlineoverridevirtual

Implements IVersHistoryObj.

Definition at line 105 of file AlgorithmHistory.h.

105 { return algorithm_version(); }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream lhs,
const AlgorithmHistory rhs 
)
friend

Definition at line 108 of file AlgorithmHistory.h.

108  {
109  return rhs.dump( lhs, false, 0 );
110  }

Member Data Documentation

◆ m_algorithm

const Gaudi::Algorithm* AlgorithmHistory::m_algorithm
private

Definition at line 55 of file AlgorithmHistory.h.

◆ m_algorithm_name

std::string AlgorithmHistory::m_algorithm_name
private

Definition at line 52 of file AlgorithmHistory.h.

◆ m_algorithm_type

std::string AlgorithmHistory::m_algorithm_type
private

Definition at line 46 of file AlgorithmHistory.h.

◆ m_algorithm_version

std::string AlgorithmHistory::m_algorithm_version
private

Definition at line 49 of file AlgorithmHistory.h.

◆ m_jobHistory

const JobHistory* AlgorithmHistory::m_jobHistory
private

Definition at line 64 of file AlgorithmHistory.h.

◆ m_properties

PropertyList AlgorithmHistory::m_properties
private

Definition at line 58 of file AlgorithmHistory.h.

◆ m_subalgorithm_histories

HistoryList AlgorithmHistory::m_subalgorithm_histories
private

Definition at line 61 of file AlgorithmHistory.h.


The documentation for this class was generated from the following files:
AlgorithmHistory::properties
const PropertyList & properties() const override
Definition: AlgorithmHistory.h:93
std::move
T move(T... args)
AlgorithmHistory::algorithm_name
const std::string & algorithm_name() const
Definition: AlgorithmHistory.h:87
AlgorithmHistory::algorithm_version
const std::string & algorithm_version() const
Definition: AlgorithmHistory.h:84
check_ParticleID.props
props
Definition: check_ParticleID.py:21
AlgorithmHistory::m_algorithm_type
std::string m_algorithm_type
Definition: AlgorithmHistory.h:46
AlgorithmHistory::dump
std::ostream & dump(std::ostream &, bool isXML, int indent) const override
Definition: AlgorithmHistory.cpp:78
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:315
AlgorithmHistory::classID
static const CLID & classID()
Definition: AlgorithmHistory.cpp:70
AlgorithmHistory::m_properties
PropertyList m_properties
Definition: AlgorithmHistory.h:58
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:81
AlgorithmHistory::m_algorithm_version
std::string m_algorithm_version
Definition: AlgorithmHistory.h:49
AlgorithmHistory::m_algorithm_name
std::string m_algorithm_name
Definition: AlgorithmHistory.h:52
HistoryObj::indent
virtual void indent(std::ostream &, int) const
Definition: HistoryObj.cpp:56
HistoryObj::convert_string
static std::string convert_string(const std::string &)
Definition: HistoryObj.cpp:30
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:18
AlgorithmHistory::m_subalgorithm_histories
HistoryList m_subalgorithm_histories
Definition: AlgorithmHistory.h:61
AlgorithmHistory::m_jobHistory
const JobHistory * m_jobHistory
Definition: AlgorithmHistory.h:64
std::endl
T endl(T... args)
AlgorithmHistory::m_algorithm
const Gaudi::Algorithm * m_algorithm
Definition: AlgorithmHistory.h:55
AlgorithmHistory::algorithm_type
const std::string & algorithm_type() const
Definition: AlgorithmHistory.h:81