ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
DetectorDescription
AGDD
AGDDHandlers
src
pconHandler.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/pconHandler.h
"
6
#include "
AGDDControl/XercesParser.h
"
7
#include "
AGDDControl/XMLHandlerStore.h
"
8
#include "
AGDDControl/AGDDController.h
"
9
#include "
AGDDModel/AGDDPcon.h
"
10
#include "
AGDDHandlers/polyplaneHandler.h
"
11
#include <iostream>
12
13
14
using namespace
xercesc;
15
16
pconHandler::pconHandler
(
const
std::string& s,
17
AGDDController
& c)
18
:
XMLHandler
(s, c)
19
{
20
}
21
22
void
pconHandler::ElementHandle
(
AGDDController
& c,
23
xercesc::DOMNode *t)
24
{
25
bool
res
;
26
std::string name=
getAttributeAsString
(c, t,
"name"
,
res
);
27
std::string material=
getAttributeAsString
(c, t,
"material"
,
res
);
28
29
AGDDPcon
*vol=
new
AGDDPcon
(name, c.GetVolumeStore(), c.GetSectionStore());
30
vol->
SetMaterial
(material);
31
32
std::string col=
getAttributeAsString
(c, t,
"color"
,
res
);
33
if
(
res
)
34
vol->
SetColor
(col);
35
36
std::vector<double> vvv=
getAttributeAsVector
(c, t,
"profile"
,
res
);
37
if
(
res
)
38
vol->
SetProfile
(vvv[0],vvv[1]);
39
else
40
vol->
SetProfile
(0.,360.);
41
42
StopLoop
(
true
);
43
DOMNode* child;
44
45
polyplaneHandler
* pplaneHand =
dynamic_cast<
polyplaneHandler
*
>
46
(c.GetHandlerStore().GetHandler(
"polyplane"
));
47
if
(!pplaneHand) std::abort();
48
49
IAGDDParser
& parser = *c.GetParser();
50
for
(child=t->getFirstChild();child!=0;child=child->getNextSibling())
51
{
52
if
(child->getNodeType()==DOMNode::ELEMENT_NODE) {
53
parser.elementLoop(c, child);
54
Polyplane
p = pplaneHand->
CurrentPolyplane
();
55
vol->
SetPlane
(p.rin(),p.rou(),p.z());
56
}
57
}
58
59
60
}
AGDDController.h
AGDDPcon.h
res
std::pair< std::vector< unsigned int >, bool > res
Definition
JetGroupProductTest.cxx:11
XMLHandlerStore.h
XercesParser.h
AGDDController
Definition
AGDDController.h:30
AGDDPcon
Definition
AGDDPcon.h:13
AGDDPcon::SetPlane
void SetPlane(double ri, double ro, double z)
Definition
AGDDPcon.h:19
AGDDPcon::SetProfile
void SetProfile(double phi0, double dphi)
Definition
AGDDPcon.h:25
AGDDVolume::SetMaterial
void SetMaterial(const std::string &n)
Definition
AGDDVolume.h:24
AGDDVolume::SetColor
void SetColor(const std::string &c)
Definition
AGDDVolume.h:36
IAGDDParser
Definition
IAGDDParser.h:15
Polyplane
Definition
Polyplane.h:8
XMLHandler::StopLoop
void StopLoop(bool)
Definition
XMLHandler.cxx:28
XMLHandler::getAttributeAsVector
std::vector< double > getAttributeAsVector(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition
XMLHandler.cxx:100
XMLHandler::XMLHandler
XMLHandler(const std::string &n, AGDDController &c)
Definition
XMLHandler.cxx:15
XMLHandler::getAttributeAsString
std::string getAttributeAsString(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition
XMLHandler.cxx:69
pconHandler::pconHandler
pconHandler(const std::string &, AGDDController &c)
Definition
pconHandler.cxx:16
pconHandler::ElementHandle
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t) override
Definition
pconHandler.cxx:22
polyplaneHandler
Definition
polyplaneHandler.h:12
polyplaneHandler::CurrentPolyplane
const Polyplane & CurrentPolyplane()
Definition
polyplaneHandler.h:18
pconHandler.h
polyplaneHandler.h
Generated on
for ATLAS Offline Software by
1.17.0