| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
AlgorithmHistory Class Reference

AlgorithmHistory class definition. More...

`#include <GaudiKernel/AlgorithmHistory.h>`

Inheritance diagram for AlgorithmHistory:
[legend]
Collaboration diagram for AlgorithmHistory:
[legend]

## 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 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 CLID & | clID () const override
| Retrieve reference to class definition structure. More...
const std::string & | algorithm_type () const
const std::string & | algorithm_version () const
const std::string & | algorithm_name () const
const Algorithm * | algorithm () const
const PropertyList & | properties () const override
const HistoryList & | subalgorithm_histories () const
const JobHistory * | jobHistory () const
void | dump (std::ostream &, const bool isXML=false, int indent=0) const override
const std::string & | name () const override
const std::string & | type () const override
const std::string & | version () const override
Public Member Functions inherited from HistoryObj
| HistoryObj ()=default
virtual | ~HistoryObj ()=default
const CLID & | clID () 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...
DataObject & | operator= (const DataObject &rhs)
| Assignment Operator. More...
| DataObject (DataObject &&rhs)
| Move Constructor. More...
DataObject & | operator= (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::string & | name () 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...
IRegistry * | registry () const
| Get pointer to Registry. More...
LinkManager * | linkMgr () 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::ostream & | fillStream (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 CLID & | classID ()
Static Public Member Functions inherited from HistoryObj
static const CLID & | classID ()
static std::string | convert_string (const std::string &)
Static Public Member Functions inherited from DataObject
static const CLID & | classID ()
| 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 Algorithm * | m_algorithm
PropertyList | m_properties
HistoryList | m_subalgorithm_histories
const JobHistory * | m_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 26 of file AlgorithmHistory.h.

## Member Typedef Documentation

typedef std::vector<const AlgorithmHistory*> AlgorithmHistory::HistoryList

Definition at line 31 of file AlgorithmHistory.h.

## Constructor & Destructor Documentation

AlgorithmHistory::AlgorithmHistory | ( | const 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 )
36 {
37 assert( alg.subAlgorithms() != 0 );
38
39 for ( const auto& ialg : *alg.subAlgorithms() ) {
40 m_subalgorithm_histories.push_back( new AlgorithmHistory( *ialg, job ) );
41 }
42 }
Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:737
PropertyHolder::getProperties
const std::vector< Gaudi::Details::PropertyBase * > & getProperties() const override
get all properties
Definition: PropertyHolder.h:329
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:336
AlgorithmHistory::m_algorithm_type
std::string m_algorithm_type
Definition: AlgorithmHistory.h:35
AlgorithmHistory::m_algorithm_version
std::string m_algorithm_version
Definition: AlgorithmHistory.h:38
AlgorithmHistory::m_subalgorithm_histories
HistoryList m_subalgorithm_histories
Definition: AlgorithmHistory.h:50
std::vector::push_back
T push_back(T...args)
AlgorithmHistory::m_properties
PropertyList m_properties
Definition: AlgorithmHistory.h:47
AlgorithmHistory::m_algorithm
const Algorithm * m_algorithm
Definition: AlgorithmHistory.h:44
AlgorithmHistory::m_algorithm_name
std::string m_algorithm_name
Definition: AlgorithmHistory.h:41
Algorithm::version
const std::string & version() const override
Definition: Algorithm.cpp:741
Algorithm::subAlgorithms
const std::vector< Algorithm * > * subAlgorithms() const
List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms.
Definition: Algorithm.cpp:782
AlgorithmHistory::AlgorithmHistory
AlgorithmHistory(const Algorithm &alg, const JobHistory *job)
Definition: AlgorithmHistory.cpp:29
AlgorithmHistory::m_jobHistory
const JobHistory * m_jobHistory
Definition: AlgorithmHistory.h:53

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

Definition at line 46 of file AlgorithmHistory.cpp.

49 : m_algorithm_type( algType )
50 , // FIXME type_info???
51 m_algorithm_version( algVersion )
52 , m_algorithm_name( algName )
53 , m_algorithm( nullptr )
54 , m_properties( props )
55 , m_subalgorithm_histories( subHists )
56 , m_jobHistory( nullptr )
57 {
58 }
AlgorithmHistory::m_algorithm_type
std::string m_algorithm_type
Definition: AlgorithmHistory.h:35
AlgorithmHistory::m_algorithm_version
std::string m_algorithm_version
Definition: AlgorithmHistory.h:38
AlgorithmHistory::m_subalgorithm_histories
HistoryList m_subalgorithm_histories
Definition: AlgorithmHistory.h:50
AlgorithmHistory::m_properties
PropertyList m_properties
Definition: AlgorithmHistory.h:47
AlgorithmHistory::m_algorithm
const Algorithm * m_algorithm
Definition: AlgorithmHistory.h:44
AlgorithmHistory::m_algorithm_name
std::string m_algorithm_name
Definition: AlgorithmHistory.h:41
AlgorithmHistory::m_jobHistory
const JobHistory * m_jobHistory
Definition: AlgorithmHistory.h:53

AlgorithmHistory::~AlgorithmHistory | ( |  | ) |
| virtual

Definition at line 64 of file AlgorithmHistory.cpp.

65 {
66 for ( auto& i : m_subalgorithm_histories ) delete i;
67 }
AlgorithmHistory::m_subalgorithm_histories
HistoryList m_subalgorithm_histories
Definition: AlgorithmHistory.h:50

## Member Function Documentation

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

Definition at line 79 of file AlgorithmHistory.h.

79 { return m_algorithm; }
AlgorithmHistory::m_algorithm
const Algorithm * m_algorithm
Definition: AlgorithmHistory.h:44

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

Definition at line 76 of file AlgorithmHistory.h.

76 { return m_algorithm_name; }
AlgorithmHistory::m_algorithm_name
std::string m_algorithm_name
Definition: AlgorithmHistory.h:41

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

Definition at line 70 of file AlgorithmHistory.h.

70 { return m_algorithm_type; }
AlgorithmHistory::m_algorithm_type
std::string m_algorithm_type
Definition: AlgorithmHistory.h:35

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

Definition at line 73 of file AlgorithmHistory.h.

73 { return m_algorithm_version; }
AlgorithmHistory::m_algorithm_version
std::string m_algorithm_version
Definition: AlgorithmHistory.h:38

const CLID & AlgorithmHistory::classID | ( |  | ) |
| static

Definition at line 71 of file AlgorithmHistory.cpp.

72 {
73
74 static const CLID CLID_AlgorithmHistory = 56809101; // from `clid AlgorithmHistory`
75 return CLID_AlgorithmHistory;
76 }
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8

const CLID& AlgorithmHistory::clID | ( |  | ) | const
| inline override virtual

Retrieve reference to class definition structure.

Retrieve Pointer to class definition structure.

Reimplemented from DataObject.

Definition at line 66 of file AlgorithmHistory.h.

66 { return classID(); }
AlgorithmHistory::classID
static const CLID & classID()
Definition: AlgorithmHistory.cpp:71

void AlgorithmHistory::dump | ( | std::ostream & | ost,
|  | const bool | isXML = `false`,
|  | int | indent = `0`
| ) |  | const
| override virtual

Implements HistoryObj.

Definition at line 80 of file AlgorithmHistory.cpp.

81 {
82
83 if ( !isXML ) {
84 ost << "Type: " << algorithm_type() << endl;
85 ost << "Name: " << algorithm_name() << endl;
86 ost << "Version: " << algorithm_version() << endl;
87 // Properties.
88 ost << "Properties: [" << endl;
89 ;
90 for ( const auto& iprop : properties() ) {
91 iprop->fillStream( ost );
92 ost << endl;
93 }
94 ost << "]" << endl;
95 // Subalgorithms.
96 if ( subalgorithm_histories().size() == 0 ) {
97 ost << "No subalgorithms.";
98 } else {
99 ost << "Subalgorithms: {" << endl;
100 for ( auto iphist = subalgorithm_histories().begin(); iphist != subalgorithm_histories().end(); ++iphist ) {
101 if ( iphist == subalgorithm_histories().begin() ) {
102 ost << "----------" << endl;
103 }
104 ost << **iphist << endl;
105 ost << "----------" << endl;
106 }
107 ost << "}";
108 }
109 } else {
110 ind += 2;
111 indent( ost, ind );
112 ost << "<COMPONENT name=\"" << algorithm_name() << "\" class=\"" << convert_string( algorithm_type() )
113 << "\" version=\"" << algorithm_version() << "\">" << std::endl;
114
115 for ( const auto& iprop : properties() ) {
116 indent( ost, ind + 2 );
117 ost << "<PROPERTY name=\"" << iprop->name() << "\" value=\"" << convert_string( iprop->toString() )
118 << "\" documentation=\"" << convert_string( iprop->documentation() ) << "\">" << std::endl;
119 }
120
121 // Subalgs
122 for ( const auto& iphist : subalgorithm_histories() ) {
123 iphist->dump( ost, isXML, ind + 2 );
124 }
125
126 indent( ost, ind );
127 ost << "</COMPONENT>" << std::endl;
128 }
129 }
std::endl
T endl(T...args)
std::vector::end
T end(T...args)
AlgorithmHistory::properties
const PropertyList & properties() const override
Definition: AlgorithmHistory.h:82
begin
auto begin(reverse_wrapper< T > &w)
Definition: reverse.h:58
AlgorithmHistory::algorithm_name
const std::string & algorithm_name() const
Definition: AlgorithmHistory.h:76
HistoryObj::indent
virtual void indent(std::ostream &, int) const
Definition: HistoryObj.cpp:49
std::vector::begin
T begin(T...args)
HistoryObj::convert_string
static std::string convert_string(const std::string &)
Definition: HistoryObj.cpp:20
AlgorithmHistory::algorithm_version
const std::string & algorithm_version() const
Definition: AlgorithmHistory.h:73
AlgorithmHistory::algorithm_type
const std::string & algorithm_type() const
Definition: AlgorithmHistory.h:70
AlgorithmHistory::subalgorithm_histories
const HistoryList & subalgorithm_histories() const
Definition: AlgorithmHistory.h:85

const JobHistory* AlgorithmHistory::jobHistory | ( |  | ) | const
| inline

Definition at line 88 of file AlgorithmHistory.h.

88 { return m_jobHistory; }
AlgorithmHistory::m_jobHistory
const JobHistory * m_jobHistory
Definition: AlgorithmHistory.h:53

const std::string& AlgorithmHistory::name | ( |  | ) | const
| inline override virtual

Implements IVersHistoryObj.

Definition at line 92 of file AlgorithmHistory.h.

92 { return algorithm_name(); }
AlgorithmHistory::algorithm_name
const std::string & algorithm_name() const
Definition: AlgorithmHistory.h:76

const PropertyList& AlgorithmHistory::properties | ( |  | ) | const
| inline override virtual

Implements IVersHistoryObj.

Definition at line 82 of file AlgorithmHistory.h.

82 { return m_properties; }
AlgorithmHistory::m_properties
PropertyList m_properties
Definition: AlgorithmHistory.h:47

const HistoryList& AlgorithmHistory::subalgorithm_histories | ( |  | ) | const
| inline

Definition at line 85 of file AlgorithmHistory.h.

85 { return m_subalgorithm_histories; }
AlgorithmHistory::m_subalgorithm_histories
HistoryList m_subalgorithm_histories
Definition: AlgorithmHistory.h:50

const std::string& AlgorithmHistory::type | ( |  | ) | const
| inline override virtual

Implements IVersHistoryObj.

Definition at line 93 of file AlgorithmHistory.h.

93 { return algorithm_type(); }
AlgorithmHistory::algorithm_type
const std::string & algorithm_type() const
Definition: AlgorithmHistory.h:70

const std::string& AlgorithmHistory::version | ( |  | ) | const
| inline override virtual

Implements IVersHistoryObj.

Definition at line 94 of file AlgorithmHistory.h.

94 { return algorithm_version(); }
AlgorithmHistory::algorithm_version
const std::string & algorithm_version() const
Definition: AlgorithmHistory.h:73

## Member Data Documentation

const Algorithm* AlgorithmHistory::m_algorithm
| private

Definition at line 44 of file AlgorithmHistory.h.

std::string AlgorithmHistory::m_algorithm_name
| private

Definition at line 41 of file AlgorithmHistory.h.

std::string AlgorithmHistory::m_algorithm_type
| private

Definition at line 35 of file AlgorithmHistory.h.

std::string AlgorithmHistory::m_algorithm_version
| private

Definition at line 38 of file AlgorithmHistory.h.

const JobHistory* AlgorithmHistory::m_jobHistory
| private

Definition at line 53 of file AlgorithmHistory.h.

PropertyList AlgorithmHistory::m_properties
| private

Definition at line 47 of file AlgorithmHistory.h.

HistoryList AlgorithmHistory::m_subalgorithm_histories
| private

Definition at line 50 of file AlgorithmHistory.h.

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

- GaudiKernel/GaudiKernel/AlgorithmHistory.h
- GaudiKernel/src/Lib/AlgorithmHistory.cpp