The Gaudi Framework  v33r0 (d5ea422b)
DataHistory.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIKERNEL_DATAHISTORY_H
12 #define GAUDIKERNEL_DATAHISTORY_H
13 
14 // History for an event data object.
15 
16 #include "GaudiKernel/HistoryObj.h"
17 
18 #include "GaudiKernel/ClassID.h"
19 #include "GaudiKernel/StatusCode.h"
20 #include <iostream>
21 #include <string>
22 #include <vector>
23 
24 class AlgorithmHistory;
25 
34 
35 public:
36  class DataHistoryOrder final {
37  public:
38  bool operator()( const DataHistory& lhs, const DataHistory& rhs ) const {
39  return std::tie( lhs.m_dataClassID, lhs.m_dataKey, lhs.m_algHist ) <
40  std::tie( rhs.m_dataClassID, rhs.m_dataKey, rhs.m_algHist );
41  }
42  bool operator()( const DataHistory* lhs, const DataHistory* rhs ) const { return ( *this )( *lhs, *rhs ); }
43  };
44 
45  DataHistory( const CLID& id, std::string key, AlgorithmHistory* alg );
46 
47  const CLID& clID() const override { return DataHistory::classID(); }
48  static const CLID& classID();
49 
50  std::string dataKey() const { return m_dataKey; }
51  const CLID& dataClassID() const { return m_dataClassID; }
52 
53  AlgorithmHistory* algorithmHistory() const { return m_algHist; }
54 
55  void dump( std::ostream&, const bool isXML = false, int indent = 0 ) const override;
56 
57 private:
61  std::string m_dummy = "none";
62 };
63 
65 
66 #endif
const CLID & dataClassID() const
Definition: DataHistory.h:51
T tie(T... args)
AlgorithmHistory * algorithmHistory() const
Definition: DataHistory.h:53
static const CLID & classID()
Definition: HistoryObj.cpp:65
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:31
AlgorithmHistory * m_algHist
Definition: DataHistory.h:60
STL class.
DataHistory class definition.
Definition: DataHistory.h:33
unsigned int CLID
Class ID definition.
Definition: ClassID.h:18
GAUDI_API std::ostream & operator<<(std::ostream &lhs, const DataHistory &rhs)
Definition: DataHistory.cpp:56
CLID m_dataClassID
Definition: DataHistory.h:58
bool operator()(const DataHistory &lhs, const DataHistory &rhs) const
Definition: DataHistory.h:38
bool operator()(const DataHistory *lhs, const DataHistory *rhs) const
Definition: DataHistory.h:42
std::string m_dataKey
Definition: DataHistory.h:59
std::string dataKey() const
Definition: DataHistory.h:50
static const CLID & classID()
Definition: DataHistory.cpp:40
#define GAUDI_API
Definition: Kernel.h:81
STL class.
const CLID & clID() const override
Retrieve reference to class definition structure.
Definition: DataHistory.h:47