The Gaudi Framework
master (181af51f)
Loading...
Searching...
No Matches
AlgToolHistory.cpp
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
#include <
GaudiKernel/AlgTool.h
>
12
#include <
GaudiKernel/AlgToolHistory.h
>
13
#include <
GaudiKernel/JobHistory.h
>
14
15
#include <iostream>
16
17
using
std::endl;
18
using
std::ostream;
19
20
AlgToolHistory::AlgToolHistory
(
const
AlgTool
& alg,
const
JobHistory
* job )
21
:
m_type
( alg.
type
() )
22
,
m_version
(
"UNKNOWN"
)
23
,
m_name
( alg.
name
() )
24
,
m_tool
( &alg )
25
,
m_properties
( alg.getProperties() )
26
,
m_jobHistory
( job ) {}
27
28
AlgToolHistory::AlgToolHistory
( std::string algVersion, std::string algName, std::string algType,
const
AlgTool
* tool,
29
const
PropertyList
& props,
30
const
JobHistory
* job )
31
:
m_type
(
std
::move( algType ) )
// FIXME type_info???
32
,
m_version
(
std
::move( algVersion ) )
33
,
m_name
(
std
::move( algName ) )
34
,
m_tool
( tool )
35
,
m_properties
( props )
36
,
m_jobHistory
( job ) {}
37
38
const
CLID
&
AlgToolHistory::classID
() {
39
40
static
const
CLID
CLID_AlgToolHistory = 171959758;
// from `clid AlgToolHistory`
41
return
CLID_AlgToolHistory;
42
}
43
44
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
45
46
std::ostream&
AlgToolHistory::dump
( std::ostream& ost,
const
bool
isXML,
int
ind )
const
{
47
48
if
( !isXML ) {
49
50
ost <<
"Name: "
<<
algtool_name
() << endl;
51
ost <<
"Type: "
<<
algtool_type
() << endl;
52
ost <<
"Version: "
<<
algtool_version
() << endl;
53
ost <<
"Parent: "
<<
algtool_instance
()->
name
() << endl;
54
55
// Properties
56
ost <<
"Properties: ["
<< endl;
57
58
for
(
const
auto
& iprop :
properties
() ) {
59
iprop->fillStream( ost );
60
ost << endl;
61
}
62
ost <<
"]"
<< endl;
63
64
}
else
{
65
66
ind += 2;
67
indent
( ost, ind );
68
ost <<
"<COMPONENT name=\""
<<
algtool_name
() <<
"\" class=\""
<<
convert_string
(
algtool_type
() )
69
<<
"\" version=\""
<<
convert_string
(
algtool_version
() ) <<
"\" parent=\""
70
<<
convert_string
(
algtool_instance
()->
name
() ) <<
"\">"
<< endl;
71
72
for
(
const
auto
& iprop :
properties
() ) {
73
74
indent
( ost, ind + 2 );
75
ost <<
"<PROPERTY name=\""
<< iprop->name() <<
"\" value=\""
<<
convert_string
( iprop->toString() )
76
<<
"\" documentation=\""
<<
convert_string
( iprop->documentation() ) <<
"\">"
<< endl;
77
}
78
79
indent
( ost, ind );
80
ost <<
"</COMPONENT>"
<< endl;
81
}
82
return
ost;
83
}
AlgTool.h
AlgToolHistory.h
CLID
unsigned int CLID
Class ID definition.
Definition
ClassID.h:16
JobHistory.h
AlgToolHistory::m_properties
PropertyList m_properties
Definition
AlgToolHistory.h:47
AlgToolHistory::dump
std::ostream & dump(std::ostream &, bool isXML, int indent) const override
Definition
AlgToolHistory.cpp:46
AlgToolHistory::m_type
std::string m_type
Definition
AlgToolHistory.h:35
AlgToolHistory::m_version
std::string m_version
Definition
AlgToolHistory.h:38
AlgToolHistory::type
const std::string & type() const override
Definition
AlgToolHistory.h:83
AlgToolHistory::algtool_type
const std::string & algtool_type() const
Definition
AlgToolHistory.h:63
AlgToolHistory::m_jobHistory
const JobHistory * m_jobHistory
Definition
AlgToolHistory.h:50
AlgToolHistory::classID
static const CLID & classID()
Definition
AlgToolHistory.cpp:38
AlgToolHistory::algtool_name
const std::string & algtool_name() const
Definition
AlgToolHistory.h:69
AlgToolHistory::m_tool
const AlgTool * m_tool
Definition
AlgToolHistory.h:44
AlgToolHistory::AlgToolHistory
AlgToolHistory(const AlgTool &alg, const JobHistory *job)
Definition
AlgToolHistory.cpp:20
AlgToolHistory::m_name
std::string m_name
Definition
AlgToolHistory.h:41
AlgToolHistory::properties
const PropertyList & properties() const override
Definition
AlgToolHistory.h:75
AlgToolHistory::name
const std::string & name() const override
Definition
AlgToolHistory.h:82
AlgToolHistory::algtool_version
const std::string & algtool_version() const
Definition
AlgToolHistory.h:66
AlgToolHistory::algtool_instance
const AlgTool * algtool_instance() const
Definition
AlgToolHistory.h:72
AlgTool
Base class from which all the concrete tool classes should be derived.
Definition
AlgTool.h:55
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition
AlgTool.cpp:72
HistoryObj::indent
virtual void indent(std::ostream &, int) const
Definition
HistoryObj.cpp:37
HistoryObj::convert_string
static std::string convert_string(const std::string &)
Definition
HistoryObj.cpp:14
IVersHistoryObj::PropertyList
std::vector< Gaudi::Details::PropertyBase * > PropertyList
Definition
IVersHistoryObj.h:29
JobHistory
JobHistory class definition.
Definition
JobHistory.h:32
std
STL namespace.
GaudiKernel
src
Lib
AlgToolHistory.cpp
Generated on Wed Oct 8 2025 09:53:37 for The Gaudi Framework by
1.13.1