The Gaudi Framework  master (b9786168)
Loading...
Searching...
No Matches
DataHistory.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 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#pragma once
12
13// History for an event data object.
14
16
17#include <GaudiKernel/ClassID.h>
19#include <iostream>
20#include <string>
21#include <vector>
22
24
33
34public:
35 class DataHistoryOrder final {
36 public:
37 bool operator()( const DataHistory& lhs, const DataHistory& rhs ) const {
38 return std::tie( lhs.m_dataClassID, lhs.m_dataKey, lhs.m_algHist ) <
39 std::tie( rhs.m_dataClassID, rhs.m_dataKey, rhs.m_algHist );
40 }
41 bool operator()( const DataHistory* lhs, const DataHistory* rhs ) const { return ( *this )( *lhs, *rhs ); }
42 };
43
44 DataHistory( const CLID& id, std::string key, AlgorithmHistory* alg );
45
46 const CLID& clID() const override { return DataHistory::classID(); }
47 static const CLID& classID();
48
49 const std::string& dataKey() const { return m_dataKey; }
50 const CLID& dataClassID() const { return m_dataClassID; }
51
53
54 std::ostream& dump( std::ostream&, const bool isXML, int indent ) const override;
55 friend std::ostream& operator<<( std::ostream& lhs, const DataHistory& rhs ) { return rhs.dump( lhs, false, 0 ); }
56
57private:
59 std::string m_dataKey;
61 std::string m_dummy = "none";
62};
unsigned int CLID
Class ID definition.
Definition ClassID.h:16
#define GAUDI_API
Definition Kernel.h:49
AlgorithmHistory class definition.
bool operator()(const DataHistory *lhs, const DataHistory *rhs) const
Definition DataHistory.h:41
bool operator()(const DataHistory &lhs, const DataHistory &rhs) const
Definition DataHistory.h:37
DataHistory class definition.
Definition DataHistory.h:32
const std::string & dataKey() const
Definition DataHistory.h:49
DataHistory(const CLID &id, std::string key, AlgorithmHistory *alg)
static const CLID & classID()
std::string m_dataKey
Definition DataHistory.h:59
const CLID & clID() const override
Retrieve reference to class definition structure.
Definition DataHistory.h:46
const CLID & dataClassID() const
Definition DataHistory.h:50
std::ostream & dump(std::ostream &, const bool isXML, int indent) const override
std::string m_dummy
Definition DataHistory.h:61
friend std::ostream & operator<<(std::ostream &lhs, const DataHistory &rhs)
Definition DataHistory.h:55
CLID m_dataClassID
Definition DataHistory.h:58
AlgorithmHistory * m_algHist
Definition DataHistory.h:60
AlgorithmHistory * algorithmHistory() const
Definition DataHistory.h:52
Base class for History Objects.
Definition HistoryObj.h:30
virtual std::ostream & dump(std::ostream &, bool isXML=false, int indent=0) const =0
static const CLID & classID()