The Gaudi Framework  v29r0 (ff2e7097)
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 "GaudiKernel/ClassID.h"
10 #include <iostream>
11 #include <string>
12 #include <vector>
13 
14 class AlgorithmHistory;
15 
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:
74  std::string m_dummy = "none";
75 };
76 
78 
79 #endif
AlgorithmHistory * algorithmHistory() const
Definition: DataHistory.h:66
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
bool operator()(const DataHistory *lhs, const DataHistory *rhs) const
Definition: DataHistory.h:30
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
GAUDI_API std::ostream & operator<<(std::ostream &lhs, const DataHistory &rhs)
Definition: DataHistory.cpp:50
std::string dataKey() const
Definition: DataHistory.h:63
CLID m_dataClassID
Definition: DataHistory.h:71
const CLID & clID() const override
Retrieve reference to class definition structure.
Definition: DataHistory.h:60
std::string m_dataKey
Definition: DataHistory.h:72
bool operator()(const DataHistory &lhs, const DataHistory &rhs) const
Definition: DataHistory.h:42
static const CLID & classID()
Definition: DataHistory.cpp:32
#define GAUDI_API
Definition: Kernel.h:110
STL class.
const CLID & dataClassID() const
Definition: DataHistory.h:64