The Gaudi Framework
v26r1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
AlgToolHistory.cpp
Go to the documentation of this file.
1
2
//
3
// $Id: AlgToolHistory.cpp,v 1.1 2006/11/09 10:24:05 mato Exp $
4
//
5
// GaudiHistory/AlgToolHistory.cpp
6
//
7
// Contains history information for an AlgTool
8
//
9
//
10
// @author: Charles Leggett
11
//
13
14
#include "GaudiKernel/AlgToolHistory.h"
15
#include "GaudiKernel/JobHistory.h"
16
#include "GaudiKernel/AlgTool.h"
17
18
#include <iostream>
19
20
using
std::ostream;
21
using
std::endl;
22
23
AlgToolHistory::AlgToolHistory
(
const
AlgTool
& alg,
const
JobHistory
* job)
24
:
25
m_type(alg.
type
()),
26
m_version(
"UNKNOWN"
),
27
m_name(alg.name()),
28
m_tool( &alg ),
29
m_properties(alg.getProperties()),
30
m_jobHistory(job)
31
{
32
}
33
34
//**********************************************************************
35
36
AlgToolHistory::AlgToolHistory
(
const
std::string& algVersion,
37
const
std::string& algName,
38
const
std::string& algType,
39
const
AlgTool
* tool,
40
const
PropertyList
& props,
41
const
JobHistory
* job):
42
m_type(algType),
// FIXME type_info???
43
m_version(algVersion),
44
m_name(algName),
45
m_tool(tool),
46
m_properties(props),
47
m_jobHistory(job)
48
{}
49
50
//**********************************************************************
51
52
const
CLID
&
AlgToolHistory::classID
() {
53
54
static
CLID
CLID_AlgToolHistory = 171959758;
// from `clid AlgToolHistory`
55
return
CLID_AlgToolHistory;
56
57
}
58
59
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
60
61
void
62
AlgToolHistory::dump
(std::ostream& ost,
const
bool
isXML,
int
ind)
const
{
63
64
if
(!isXML) {
65
66
ost <<
"Name: "
<<
algtool_name
() << endl;
67
ost <<
"Type: "
<<
algtool_type
() << endl;
68
ost <<
"Version: "
<<
algtool_version
() << endl;
69
ost <<
"Parent: "
<<
algtool_instance
()->
name
() << endl;
70
71
//Properties
72
ost <<
"Properties: ["
<< endl;
73
74
for
( AlgToolHistory::PropertyList::const_iterator
75
ipprop=
properties
().begin();
76
ipprop!=
properties
().end(); ++ipprop ) {
77
const
Property
& prop = **ipprop;
78
prop.
fillStream
(ost);
79
ost << endl;
80
}
81
ost <<
"]"
<< endl;
82
83
}
else
{
84
85
ind += 2;
86
indent
(ost,ind);
87
ost <<
"<COMPONENT name=\""
<<
algtool_name
()
88
<<
"\" class=\""
<<
convert_string
(
algtool_type
())
89
<<
"\" version=\""
<<
convert_string
(
algtool_version
())
90
<<
"\" parent=\""
<<
convert_string
(
algtool_instance
()->
name
())
91
<<
"\">"
<< endl;
92
93
for
( AlgToolHistory::PropertyList::const_iterator
94
ipprop=
properties
().begin();
95
ipprop!=
properties
().end(); ++ipprop ) {
96
const
Property
& prop = **ipprop;
97
98
indent
(ost,ind+2);
99
ost <<
"<PROPERTY name=\""
<< prop.
name
()
100
<<
"\" value=\""
<<
convert_string
(prop.
toString
())
101
<<
"\" documentation=\""
<<
convert_string
(prop.
documentation
())
102
<<
"\">"
<< endl;
103
}
104
105
indent
(ost,ind);
106
ost <<
"</COMPONENT>"
<< endl;
107
108
}
109
110
}
111
112
//**********************************************************************
113
114
ostream&
operator<<
(ostream& lhs,
const
AlgToolHistory
& rhs) {
115
116
rhs.
dump
(lhs,
false
);
117
118
return
lhs;
119
}
GaudiKernel
src
Lib
AlgToolHistory.cpp
Generated on Mon Feb 16 2015 11:56:56 for The Gaudi Framework by
1.8.2