All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AlgorithmHistory.h
Go to the documentation of this file.
1 // $Id: AlgorithmHistory.h,v 1.1 2006/11/09 10:24:04 mato Exp $
2 
3 #ifndef GAUDIKERNEL_ALGORITHMHISTORY_H
4 #define GAUDIKERNEL_ALGORITHMHISTORY_H
5 
6 // An object of this class carries the history information
7 // which is specific to a Gaudi algorithm.
8 
11 
12 #include <iosfwd>
13 #include <string>
14 #include <typeinfo>
15 #include <vector>
16 
17 class Algorithm;
18 class Property;
19 class JobHistory;
20 
30 
31 public: // typedefs
32 
33  // List of subalgorithm histories. This may change.
34  typedef std::vector<const AlgorithmHistory*> HistoryList;
35 
36 private: // data
37 
38  // Algorithm full type.
39  std::string m_algorithm_type;
40 
41  // Algorithm version.
42  std::string m_algorithm_version;
43 
44  // Algorithm name.
45  std::string m_algorithm_name;
46 
47  // Algorithm
49 
50  // Properties.
52 
53  // Subalgorithm histories.
55 
56  // Link to jobHistory
58 
59 public: // functions
60 
61  // Constructor from the algorithm.
62  explicit AlgorithmHistory(const Algorithm& alg, const JobHistory* job);
63 
64  // All-fields Constructor for persistency
65  explicit AlgorithmHistory(const std::string& algVersion,
66  const std::string& algName,
67  const std::string& algType,
68  const PropertyList& props,
69  const HistoryList& subHists);
70  // Destructor.
71  virtual ~AlgorithmHistory();
72 
73  // Class IDs
74  virtual const CLID& clID() const { return classID(); }
75  static const CLID& classID();
76 
77  // Return the algorithm type.
78  const std::string& algorithm_type() const { return m_algorithm_type; }
79 
80  // Return the algorithm version.
81  const std::string& algorithm_version() const { return m_algorithm_version; }
82 
83  // Return the algorithm name.
84  const std::string& algorithm_name() const { return m_algorithm_name; }
85 
86  // The actual algorithm
87  const Algorithm* algorithm() const { return m_algorithm; }
88 
89  // Return the algorithm properties.
90  const PropertyList& properties() const { return m_properties; }
91 
92  // Return the subalgorithm histories.
94  { return m_subalgorithm_histories; }
95 
96  // Return the jobHistory
97  const JobHistory* jobHistory() const { return m_jobHistory; }
98 
99 
100  void dump(std::ostream &, const bool isXML=false, int indent=0) const;
101 
102  const std::string& name() const { return algorithm_name(); }
103  const std::string& type() const { return algorithm_type(); }
104  const std::string& version() const { return algorithm_version(); }
105 
106 };
107 
108 // Output stream.
109 GAUDI_API std::ostream& operator<<(std::ostream& lhs, const AlgorithmHistory& rhs);
110 
111 #endif
static const CLID & classID()
Definition: HistoryObj.cpp:62
virtual void dump(std::ostream &, const bool isXML=false, int indent=0) const =0
AlgorithmHistory class definition.
std::vector< const AlgorithmHistory * > HistoryList
std::vector< Property * > PropertyList
Base class for History Objects.
Definition: HistoryObj.h:24
std::string m_algorithm_type
std::string m_algorithm_version
JobHistory class definition.
Definition: JobHistory.h:25
const std::string & type() const
HistoryList m_subalgorithm_histories
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:9
const std::string & version() const
const PropertyList & properties() const
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:61
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:43
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:108
const HistoryList & subalgorithm_histories() const
const JobHistory * m_jobHistory
GAUDI_API std::ostream & operator<<(std::ostream &lhs, const AlgorithmHistory &rhs)