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 
9 
10 #include <iosfwd>
11 #include <string>
12 #include <typeinfo>
13 #include <vector>
14 
15 class Algorithm;
16 class Property;
17 class JobHistory;
18 
28 
29 public: // typedefs
30 
31  // List of subalgorithm histories. This may change.
33 
34 private: // data
35 
36  // Algorithm full type.
38 
39  // Algorithm version.
41 
42  // Algorithm name.
44 
45  // Algorithm
47 
48  // Properties.
50 
51  // Subalgorithm histories.
53 
54  // Link to 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.
108 
109 #endif
static const CLID & classID()
Definition: HistoryObj.cpp:50
virtual void dump(std::ostream &, const bool isXML=false, int indent=0) const =0
AlgorithmHistory class definition.
std::vector< const AlgorithmHistory * > HistoryList
Base class for History Objects.
Definition: HistoryObj.h:22
std::string m_algorithm_type
std::string m_algorithm_version
JobHistory class definition.
Definition: JobHistory.h:24
const std::string & type() const
HistoryList m_subalgorithm_histories
STL class.
virtual const CLID & clID() const
Retrieve reference to class definition structure.
const std::string & algorithm_name() const
PropertyList m_properties
const Algorithm * m_algorithm
std::string m_algorithm_name
const JobHistory * jobHistory() const
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
const std::string & version() const
const PropertyList & properties() const
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:74
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:38
const std::string & algorithm_version() const
const std::string & algorithm_type() const
const std::string & name() const
const Algorithm * algorithm() const
Interface for Versioned History Objects.
#define GAUDI_API
Definition: Kernel.h:107
STL class.
const HistoryList & subalgorithm_histories() const
const JobHistory * m_jobHistory
GAUDI_API std::ostream & operator<<(std::ostream &lhs, const AlgorithmHistory &rhs)