| The Gaudi Framework v27r1

- 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 Property;
17 class JobHistory;
18
27 class GAUDI_API AlgorithmHistory: public HistoryObj, public IVersHistoryObj {
28
29 public: // typedefs
30
31 // List of subalgorithm histories. This may change.
32 typedef std::vector<const AlgorithmHistory*> HistoryList;
33
34 private: // data
35
36 // Algorithm full type.
37 std::string m_algorithm_type;
38
39 // Algorithm version.
40 std::string m_algorithm_version;
41
42 // Algorithm name.
43 std::string m_algorithm_name;
44
45 // Algorithm
46 const Algorithm* m_algorithm;
47
48 // Properties.
49 PropertyList m_properties;
50
51 // Subalgorithm histories.
52 HistoryList m_subalgorithm_histories;
53
54 // Link to jobHistory
55 const JobHistory *m_jobHistory;
56
57 public: // functions
58
59 // Constructor from the algorithm.
60 explicit AlgorithmHistory(const Algorithm& alg, const JobHistory* job);
61
62 // All-fields Constructor for persistency
63 explicit AlgorithmHistory(const std::string& algVersion,
64 const std::string& algName,
65 const std::string& algType,
66 const PropertyList& props,
67 const HistoryList& subHists);
68 // Destructor.
69 virtual ~AlgorithmHistory();
70
71 // Class IDs
72 virtual const CLID& clID() const { return classID(); }
73 static const CLID& classID();
74
75 // Return the algorithm type.
76 const std::string& algorithm_type() const { return m_algorithm_type; }
77
78 // Return the algorithm version.
79 const std::string& algorithm_version() const { return m_algorithm_version; }
80
81 // Return the algorithm name.
82 const std::string& algorithm_name() const { return m_algorithm_name; }
83
84 // The actual algorithm
85 const Algorithm* algorithm() const { return m_algorithm; }
86
87 // Return the algorithm properties.
88 const PropertyList& properties() const { return m_properties; }
89
90 // Return the subalgorithm histories.
91 const HistoryList& subalgorithm_histories() const
92 { return m_subalgorithm_histories; }
93
94 // Return the jobHistory
95 const JobHistory* jobHistory() const { return m_jobHistory; }
96
97
98 void dump(std::ostream &, const bool isXML=false, int indent=0) const;
99
100 const std::string& name() const { return algorithm_name(); }
101 const std::string& type() const { return algorithm_type(); }
102 const std::string& version() const { return algorithm_version(); }
103
104 };
105
106 // Output stream.
107 GAUDI_API std::ostream& operator<<(std::ostream& lhs, const AlgorithmHistory& rhs);
108
109 #endif
HistoryObj::classID
static const CLID & classID()
Definition: HistoryObj.cpp:50
HistoryObj::dump
virtual void dump(std::ostream &, const bool isXML=false, int indent=0) const =0
AlgorithmHistory
AlgorithmHistory class definition.
Definition: AlgorithmHistory.h:27
AlgorithmHistory::HistoryList
std::vector< const AlgorithmHistory * > HistoryList
Definition: AlgorithmHistory.h:32
HistoryObj
Base class for History Objects.
Definition: HistoryObj.h:22
AlgorithmHistory::m_algorithm_type
std::string m_algorithm_type
Definition: AlgorithmHistory.h:37
HistoryObj.h
AlgorithmHistory::m_algorithm_version
std::string m_algorithm_version
Definition: AlgorithmHistory.h:40
JobHistory
JobHistory class definition.
Definition: JobHistory.h:24
IVersHistoryObj.h
AlgorithmHistory::type
const std::string & type() const
Definition: AlgorithmHistory.h:101
AlgorithmHistory::m_subalgorithm_histories
HistoryList m_subalgorithm_histories
Definition: AlgorithmHistory.h:52
std::string
STL class.
AlgorithmHistory::clID
virtual const CLID & clID() const
Retrieve reference to class definition structure.
Definition: AlgorithmHistory.h:72
AlgorithmHistory::algorithm_name
const std::string & algorithm_name() const
Definition: AlgorithmHistory.h:82
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::jobHistory
const JobHistory * jobHistory() const
Definition: AlgorithmHistory.h:95
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
AlgorithmHistory::version
const std::string & version() const
Definition: AlgorithmHistory.h:102
AlgorithmHistory::properties
const PropertyList & properties() const
Definition: AlgorithmHistory.h:88
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:74
Property
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:38
std::vector< const AlgorithmHistory * >
AlgorithmHistory::algorithm_version
const std::string & algorithm_version() const
Definition: AlgorithmHistory.h:79
project_manifest.indent
def indent
Definition: project_manifest.py:11
AlgorithmHistory::algorithm_type
const std::string & algorithm_type() const
Definition: AlgorithmHistory.h:76
AlgorithmHistory::name
const std::string & name() const
Definition: AlgorithmHistory.h:100
AlgorithmHistory::algorithm
const Algorithm * algorithm() const
Definition: AlgorithmHistory.h:85
IVersHistoryObj
Interface for Versioned History Objects.
Definition: IVersHistoryObj.h:18
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:107
std::ostream
STL class.
AlgorithmHistory::subalgorithm_histories
const HistoryList & subalgorithm_histories() const
Definition: AlgorithmHistory.h:91
AlgorithmHistory::m_jobHistory
const JobHistory * m_jobHistory
Definition: AlgorithmHistory.h:55
operator<<
GAUDI_API std::ostream & operator<<(std::ostream &lhs, const AlgorithmHistory &rhs)
Definition: AlgorithmHistory.cpp:144