ATLAS Offline Software
DetectorDescription
AGDD
AGDDHandlers
src
unionHandler.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
AGDDHandlers/unionHandler.h
"
6
#include "
AGDDControl/XercesParser.h
"
7
#include "
AGDDControl/AGDDController.h
"
8
#include "
AGDDModel/AGDDUnion.h
"
9
#include <iostream>
10
#include "
AGDDKernel/AGDDPositioner.h
"
11
#include "
AGDDKernel/AGDDVolumeStore.h
"
12
#include "
AGDDKernel/AGDDPositionerStore.h
"
13
14
using namespace
xercesc;
15
16
unionHandler::unionHandler
(
const
std::string&
s
,
17
AGDDController
&
c
)
18
:
XMLHandler
(
s
,
c
)
19
{
20
// std::cout<<"Creating handler for composition"<<std::endl;
21
}
22
23
void
unionHandler::ElementHandle
(
AGDDController
&
c
,
24
xercesc::DOMNode *
t
)
25
{
26
AGDDVolumeStore
& vs =
c
.GetVolumeStore();
27
AGDDSectionStore
&
ss
=
c
.GetSectionStore();
28
AGDDPositionerStore
& ps =
c
.GetPositionerStore();
29
30
bool
res
;
31
std::string
name
=
getAttributeAsString
(
c
,
t
,
"name"
,
res
);
32
33
AGDDUnion
*
u
=
new
AGDDUnion
(
name
, vs,
ss
);
34
35
StopLoop
(
true
);
36
37
DOMNode* child;
38
39
int
before=ps.
NrOfPositioners
();
40
41
IAGDDParser
&
parser
= *
c
.GetParser();
42
for
(child=
t
->getFirstChild();child!=0;child=child->getNextSibling())
43
{
44
if
(child->getNodeType()==DOMNode::ELEMENT_NODE) {
45
parser
.elementLoop(
c
, child);
46
}
47
}
48
49
int
after=ps.
NrOfPositioners
();
50
for
(
int
i
=before;
i
<after;
i
++)
51
{
52
AGDDPositioner
*posit=ps.
GetPositioner
(
i
);
53
if
(vs.
Exist
(posit->
Volume
()))
54
u
->AddDaughter(posit);
55
}
56
57
std::string
col
=
getAttributeAsString
(
c
,
t
,
"color"
,
res
);
58
if
(
res
)
59
u
->SetColor(
col
);
60
}
AGDDController.h
python.CaloScaleNoiseConfig.parser
parser
Definition:
CaloScaleNoiseConfig.py:75
AGDDPositioner.h
python.SystemOfUnits.s
int s
Definition:
SystemOfUnits.py:131
AGDDUnion.h
PowhegControl_ttHplus_NLO.ss
ss
Definition:
PowhegControl_ttHplus_NLO.py:83
XercesParser.h
AGDDVolumeStore
Definition:
AGDDVolumeStore.h:15
AGDDVolumeStore.h
IAGDDParser
Definition:
IAGDDParser.h:15
read_hist_ntuple.t
t
Definition:
read_hist_ntuple.py:5
Trk::u
@ u
Enums for curvilinear frames.
Definition:
ParamDefs.h:77
AGDDPositioner
Definition:
AGDDPositioner.h:18
AGDDController
Definition:
AGDDController.h:30
unionHandler.h
AGDDSectionStore
Definition:
AGDDSectionStore.h:15
lumiFormat.i
int i
Definition:
lumiFormat.py:85
res
std::pair< std::vector< unsigned int >, bool > res
Definition:
JetGroupProductTest.cxx:14
AGDDUnion
Definition:
AGDDUnion.h:13
AGDDVolumeStore::Exist
bool Exist(std::string)
Definition:
AGDDVolumeStore.cxx:20
XMLHandler::getAttributeAsString
std::string getAttributeAsString(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition:
XMLHandler.cxx:69
unionHandler::unionHandler
unionHandler(const std::string &, AGDDController &c)
Definition:
unionHandler.cxx:16
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:221
AGDDPositionerStore
Definition:
AGDDPositionerStore.h:14
XMLHandler
Definition:
XMLHandler.h:15
query_example.col
col
Definition:
query_example.py:7
AGDDPositionerStore::GetPositioner
AGDDPositioner * GetPositioner(unsigned int i)
Definition:
AGDDPositionerStore.cxx:18
AGDDPositioner::Volume
const std::string & Volume()
Definition:
AGDDPositioner.cxx:21
AGDDPositionerStore::NrOfPositioners
int NrOfPositioners()
Definition:
AGDDPositionerStore.h:19
unionHandler::ElementHandle
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t) override
Definition:
unionHandler.cxx:23
AGDDPositionerStore.h
python.compressB64.c
def c
Definition:
compressB64.py:93
XMLHandler::StopLoop
void StopLoop(bool)
Definition:
XMLHandler.cxx:28
Generated on Thu Nov 7 2024 21:31:16 for ATLAS Offline Software by
1.8.18