The Gaudi Framework  master (37c0b60a)
AlgToolHistory.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_ALGTOOLHISTORY_H
12 #define GAUDIKERNEL_ALGTOOLHISTORY_H
13 
14 #include <GaudiKernel/HistoryObj.h>
16 
17 class AlgTool;
18 class JobHistory;
19 
20 #include <memory>
21 #include <string>
22 #include <vector>
23 
33 
34 private: // data
35  // Algtool full type.
37 
38  // Algtool version.
40 
41  // Algtool name.
43 
44  // Pointer to the algtool
45  const AlgTool* m_tool;
46 
47  // Properties.
48  PropertyList m_properties;
49 
50  // Link to jobHistory
52 
53 public:
54  AlgToolHistory( const AlgTool& alg, const JobHistory* job );
55 
56  AlgToolHistory( std::string algVersion, std::string algName, std::string algType, const AlgTool* tool,
57  const PropertyList& props, const JobHistory* job );
58 
59  // Class IDs
60  const CLID& clID() const override { return classID(); }
61  static const CLID& classID();
62 
63  // Return the algtool type.
64  const std::string& algtool_type() const { return m_type; }
65 
66  // Return the algtool version.
67  const std::string& algtool_version() const { return m_version; }
68 
69  // Return the algtool name.
70  const std::string& algtool_name() const { return m_name; }
71 
72  // Pointer to the algtool
73  const AlgTool* algtool_instance() const { return m_tool; }
74 
75  // Return the algorithm properties.
76  const PropertyList& properties() const override { return m_properties; }
77 
78  // Return the jobHistory
79  const JobHistory* jobHistory() const { return m_jobHistory; }
80 
81  std::ostream& dump( std::ostream&, bool isXML, int indent ) const override;
82 
83  const std::string& name() const override { return algtool_name(); }
84  const std::string& type() const override { return algtool_type(); }
85  const std::string& version() const override { return algtool_version(); }
86 
87  friend std::ostream& operator<<( std::ostream& lhs, const AlgToolHistory& rhs ) { return rhs.dump( lhs, false, 0 ); }
88 };
89 
90 #endif
HistoryObj::classID
static const CLID & classID()
Definition: HistoryObj.cpp:65
AlgToolHistory::jobHistory
const JobHistory * jobHistory() const
Definition: AlgToolHistory.h:79
AlgToolHistory::m_version
std::string m_version
Definition: AlgToolHistory.h:39
AlgToolHistory::operator<<
friend std::ostream & operator<<(std::ostream &lhs, const AlgToolHistory &rhs)
Definition: AlgToolHistory.h:87
AlgToolHistory::m_name
std::string m_name
Definition: AlgToolHistory.h:42
std::string
STL class.
AlgToolHistory::name
const std::string & name() const override
Definition: AlgToolHistory.h:83
AlgToolHistory::properties
const PropertyList & properties() const override
Definition: AlgToolHistory.h:76
AlgToolHistory::algtool_version
const std::string & algtool_version() const
Definition: AlgToolHistory.h:67
AlgToolHistory::m_jobHistory
const JobHistory * m_jobHistory
Definition: AlgToolHistory.h:51
AlgToolHistory::m_properties
PropertyList m_properties
Definition: AlgToolHistory.h:48
check_ParticleID.props
props
Definition: check_ParticleID.py:21
AlgToolHistory::algtool_name
const std::string & algtool_name() const
Definition: AlgToolHistory.h:70
DataObject::m_version
unsigned char m_version
Version number.
Definition: DataObject.h:41
AlgToolHistory
Definition: AlgToolHistory.h:32
AlgToolHistory::algtool_instance
const AlgTool * algtool_instance() const
Definition: AlgToolHistory.h:73
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:81
HistoryObj
Definition: HistoryObj.h:31
bug_34121.tool
tool
Definition: bug_34121.py:18
AlgToolHistory::type
const std::string & type() const override
Definition: AlgToolHistory.h:84
AlgToolHistory::m_type
std::string m_type
Definition: AlgToolHistory.h:36
AlgToolHistory::m_tool
const AlgTool * m_tool
Definition: AlgToolHistory.h:45
IVersHistoryObj.h
std::ostream
STL class.
AlgToolHistory::algtool_type
const std::string & algtool_type() const
Definition: AlgToolHistory.h:64
AlgToolHistory::version
const std::string & version() const override
Definition: AlgToolHistory.h:85
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:18
IVersHistoryObj
Definition: IVersHistoryObj.h:28
HistoryObj::dump
virtual std::ostream & dump(std::ostream &, bool isXML=false, int indent=0) const =0
AlgTool
Definition: AlgTool.h:62
HistoryObj.h
JobHistory
Definition: JobHistory.h:33
AlgToolHistory::dump
std::ostream & dump(std::ostream &, bool isXML, int indent) const override
Definition: AlgToolHistory.cpp:61
AlgToolHistory::clID
const CLID & clID() const override
Retrieve reference to class definition structure.
Definition: AlgToolHistory.h:60
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:81