File indexing completed on 2025-02-21 10:00:27
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef GAUDIKERNEL_ALGORITHMHISTORY_H
0012 #define GAUDIKERNEL_ALGORITHMHISTORY_H
0013
0014
0015
0016
0017 #include "GaudiKernel/HistoryObj.h"
0018 #include "GaudiKernel/IVersHistoryObj.h"
0019
0020 #include <iosfwd>
0021 #include <string>
0022 #include <typeinfo>
0023 #include <vector>
0024
0025 namespace Gaudi {
0026 class Algorithm;
0027 }
0028 class JobHistory;
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038 class GAUDI_API AlgorithmHistory : public HistoryObj, public IVersHistoryObj {
0039
0040 public:
0041
0042 typedef std::vector<const AlgorithmHistory*> HistoryList;
0043
0044 private:
0045
0046 std::string m_algorithm_type;
0047
0048
0049 std::string m_algorithm_version;
0050
0051
0052 std::string m_algorithm_name;
0053
0054
0055 const Gaudi::Algorithm* m_algorithm;
0056
0057
0058 PropertyList m_properties;
0059
0060
0061 HistoryList m_subalgorithm_histories;
0062
0063
0064 const JobHistory* m_jobHistory;
0065
0066 public:
0067
0068 explicit AlgorithmHistory( const Gaudi::Algorithm& alg, const JobHistory* job );
0069
0070
0071 explicit AlgorithmHistory( std::string algVersion, std::string algName, std::string algType,
0072 const PropertyList& props, const HistoryList& subHists );
0073
0074 virtual ~AlgorithmHistory();
0075
0076
0077 const CLID& clID() const override { return classID(); }
0078 static const CLID& classID();
0079
0080
0081 const std::string& algorithm_type() const { return m_algorithm_type; }
0082
0083
0084 const std::string& algorithm_version() const { return m_algorithm_version; }
0085
0086
0087 const std::string& algorithm_name() const { return m_algorithm_name; }
0088
0089
0090 const Gaudi::Algorithm* algorithm() const { return m_algorithm; }
0091
0092
0093 const PropertyList& properties() const override { return m_properties; }
0094
0095
0096 const HistoryList& subalgorithm_histories() const { return m_subalgorithm_histories; }
0097
0098
0099 const JobHistory* jobHistory() const { return m_jobHistory; }
0100
0101 std::ostream& dump( std::ostream&, bool isXML, int indent ) const override;
0102
0103 const std::string& name() const override { return algorithm_name(); }
0104 const std::string& type() const override { return algorithm_type(); }
0105 const std::string& version() const override { return algorithm_version(); }
0106
0107
0108 friend std::ostream& operator<<( std::ostream& lhs, const AlgorithmHistory& rhs ) {
0109 return rhs.dump( lhs, false, 0 );
0110 }
0111 };
0112
0113 #endif