The Gaudi Framework  v29r0 (ff2e7097)
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 JobHistory;
17 
27 {
28 
29 public: // typedefs
30  // List of subalgorithm histories. This may change.
32 
33 private: // data
34  // Algorithm full type.
36 
37  // Algorithm version.
39 
40  // Algorithm name.
42 
43  // Algorithm
45 
46  // Properties.
48 
49  // Subalgorithm histories.
51 
52  // Link to 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.
99 
100 #endif
static const CLID & classID()
Definition: HistoryObj.cpp:59
AlgorithmHistory class definition.
std::vector< const AlgorithmHistory * > HistoryList
const std::string & type() const override
virtual void dump(std::ostream &, const bool isXML=false, int indent=0) const =0
Base class for History Objects.
Definition: HistoryObj.h:21
std::string m_algorithm_type
std::string m_algorithm_version
const PropertyList & properties() const override
JobHistory class definition.
Definition: JobHistory.h:22
HistoryList m_subalgorithm_histories
STL class.
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 CLID & clID() const override
Retrieve reference to class definition structure.
const std::string & version() const override
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:78
friend std::ostream & operator<<(std::ostream &s, const DataObject &obj)
Output operator (ASCII)
Definition: DataObject.h:88
const std::string & algorithm_version() const
const std::string & algorithm_type() const
Properties m_properties
Collection of all declared properties.
Definition: PropertyMgr.h:139
const Algorithm * algorithm() const
Interface for Versioned History Objects.
const std::string & name() const override
#define GAUDI_API
Definition: Kernel.h:110
STL class.
const HistoryList & subalgorithm_histories() const
const JobHistory * m_jobHistory