The Gaudi Framework  v33r0 (d5ea422b)
DataHistory.cpp
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 \***********************************************************************************/
12 //
13 // GaudiHistory/DataHistory.cpp
14 //
15 // Contains history information for a Data Object
16 //
17 //
18 // @author: Charles Leggett
19 //
21 
24 #include <iostream>
25 
26 using std::endl;
27 using std::ostream;
28 
29 //**********************************************************************
30 // Member functions.
31 //**********************************************************************
32 
33 // Default constructor.
34 
36  : m_dataClassID( id ), m_dataKey( std::move( key ) ), m_algHist( alg ) {}
37 
38 //**********************************************************************
39 
41  static const CLID CLID_DataHistory = 83814411; // from `clid DataHistory`
42 
43  return CLID_DataHistory;
44 }
45 
46 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
47 
48 void DataHistory::dump( std::ostream& ost, const bool /*isXML*/, int /*ind*/ ) const {
49  ost << "ClassID: " << dataClassID() << endl
50  << "Key: " << dataKey() << endl
51  << "AlgorithmHistory: " << (void*)algorithmHistory() << endl;
52 }
53 
54 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
55 
56 ostream& operator<<( ostream& lhs, const DataHistory& rhs ) {
57 
58  rhs.dump( lhs, false );
59  return lhs;
60 }
const CLID & dataClassID() const
Definition: DataHistory.h:51
AlgorithmHistory * algorithmHistory() const
Definition: DataHistory.h:53
ostream & operator<<(ostream &lhs, const DataHistory &rhs)
Definition: DataHistory.cpp:56
AlgorithmHistory class definition.
T endl(T... args)
STL namespace.
STL class.
DataHistory class definition.
Definition: DataHistory.h:33
void dump(std::ostream &, const bool isXML=false, int indent=0) const override
Definition: DataHistory.cpp:48
unsigned int CLID
Class ID definition.
Definition: ClassID.h:18
DataHistory(const CLID &id, std::string key, AlgorithmHistory *alg)
Definition: DataHistory.cpp:35
std::string dataKey() const
Definition: DataHistory.h:50
static const CLID & classID()
Definition: DataHistory.cpp:40
STL class.