| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

DataHistory.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_DATAHISTORY_H
2 #define GAUDIKERNEL_DATAHISTORY_H
3
4 // History for an event data object.
5
6 #include "GaudiKernel/HistoryObj.h"
7
8 #include "GaudiKernel/ClassID.h"
9 #include "GaudiKernel/StatusCode.h"
10 #include <iostream>
11 #include <string>
12 #include <vector>
13
14 class AlgorithmHistory;
15
23 class GAUDI_API DataHistory : public HistoryObj
24 {
25
26 public:
27 class DataHistoryOrder final
28 {
29 public:
30 bool operator()( const DataHistory* lhs, const DataHistory* rhs ) const
31 {
32 if ( lhs->m_dataClassID == rhs->m_dataClassID ) {
33 if ( lhs->m_dataKey == rhs->m_dataKey ) {
34 return ( lhs->m_algHist < rhs->m_algHist );
35 } else {
36 return ( lhs->m_dataKey < rhs->m_dataKey );
37 }
38 } else {
39 return ( lhs->m_dataClassID < rhs->m_dataClassID );
40 }
41 }
42 bool operator()( const DataHistory& lhs, const DataHistory& rhs ) const
43 {
44 if ( lhs.m_dataClassID == rhs.m_dataClassID ) {
45 if ( lhs.m_dataKey == rhs.m_dataKey ) {
46 return ( lhs.m_algHist < rhs.m_algHist );
47 } else {
48 return ( lhs.m_dataKey < rhs.m_dataKey );
49 }
50 } else {
51 return ( lhs.m_dataClassID < rhs.m_dataClassID );
52 }
53 }
54 };
55
56 DataHistory( const CLID& id, std::string key, AlgorithmHistory* alg );
57
58 ~DataHistory() override = default;
59
60 const CLID& clID() const override { return DataHistory::classID(); }
61 static const CLID& classID();
62
63 std::string dataKey() const { return m_dataKey; }
64 const CLID& dataClassID() const { return m_dataClassID; }
65
66 AlgorithmHistory* algorithmHistory() const { return m_algHist; }
67
68 void dump( std::ostream&, const bool isXML = false, int indent = 0 ) const override;
69
70 private:
71 CLID m_dataClassID;
72 std::string m_dataKey;
73 AlgorithmHistory* m_algHist;
74 std::string m_dummy = "none";
75 };
76
77 GAUDI_API std::ostream& operator<<( std::ostream& lhs, const DataHistory& rhs );
78
79 #endif
ClassID.h
DataHistory::algorithmHistory
AlgorithmHistory * algorithmHistory() const
Definition: DataHistory.h:66
AlgorithmHistory
AlgorithmHistory class definition.
Definition: AlgorithmHistory.h:26
HistoryObj
Base class for History Objects.
Definition: HistoryObj.h:21
HistoryObj.h
DataHistory::m_algHist
AlgorithmHistory * m_algHist
Definition: DataHistory.h:73
std::string
STL class.
DataHistory
DataHistory class definition.
Definition: DataHistory.h:23
DataHistory::DataHistoryOrder::operator()
bool operator()(const DataHistory *lhs, const DataHistory *rhs) const
Definition: DataHistory.h:30
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
operator<<
GAUDI_API std::ostream & operator<<(std::ostream &lhs, const DataHistory &rhs)
Definition: DataHistory.cpp:50
DataHistory::dataKey
std::string dataKey() const
Definition: DataHistory.h:63
DataHistory::m_dataClassID
CLID m_dataClassID
Definition: DataHistory.h:71
DataHistory::clID
const CLID & clID() const override
Retrieve reference to class definition structure.
Definition: DataHistory.h:60
DataHistory::m_dataKey
std::string m_dataKey
Definition: DataHistory.h:72
DataHistory::DataHistoryOrder::operator()
bool operator()(const DataHistory &lhs, const DataHistory &rhs) const
Definition: DataHistory.h:42
DataHistory::DataHistoryOrder
Definition: DataHistory.h:27
StatusCode.h
DataHistory::classID
static const CLID & classID()
Definition: DataHistory.cpp:32
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:110
std::ostream
STL class.
DataHistory::dataClassID
const CLID & dataClassID() const
Definition: DataHistory.h:64