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 
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 
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 
74  std::string m_dummy = "none";
75 
76 
77 };
78 
80 
81 #endif
AlgorithmHistory * algorithmHistory() const
Definition: DataHistory.h:65
AlgorithmHistory class definition.
Base class for History Objects.
Definition: HistoryObj.h:21
AlgorithmHistory * m_algHist
Definition: DataHistory.h:73
STL class.
DataHistory class definition.
Definition: DataHistory.h:23
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
GAUDI_API std::ostream & operator<<(std::ostream &lhs, const DataHistory &rhs)
Definition: DataHistory.cpp:54
virtual Out operator()(const vector_of_const_< In > &inputs) const =0
std::string dataKey() const
Definition: DataHistory.h:62
CLID m_dataClassID
Definition: DataHistory.h:71
const CLID & clID() const override
Retrieve reference to class definition structure.
Definition: DataHistory.h:58
std::string m_dataKey
Definition: DataHistory.h:72
static const CLID & classID()
Definition: DataHistory.cpp:36
#define GAUDI_API
Definition: Kernel.h:107
STL class.
const CLID & dataClassID() const
Definition: DataHistory.h:63