ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
DataQuality
DataQualityInterfaces
src
HanConfigCompAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
DataQualityInterfaces/HanConfigCompAlg.h
"
6
#include "
DataQualityInterfaces/HanUtils.h
"
7
8
//Get rid of Root macros that confuse Doxygen
10
ClassImp
(
dqi::HanConfigCompAlg
)
12
13
namespace
dqi
{
14
15
HanConfigCompAlg::
16
HanConfigCompAlg
()
17
{
18
this->
m_subAlgs
=
newTList
(
"subAlgs"
);
19
this->
m_libs
=
newTList
(
"libs"
);
20
}
21
22
HanConfigCompAlg::
23
HanConfigCompAlg
(
const
HanConfigCompAlg
& other )
24
:TObject(other),
25
m_name
(other.
m_name
)
26
{
27
this->
m_subAlgs
=
newTList
(
"subAlgs"
);
28
this->
m_libs
=
newTList
(
"libs"
);
29
TIter nextAlg(other.m_subAlgs);
30
TObjString* otherAlg;
31
while
((otherAlg =
dynamic_cast<
TObjString*
>
(nextAlg())) != 0){
32
TObjString* alg =
new
TObjString(*otherAlg);
33
this->
m_subAlgs
->Add(alg);
34
}
35
TIter nextLib(other.m_libs);
36
TObjString* otherLib;
37
while
((otherLib =
dynamic_cast<
TObjString*
>
(nextLib())) != 0){
38
TObjString* lib =
new
TObjString(*otherLib);
39
this->
m_libs
->Add(lib);
40
}
41
}
42
43
HanConfigCompAlg
&
44
HanConfigCompAlg::operator=
(
const
HanConfigCompAlg
& other )
45
{
46
if
(
this
== &other)
return
*
this
;
47
48
this->
m_name
= other.m_name;
49
this->
m_subAlgs
=
newTList
(
"subAlgs"
);
50
this->
m_libs
=
newTList
(
"libs"
);
51
TIter nextAlg(other.m_subAlgs);
52
TObjString* otherAlg;
53
while
((otherAlg =
dynamic_cast<
TObjString*
>
(nextAlg())) != 0){
54
TObjString* alg =
new
TObjString(*otherAlg);
55
this->
m_subAlgs
->Add(alg);
56
}
57
TIter nextLib(other.m_libs);
58
TObjString* otherLib;
59
while
((otherLib =
dynamic_cast<
TObjString*
>
(nextLib())) != 0){
60
TObjString* lib =
new
TObjString(*otherLib);
61
this->
m_libs
->Add(lib);
62
}
63
return
*
this
;
64
}
65
66
HanConfigCompAlg::
67
~HanConfigCompAlg
(){
68
this->
m_subAlgs
->Delete();
69
this->
m_libs
->Delete();
70
delete
m_subAlgs
;
71
delete
m_libs
;
72
}
73
74
void
75
HanConfigCompAlg::
76
SetName
( std::string name )
77
{
78
this->
m_name
.SetString(name.c_str());
79
}
80
81
const
char
*
82
HanConfigCompAlg::
83
GetName
()
const
84
{
85
return
this->
m_name
.GetName();
86
}
87
88
void
89
HanConfigCompAlg::
90
AddAlg
( std::string alg )
91
{
92
TObjString* newAlg =
new
TObjString(alg.c_str());
93
this->
m_subAlgs
->Add(newAlg);
94
}
95
96
TIter
97
HanConfigCompAlg::
98
GetAllAlg
()
const
99
{
100
return
TIter(this->
m_subAlgs
);
101
}
102
103
void
104
HanConfigCompAlg::
105
AddLib
( std::string lib )
106
{
107
TObjString* newLib =
new
TObjString(lib.c_str());
108
this->
m_libs
->Add(newLib);
109
}
110
111
TIter
112
HanConfigCompAlg::
113
GetAllLib
()
const
114
{
115
return
TIter(this->
m_libs
);
116
}
117
118
void
119
HanConfigCompAlg::
120
PrintIOStream
( std::ostream& o )
const
121
{
122
o <<
"\nHanConfigCompAlg: "
<< this->
GetName
() <<
"\n"
;
123
124
if
(!(
m_subAlgs
->IsEmpty())) {
125
o <<
" Sub-Algorithms = {\n"
;
126
TIter nextAlg(
m_subAlgs
);
127
TObjString* alg;
128
while
((alg=
dynamic_cast<
TObjString*
>
(nextAlg()))!=0){
129
o <<
" "
<< alg;
130
}
131
o <<
" }\n"
;
132
}
133
if
(!(
m_libs
->IsEmpty())) {
134
o <<
" Libraries = {\n"
;
135
TIter nextLib(
m_libs
);
136
TObjString* lib;
137
while
((lib=
dynamic_cast<
TObjString*
>
(nextLib()))!=0){
138
o <<
" "
<< lib;
139
}
140
o <<
" }\n"
;
141
}
142
}
143
144
void
HanConfigCompAlg::Streamer(TBuffer &R__b)
145
{
146
// Stream an object of class dqi::HanConfigCompAlg.
147
148
if
(R__b.IsReading()) {
149
//delete m_subAlgs; delete m_libs;
150
R__b.ReadClassBuffer(dqi::HanConfigCompAlg::Class(),
this
);
151
}
else
{
152
R__b.WriteClassBuffer(dqi::HanConfigCompAlg::Class(),
this
);
153
}
154
}
155
156
}
//namespace dqi
157
158
std::ostream&
operator<<
( std::ostream& o,
const
dqi::HanConfigCompAlg
& p ){
159
p.PrintIOStream(o);
160
return
o;
161
}
162
163
std::ostream&
operator<<
( std::ostream& o,
const
dqi::HanConfigCompAlg
* p ){
164
p->PrintIOStream(o);
165
return
o;
166
}
operator<<
std::ostream & operator<<(std::ostream &o, const dqi::HanConfigCompAlg &p)
Definition
HanConfigCompAlg.cxx:158
HanConfigCompAlg.h
HanUtils.h
ClassImp
ClassImp(xAOD::Experimental::RFileChecker) namespace xAOD
Definition
RFileChecker.cxx:28
dqi::HanConfigCompAlg
Definition
HanConfigCompAlg.h:22
dqi::HanConfigCompAlg::GetAllLib
virtual TIter GetAllLib() const
Definition
HanConfigCompAlg.cxx:113
dqi::HanConfigCompAlg::GetAllAlg
virtual TIter GetAllAlg() const
Definition
HanConfigCompAlg.cxx:98
dqi::HanConfigCompAlg::PrintIOStream
virtual void PrintIOStream(std::ostream &o) const
Definition
HanConfigCompAlg.cxx:120
dqi::HanConfigCompAlg::GetName
virtual const char * GetName() const
Definition
HanConfigCompAlg.cxx:83
dqi::HanConfigCompAlg::m_libs
TSeqCollection * m_libs
Definition
HanConfigCompAlg.h:43
dqi::HanConfigCompAlg::m_subAlgs
TSeqCollection * m_subAlgs
Definition
HanConfigCompAlg.h:42
dqi::HanConfigCompAlg::operator=
HanConfigCompAlg & operator=(const HanConfigCompAlg &other)
Definition
HanConfigCompAlg.cxx:44
dqi::HanConfigCompAlg::~HanConfigCompAlg
virtual ~HanConfigCompAlg()
Definition
HanConfigCompAlg.cxx:67
dqi::HanConfigCompAlg::m_name
TObjString m_name
Definition
HanConfigCompAlg.h:41
dqi::HanConfigCompAlg::HanConfigCompAlg
HanConfigCompAlg()
Definition
HanConfigCompAlg.cxx:16
dqi::HanConfigCompAlg::AddAlg
virtual void AddAlg(std::string alg)
Definition
HanConfigCompAlg.cxx:90
dqi::HanConfigCompAlg::SetName
virtual void SetName(std::string name)
Definition
HanConfigCompAlg.cxx:76
dqi::HanConfigCompAlg::AddLib
virtual void AddLib(std::string lib)
Definition
HanConfigCompAlg.cxx:105
dqi
Definition
CompositeAlgorithm.h:16
dqi::newTList
TSeqCollection * newTList(const char *name, TObject *obj=0)
Definition
HanUtils.cxx:18
Generated on
for ATLAS Offline Software by
1.17.0