The Gaudi Framework  v32r2 (46d42edc)
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 namespace Gaudi {
16  class Algorithm;
17 }
18 class JobHistory;
19 
29 
30 public: // typedefs
31  // List of subalgorithm histories. This may change.
33 
34 private: // data
35  // Algorithm full type.
37 
38  // Algorithm version.
40 
41  // Algorithm name.
43 
44  // Algorithm
46 
47  // Properties.
49 
50  // Subalgorithm histories.
52 
53  // Link to 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.
100 
101 #endif
const std::string & algorithm_version() const
const std::string & algorithm_type() const
const std::string & name() const override
const std::string & type() const override
static const CLID & classID()
Definition: HistoryObj.cpp:55
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:21
std::string m_algorithm_type
std::string m_algorithm_version
JobHistory class definition.
Definition: JobHistory.h:22
HistoryList m_subalgorithm_histories
STL class.
const std::string & algorithm_name() const
PropertyList m_properties
const Gaudi::Algorithm * algorithm() const
const PropertyList & properties() const override
std::string m_algorithm_name
const std::string & version() const override
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
Alias for backward compatibility.
Definition: Algorithm.h:56
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:79
const HistoryList & subalgorithm_histories() const
const JobHistory * jobHistory() const
Interface for Versioned History Objects.
#define GAUDI_API
Definition: Kernel.h:71
STL class.
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1
const Gaudi::Algorithm * m_algorithm
const CLID & clID() const override
Retrieve reference to class definition structure.
const JobHistory * m_jobHistory
GAUDI_API std::ostream & operator<<(std::ostream &lhs, const AlgorithmHistory &rhs)