| The Gaudi Framework v27r1

- 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< Property * > | 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 ()
virtual const CLID & | clID () const
| 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
const HistoryList & | subalgorithm_histories () const
const JobHistory * | jobHistory () const
void | dump (std::ostream &, const bool isXML=false, int indent=0) const
const std::string & | name () const
const std::string & | type () const
const std::string & | version () const
Public Member Functions inherited from HistoryObj
| HistoryObj ()=default
virtual | ~HistoryObj ()=default
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 27 of file AlgorithmHistory.h.

## Member Typedef Documentation

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

Definition at line 32 of file AlgorithmHistory.h.

## Constructor & Destructor Documentation

AlgorithmHistory::AlgorithmHistory | ( | const Algorithm & | alg,
|  | const JobHistory * | job
| ) |  |
| explicit

Definition at line 30 of file AlgorithmHistory.cpp.

31 :
32 m_algorithm_type(System::typeinfoName(typeid(alg))),
33 m_algorithm_version(alg.version()),
34 m_algorithm_name(alg.name()),
35 m_algorithm( &alg ),
36 m_properties(alg.getProperties()),
37 m_jobHistory(job)
38 {
39 assert( alg.subAlgorithms() != 0 );
40
41 for ( const auto& ialg : *alg.subAlgorithms() ) {
42 m_subalgorithm_histories.push_back(new AlgorithmHistory(*ialg, job));
43 }
44 }
Algorithm::version
const std::string & version() const override
Definition: Algorithm.cpp:828
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:297
AlgorithmHistory::m_algorithm_type
std::string m_algorithm_type
Definition: AlgorithmHistory.h:37
AlgorithmHistory::m_algorithm_version
std::string m_algorithm_version
Definition: AlgorithmHistory.h:40
AlgorithmHistory::m_subalgorithm_histories
HistoryList m_subalgorithm_histories
Definition: AlgorithmHistory.h:52
Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:820
std::vector::push_back
T push_back(T...args)
AlgorithmHistory::m_properties
PropertyList m_properties
Definition: AlgorithmHistory.h:49
AlgorithmHistory::m_algorithm
const Algorithm * m_algorithm
Definition: AlgorithmHistory.h:46
AlgorithmHistory::m_algorithm_name
std::string m_algorithm_name
Definition: AlgorithmHistory.h:43
Algorithm::getProperties
const std::vector< Property * > & getProperties() const override
Implementation of IProperty::getProperties.
Definition: Algorithm.cpp:998
Algorithm::subAlgorithms
const std::vector< Algorithm * > * subAlgorithms() const
List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms.
Definition: Algorithm.cpp:865
AlgorithmHistory::AlgorithmHistory
AlgorithmHistory(const Algorithm &alg, const JobHistory *job)
Definition: AlgorithmHistory.cpp:30
AlgorithmHistory::m_jobHistory
const JobHistory * m_jobHistory
Definition: AlgorithmHistory.h:55

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

Definition at line 48 of file AlgorithmHistory.cpp.

52 :
53 m_algorithm_type(algType), // FIXME type_info???
54 m_algorithm_version(algVersion),
55 m_algorithm_name(algName),
56 m_algorithm(nullptr),
57 m_properties(props),
58 m_subalgorithm_histories(subHists),
59 m_jobHistory(nullptr) {}
AlgorithmHistory::m_algorithm_type
std::string m_algorithm_type
Definition: AlgorithmHistory.h:37
AlgorithmHistory::m_algorithm_version
std::string m_algorithm_version
Definition: AlgorithmHistory.h:40
AlgorithmHistory::m_subalgorithm_histories
HistoryList m_subalgorithm_histories
Definition: AlgorithmHistory.h:52
AlgorithmHistory::m_properties
PropertyList m_properties
Definition: AlgorithmHistory.h:49
AlgorithmHistory::m_algorithm
const Algorithm * m_algorithm
Definition: AlgorithmHistory.h:46
AlgorithmHistory::m_algorithm_name
std::string m_algorithm_name
Definition: AlgorithmHistory.h:43
AlgorithmHistory::m_jobHistory
const JobHistory * m_jobHistory
Definition: AlgorithmHistory.h:55

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

Definition at line 65 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:52
ana.i
list i
Definition: ana.py:128

## Member Function Documentation

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

Definition at line 85 of file AlgorithmHistory.h.

85 { return m_algorithm; }
AlgorithmHistory::m_algorithm
const Algorithm * m_algorithm
Definition: AlgorithmHistory.h:46

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

Definition at line 82 of file AlgorithmHistory.h.

82 { return m_algorithm_name; }
AlgorithmHistory::m_algorithm_name
std::string m_algorithm_name
Definition: AlgorithmHistory.h:43

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

Definition at line 76 of file AlgorithmHistory.h.

76 { return m_algorithm_type; }
AlgorithmHistory::m_algorithm_type
std::string m_algorithm_type
Definition: AlgorithmHistory.h:37

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

Definition at line 79 of file AlgorithmHistory.h.

79 { return m_algorithm_version; }
AlgorithmHistory::m_algorithm_version
std::string m_algorithm_version
Definition: AlgorithmHistory.h:40

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

Definition at line 72 of file AlgorithmHistory.cpp.

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

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

Retrieve reference to class definition structure.

Retrieve Pointer to class definition structure.

Reimplemented from HistoryObj.

Definition at line 72 of file AlgorithmHistory.h.

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

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

Implements HistoryObj.

Definition at line 82 of file AlgorithmHistory.cpp.

82 {
83
84 if (!isXML) {
85 ost << "Type: " << algorithm_type() << endl;
86 ost << "Name: " << algorithm_name() << endl;
87 ost << "Version: " << algorithm_version() << endl;
88 // Properties.
89 ost << "Properties: [" << endl;;
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();
101 iphist!=subalgorithm_histories().end(); ++iphist ) {
102 if ( iphist==subalgorithm_histories().begin() ) {
103 ost << "----------" << endl;
104 }
105 ost << **iphist << endl;
106 ost << "----------" << endl;
107 }
108 ost << "}";
109 }
110 } else {
111 ind += 2;
112 indent(ost,ind);
113 ost << "<COMPONENT name=\"" << algorithm_name()
114 << "\" class=\"" << convert_string(algorithm_type())
115 << "\" version=\"" << algorithm_version()
116 << "\">" << std::endl;
117
118 for ( const auto& iprop : properties() ) {
119 indent(ost,ind+2);
120 ost << "<PROPERTY name=\"" << iprop->name()
121 << "\" value=\"" << convert_string(iprop->toString())
122 << "\" documentation=\"" << convert_string(iprop->documentation())
123 << "\">" << std::endl;
124 }
125
126 // Subalgs
127 for ( const auto& iphist : subalgorithm_histories() ) {
128 iphist->dump(ost,isXML,ind+2);
129 }
130
131 indent(ost,ind);
132 ost << "</COMPONENT>" << std::endl;
133
134 }
135 }
std::endl
T endl(T...args)
std::vector::end
T end(T...args)
begin
auto begin(reverse_wrapper< T > &w)
Definition: reverse.h:45
AlgorithmHistory::algorithm_name
const std::string & algorithm_name() const
Definition: AlgorithmHistory.h:82
HistoryObj::indent
virtual void indent(std::ostream &, int) const
Definition: HistoryObj.cpp:43
AlgorithmHistory::properties
const PropertyList & properties() const
Definition: AlgorithmHistory.h:88
std::vector::begin
T begin(T...args)
HistoryObj::convert_string
static std::string convert_string(const std::string &)
Definition: HistoryObj.cpp:21
AlgorithmHistory::algorithm_version
const std::string & algorithm_version() const
Definition: AlgorithmHistory.h:79
AlgorithmHistory::algorithm_type
const std::string & algorithm_type() const
Definition: AlgorithmHistory.h:76
AlgorithmHistory::subalgorithm_histories
const HistoryList & subalgorithm_histories() const
Definition: AlgorithmHistory.h:91

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

Definition at line 95 of file AlgorithmHistory.h.

95 { return m_jobHistory; }
AlgorithmHistory::m_jobHistory
const JobHistory * m_jobHistory
Definition: AlgorithmHistory.h:55

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

Implements IVersHistoryObj.

Definition at line 100 of file AlgorithmHistory.h.

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

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

Implements IVersHistoryObj.

Definition at line 88 of file AlgorithmHistory.h.

88 { return m_properties; }
AlgorithmHistory::m_properties
PropertyList m_properties
Definition: AlgorithmHistory.h:49

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

Definition at line 91 of file AlgorithmHistory.h.

92 { return m_subalgorithm_histories; }
AlgorithmHistory::m_subalgorithm_histories
HistoryList m_subalgorithm_histories
Definition: AlgorithmHistory.h:52

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

Implements IVersHistoryObj.

Definition at line 101 of file AlgorithmHistory.h.

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

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

Implements IVersHistoryObj.

Definition at line 102 of file AlgorithmHistory.h.

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

## Member Data Documentation

const Algorithm* AlgorithmHistory::m_algorithm
| private

Definition at line 46 of file AlgorithmHistory.h.

std::string AlgorithmHistory::m_algorithm_name
| private

Definition at line 43 of file AlgorithmHistory.h.

std::string AlgorithmHistory::m_algorithm_type
| private

Definition at line 37 of file AlgorithmHistory.h.

std::string AlgorithmHistory::m_algorithm_version
| private

Definition at line 40 of file AlgorithmHistory.h.

const JobHistory* AlgorithmHistory::m_jobHistory
| private

Definition at line 55 of file AlgorithmHistory.h.

PropertyList AlgorithmHistory::m_properties
| private

Definition at line 49 of file AlgorithmHistory.h.

HistoryList AlgorithmHistory::m_subalgorithm_histories
| private

Definition at line 52 of file AlgorithmHistory.h.

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

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