| The Gaudi Framework v28r2-patches (bc4ad17a)

- 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 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::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:715
PropertyHolder::getProperties
const std::vector< Gaudi::Details::PropertyBase * > & getProperties() const override
get all properties
Definition: PropertyHolder.h:331
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:299
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:719
Algorithm::subAlgorithms
const std::vector< Algorithm * > * subAlgorithms() const
List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms.
Definition: Algorithm.cpp:754
AlgorithmHistory::AlgorithmHistory
AlgorithmHistory(const Algorithm &alg, const JobHistory *job)
Definition: AlgorithmHistory.cpp:30
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 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: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 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: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 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

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:72

void AlgorithmHistory::dump | ( | std::ostream & | ost,
|  | const bool | isXML = `false`,
|  | int | indent = `0`
| ) |  | const
| override 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)
AlgorithmHistory::properties
const PropertyList & properties() const override
Definition: AlgorithmHistory.h:82
begin
auto begin(reverse_wrapper< T > &w)
Definition: reverse.h:48
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:43
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: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