| The Gaudi Framework v28r2p1 (f1a77ff4)

- 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 <vector>
9 #include <string>
10 #include <iostream>
11 #include "GaudiKernel/StatusCode.h"
12 #include "GaudiKernel/ClassID.h"
13
14 class AlgorithmHistory;
15
23 class GAUDI_API DataHistory: public HistoryObj {
24
25 public:
26
27 class DataHistoryOrder final {
28 public:
29 bool operator() ( const DataHistory* lhs, const DataHistory* rhs ) const {
30 if (lhs->m_dataClassID == rhs->m_dataClassID) {
31 if (lhs->m_dataKey == rhs->m_dataKey) {
32 return ( lhs->m_algHist < rhs->m_algHist );
33 } else {
34 return ( lhs->m_dataKey < rhs->m_dataKey );
35 }
36 } else {
37 return (lhs->m_dataClassID < rhs->m_dataClassID);
38 }
39
40 }
41 bool operator() ( const DataHistory& lhs, const DataHistory& rhs ) const {
42 if (lhs.m_dataClassID == rhs.m_dataClassID) {
43 if (lhs.m_dataKey == rhs.m_dataKey) {
44 return ( lhs.m_algHist < rhs.m_algHist );
45 } else {
46 return ( lhs.m_dataKey < rhs.m_dataKey );
47 }
48 } else {
49 return (lhs.m_dataClassID < rhs.m_dataClassID);
50 }
51 }
52 };
53
54 DataHistory(const CLID& id, std::string key, AlgorithmHistory* alg);
55
56 ~DataHistory() override = default;
57
58 const CLID& clID() const override { return DataHistory::classID(); }
59 static const CLID& classID();
60
61
62 std::string dataKey() const { return m_dataKey; }
63 const CLID& dataClassID() const { return m_dataClassID; }
64
65 AlgorithmHistory* algorithmHistory() const { return m_algHist; }
66
67 void dump(std::ostream &, const bool isXML=false, int indent=0) const override;
68
69 private:
70
71 CLID m_dataClassID;
72 std::string m_dataKey;
73 AlgorithmHistory* m_algHist;
74 std::string m_dummy = "none";
75
76
77 };
78
79 GAUDI_API std::ostream& operator<<(std::ostream& lhs, const DataHistory& rhs);
80
81 #endif
ClassID.h
DataHistory::algorithmHistory
AlgorithmHistory * algorithmHistory() const
Definition: DataHistory.h:65
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
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:54
Gaudi::Functional::operator()
virtual Out operator()(const vector_of_const_< In > &inputs) const =0
DataHistory::dataKey
std::string dataKey() const
Definition: DataHistory.h:62
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:58
DataHistory::m_dataKey
std::string m_dataKey
Definition: DataHistory.h:72
DataHistory::DataHistoryOrder
Definition: DataHistory.h:27
StatusCode.h
DataHistory::classID
static const CLID & classID()
Definition: DataHistory.cpp:36
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:107
std::ostream
STL class.
DataHistory::dataClassID
const CLID & dataClassID() const
Definition: DataHistory.h:63