All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DataHistory.h
Go to the documentation of this file.
1 // $Id: DataHistory.h,v 1.1 2006/11/09 10:24:05 mato Exp $
2 
3 #ifndef GAUDIKERNEL_DATAHISTORY_H
4 #define GAUDIKERNEL_DATAHISTORY_H
5 
6 // History for an event data object.
7 
9 
10 #include <vector>
11 #include <string>
12 #include <iostream>
13 #include "GaudiKernel/StatusCode.h"
14 #include "GaudiKernel/ClassID.h"
15 
16 class AlgorithmHistory;
17 
26 
27 public:
28 
30  public:
31  bool operator() ( const DataHistory* lhs, const DataHistory* rhs ) const {
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  }
43  bool operator() ( const DataHistory& lhs, const DataHistory& rhs ) const {
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, const std::string& key, AlgorithmHistory* alg);
57 
59 
60  virtual const CLID& clID() const { return DataHistory::classID(); }
61  static const CLID& classID();
62 
63 
64  std::string dataKey() const { return m_dataKey; }
65  const CLID& dataClassID() const { return m_dataClassID; }
66 
67  AlgorithmHistory* algorithmHistory() const { return m_algHist; }
68 
69  void dump(std::ostream &, const bool isXML=false, int indent=0) const;
70 
71 private:
72 
74  std::string m_dataKey;
76  std::string m_dummy;
77 
78 
79 };
80 
81 GAUDI_API std::ostream& operator<<(std::ostream& lhs, const DataHistory& rhs);
82 
83 #endif
std::string m_dummy
Definition: DataHistory.h:76
AlgorithmHistory * algorithmHistory() const
Definition: DataHistory.h:67
static const CLID & classID()
Definition: HistoryObj.cpp:62
virtual void dump(std::ostream &, const bool isXML=false, int indent=0) const =0
AlgorithmHistory class definition.
Base class for History Objects.
Definition: HistoryObj.h:24
AlgorithmHistory * m_algHist
Definition: DataHistory.h:75
virtual const CLID & clID() const
Retrieve reference to class definition structure.
Definition: DataHistory.h:60
DataHistory class definition.
Definition: DataHistory.h:25
unsigned int CLID
Class ID definition.
Definition: ClassID.h:9
GAUDI_API std::ostream & operator<<(std::ostream &lhs, const DataHistory &rhs)
Definition: DataHistory.cpp:56
std::string dataKey() const
Definition: DataHistory.h:64
CLID m_dataClassID
Definition: DataHistory.h:73
std::string m_dataKey
Definition: DataHistory.h:74
static const CLID & classID()
Definition: DataHistory.cpp:38
#define GAUDI_API
Definition: Kernel.h:108
const CLID & dataClassID() const
Definition: DataHistory.h:65