| The Gaudi Framework v29r0 (ff2e7097)

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

- File List
- File Members

AlgorithmHistory.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_ALGORITHMHISTORY_H
2 #define GAUDIKERNEL_ALGORITHMHISTORY_H
3
4 // An object of this class carries the history information
5 // which is specific to a Gaudi algorithm.
6
7 #include "GaudiKernel/HistoryObj.h"
8 #include "GaudiKernel/IVersHistoryObj.h"
9
10 #include <iosfwd>
11 #include <string>
12 #include <typeinfo>
13 #include <vector>
14
15 class Algorithm;
16 class JobHistory;
17
26 class GAUDI_API AlgorithmHistory : public HistoryObj, public IVersHistoryObj
27 {
28
29 public: // typedefs
30 // List of subalgorithm histories. This may change.
31 typedef std::vector<const AlgorithmHistory*> HistoryList;
32
33 private: // data
34 // Algorithm full type.
35 std::string m_algorithm_type;
36
37 // Algorithm version.
38 std::string m_algorithm_version;
39
40 // Algorithm name.
41 std::string m_algorithm_name;
42
43 // Algorithm
44 const Algorithm* m_algorithm;
45
46 // Properties.
47 PropertyList m_properties;
48
49 // Subalgorithm histories.
50 HistoryList m_subalgorithm_histories;
51
52 // Link to jobHistory
53 const JobHistory* m_jobHistory;
54
55 public: // functions
56 // Constructor from the algorithm.
57 explicit AlgorithmHistory( const Algorithm& alg, const JobHistory* job );
58
59 // All-fields Constructor for persistency
60 explicit AlgorithmHistory( const std::string& algVersion, const std::string& algName, const std::string& algType,
61 const PropertyList& props, const HistoryList& subHists );
62 // Destructor.
63 virtual ~AlgorithmHistory();
64
65 // Class IDs
66 const CLID& clID() const override { return classID(); }
67 static const CLID& classID();
68
69 // Return the algorithm type.
70 const std::string& algorithm_type() const { return m_algorithm_type; }
71
72 // Return the algorithm version.
73 const std::string& algorithm_version() const { return m_algorithm_version; }
74
75 // Return the algorithm name.
76 const std::string& algorithm_name() const { return m_algorithm_name; }
77
78 // The actual algorithm
79 const Algorithm* algorithm() const { return m_algorithm; }
80
81 // Return the algorithm properties.
82 const PropertyList& properties() const override { return m_properties; }
83
84 // Return the subalgorithm histories.
85 const HistoryList& subalgorithm_histories() const { return m_subalgorithm_histories; }
86
87 // Return the jobHistory
88 const JobHistory* jobHistory() const { return m_jobHistory; }
89
90 void dump( std::ostream&, const bool isXML = false, int indent = 0 ) const override;
91
92 const std::string& name() const override { return algorithm_name(); }
93 const std::string& type() const override { return algorithm_type(); }
94 const std::string& version() const override { return algorithm_version(); }
95 };
96
97 // Output stream.
98 GAUDI_API std::ostream& operator<<( std::ostream& lhs, const AlgorithmHistory& rhs );
99
100 #endif
HistoryObj::classID
static const CLID & classID()
Definition: HistoryObj.cpp:59
AlgorithmHistory
AlgorithmHistory class definition.
Definition: AlgorithmHistory.h:26
AlgorithmHistory::HistoryList
std::vector< const AlgorithmHistory * > HistoryList
Definition: AlgorithmHistory.h:31
AlgorithmHistory::type
const std::string & type() const override
Definition: AlgorithmHistory.h:93
HistoryObj::dump
virtual void dump(std::ostream &, const bool isXML=false, int indent=0) const =0
HistoryObj
Base class for History Objects.
Definition: HistoryObj.h:21
AlgorithmHistory::m_algorithm_type
std::string m_algorithm_type
Definition: AlgorithmHistory.h:35
HistoryObj.h
AlgorithmHistory::m_algorithm_version
std::string m_algorithm_version
Definition: AlgorithmHistory.h:38
AlgorithmHistory::properties
const PropertyList & properties() const override
Definition: AlgorithmHistory.h:82
JobHistory
JobHistory class definition.
Definition: JobHistory.h:22
IVersHistoryObj.h
AlgorithmHistory::m_subalgorithm_histories
HistoryList m_subalgorithm_histories
Definition: AlgorithmHistory.h:50
std::string
STL class.
AlgorithmHistory::algorithm_name
const std::string & algorithm_name() const
Definition: AlgorithmHistory.h:76
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::jobHistory
const JobHistory * jobHistory() const
Definition: AlgorithmHistory.h:88
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
AlgorithmHistory::clID
const CLID & clID() const override
Retrieve reference to class definition structure.
Definition: AlgorithmHistory.h:66
AlgorithmHistory::version
const std::string & version() const override
Definition: AlgorithmHistory.h:94
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:78
DataObject::operator<<
friend std::ostream & operator<<(std::ostream &s, const DataObject &obj)
Output operator (ASCII)
Definition: DataObject.h:88
std::vector< const AlgorithmHistory * >
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
m_properties
Properties m_properties
Collection of all declared properties.
Definition: PropertyMgr.h:139
AlgorithmHistory::algorithm
const Algorithm * algorithm() const
Definition: AlgorithmHistory.h:79
IVersHistoryObj
Interface for Versioned History Objects.
Definition: IVersHistoryObj.h:18
AlgorithmHistory::name
const std::string & name() const override
Definition: AlgorithmHistory.h:92
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:110
std::ostream
STL class.
AlgorithmHistory::subalgorithm_histories
const HistoryList & subalgorithm_histories() const
Definition: AlgorithmHistory.h:85
AlgorithmHistory::m_jobHistory
const JobHistory * m_jobHistory
Definition: AlgorithmHistory.h:53