| The Gaudi Framework v32r1 (f65d50dc)

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