ATLAS Offline Software
Control
IOVSvc
src
CBNode.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/*****************************************************************************
6
*
7
* CBNode.cxx
8
* IOVSvc
9
*
10
* Author: Charles Leggett
11
*
12
* Tree node structure for callback function trigger tree
13
*
14
*****************************************************************************/
15
16
#include "
CBNode.h
"
17
18
#include "
SGTools/DataProxy.h
"
19
20
std::atomic<unsigned int>
CBNode::s_serial
= 0;
21
22
CBNode::CBNode
(
const
std::string&
name
,
CBNode
*
parent
):
23
m_name(
name
), m_proxy(0), m_fcn(0), m_trig(false), m_flag(false) {
24
m_serial
= ++
s_serial
;
25
if
(
parent
!= 0) {
26
m_level
=
parent
->level() + 1;
27
addParent
(
parent
);
28
parent
->addChild(
this
);
29
}
else
{
30
m_level
= 0;
31
}
32
}
33
34
CBNode::CBNode
(
const
SG::DataProxy
*
proxy
,
const
std::string&
name
,
35
CBNode
*
parent
):
36
m_name(
name
), m_proxy(
proxy
), m_fcn(0), m_trig(false), m_flag(false) {
37
m_serial
= ++
s_serial
;
38
if
(
parent
!= 0) {
39
m_level
=
parent
->level() + 1;
40
addParent
(
parent
);
41
parent
->addChild(
this
);
42
}
else
{
43
m_level
= 0;
44
}
45
}
46
47
CBNode::CBNode
(
BFCN
* fcn,
const
CallBackID
& cb,
CBNode
*
parent
):
48
m_name (cb.
name
()),
49
m_proxy(0), m_fcn(fcn), m_cbid(cb), m_trig(false), m_flag(false) {
50
m_serial
= ++
s_serial
;
51
52
if
(
parent
!= 0) {
53
m_level
=
parent
->level() + 1;
54
addParent
(
parent
);
55
parent
->addChild(
this
);
56
}
else
{
57
m_level
= 0;
58
}
59
}
60
61
CBNode::~CBNode
() {
62
63
}
64
65
void
CBNode::addParent
(
CBNode
*
parent
) {
66
assert(
parent
);
67
m_parents
.insert(
parent
);
68
}
69
70
void
CBNode::addChild
(
CBNode
* child ) {
71
assert(child);
72
m_children
.insert( child );
73
}
74
75
bool
CBNode::delParent
(
CBNode
*
par
) {
76
std::set<CBNode*>::iterator
itr =
m_parents
.find(
par
);
77
if
(itr !=
m_parents
.end()) {
78
m_parents
.erase( itr );
79
return
true
;
80
}
81
return
false
;
82
}
83
84
bool
CBNode::delChild
(
CBNode
* child ) {
85
std::set<CBNode*>::iterator
itr =
m_children
.find(child);
86
if
(itr !=
m_children
.end()) {
87
m_children
.erase( itr );
88
return
true
;
89
}
90
return
false
;
91
}
92
93
void
CBNode::setProxy
(
const
SG::DataProxy
*
p
) {
94
assert(0 !=
p
);
95
m_proxy
=
p
;
96
m_name
=
p
->name();
97
}
xAOD::iterator
JetConstituentVector::iterator iterator
Definition:
JetConstituentVector.cxx:68
CBNode::CBNode
CBNode()=delete
CallBackID
Definition:
CallBackID.h:24
StateLessPT_NewConfig.proxy
proxy
Definition:
StateLessPT_NewConfig.py:392
CBNode.h
CBNode::delParent
bool delParent(CBNode *parent)
Definition:
CBNode.cxx:75
CBNode::m_serial
unsigned int m_serial
Definition:
CBNode.h:106
CBNode::m_name
std::string m_name
Definition:
CBNode.h:96
CBNode::setProxy
void setProxy(const SG::DataProxy *p)
Definition:
CBNode.cxx:93
CBNode
Definition:
CBNode.h:30
CBNode::m_proxy
const SG::DataProxy * m_proxy
Definition:
CBNode.h:99
python.utils.AtlRunQueryDQUtils.p
p
Definition:
AtlRunQueryDQUtils.py:210
CBNode::s_serial
static std::atomic< unsigned int > s_serial
Definition:
CBNode.h:107
test_pyathena.parent
parent
Definition:
test_pyathena.py:15
CBNode::BFCN
IOVSvcCallBackFcn BFCN
Definition:
CBNode.h:33
CBNode::addParent
void addParent(CBNode *parent)
Definition:
CBNode.cxx:65
CBNode::m_children
nodeSet m_children
Definition:
CBNode.h:94
CBNode::m_parents
nodeSet m_parents
Definition:
CBNode.h:93
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
createCoolChannelIdFile.par
par
Definition:
createCoolChannelIdFile.py:29
CBNode::delChild
bool delChild(CBNode *child)
Definition:
CBNode.cxx:84
CBNode::~CBNode
~CBNode()
Definition:
CBNode.cxx:61
SG::DataProxy
Definition:
DataProxy.h:45
CBNode::addChild
void addChild(CBNode *child)
Definition:
CBNode.cxx:70
DataProxy.h
CBNode::m_level
int m_level
Definition:
CBNode.h:97
Generated on Mon Dec 23 2024 21:08:10 for ATLAS Offline Software by
1.8.18