The Gaudi Framework  master (37c0b60a)
DataHistory.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 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 
46 
47  const CLID& clID() const override { return DataHistory::classID(); }
48  static const CLID& classID();
49 
50  const 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  std::ostream& dump( std::ostream&, const bool isXML, int indent ) const override;
56  friend std::ostream& operator<<( std::ostream& lhs, const DataHistory& rhs ) { return rhs.dump( lhs, false, 0 ); }
57 
58 private:
62  std::string m_dummy = "none";
63 };
64 
65 #endif
HistoryObj::classID
static const CLID & classID()
Definition: HistoryObj.cpp:65
DataHistory::DataHistoryOrder::operator()
bool operator()(const DataHistory *lhs, const DataHistory *rhs) const
Definition: DataHistory.h:42
DataHistory::algorithmHistory
AlgorithmHistory * algorithmHistory() const
Definition: DataHistory.h:53
std::string
STL class.
DataHistory::DataHistoryOrder
Definition: DataHistory.h:36
DataHistory::classID
static const CLID & classID()
Definition: DataHistory.cpp:40
DataHistory::m_algHist
AlgorithmHistory * m_algHist
Definition: DataHistory.h:61
ClassID.h
DataHistory::clID
const CLID & clID() const override
Retrieve reference to class definition structure.
Definition: DataHistory.h:47
DataHistory::DataHistoryOrder::operator()
bool operator()(const DataHistory &lhs, const DataHistory &rhs) const
Definition: DataHistory.h:38
StatusCode.h
std::tie
T tie(T... args)
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:81
HistoryObj
Definition: HistoryObj.h:31
AlgorithmHistory
Definition: AlgorithmHistory.h:38
DataHistory::dump
std::ostream & dump(std::ostream &, const bool isXML, int indent) const override
Definition: DataHistory.cpp:48
std::ostream
STL class.
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:18
DataHistory::m_dataClassID
CLID m_dataClassID
Definition: DataHistory.h:59
HistoryObj::dump
virtual std::ostream & dump(std::ostream &, bool isXML=false, int indent=0) const =0
DataHistory::dataClassID
const CLID & dataClassID() const
Definition: DataHistory.h:51
DataHistory::operator<<
friend std::ostream & operator<<(std::ostream &lhs, const DataHistory &rhs)
Definition: DataHistory.h:56
HistoryObj.h
DataHistory::dataKey
const std::string & dataKey() const
Definition: DataHistory.h:50
DataHistory
Definition: DataHistory.h:33
DataHistory::m_dataKey
std::string m_dataKey
Definition: DataHistory.h:60
ProduceConsume.key
key
Definition: ProduceConsume.py:84
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:81