ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
DetectorDescription
AGDD
AGDDHandlers
src
BoltHandler.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/BoltHandler.h
"
6
#include "
AGDDModel/AGDDBolt.h
"
7
#include "
AGDDControl/AGDDController.h
"
8
#include <iostream>
9
10
BoltHandler::BoltHandler
(
const
std::string& s,
11
AGDDController
& c)
12
:
XMLHandler
(s, c)
13
{
14
}
15
16
void
BoltHandler::ElementHandle
(
AGDDController
& c,
17
xercesc::DOMNode *t)
18
{
19
bool
res
;
20
std::string name=
getAttributeAsString
(c, t,
"name"
,
res
);
21
std::string material=
getAttributeAsString
(c, t,
"material"
,
res
);
22
double
l=
getAttributeAsDouble
(c, t,
"length"
,
res
);
23
double
d=
getAttributeAsDouble
(c, t,
"diameter"
,
res
);
24
double
hd=
getAttributeAsDouble
(c, t,
"head_diameter"
,
res
);
25
double
hl=
getAttributeAsDouble
(c, t,
"head_length"
,
res
);
26
27
AGDDBolt
*b=
new
AGDDBolt
(name, c.GetVolumeStore(), c.GetSectionStore());
28
b->SetMaterial(material);
29
b->SetLength(l);
30
b->SetHeadLength(hl);
31
b->SetDiameter(d);
32
b->SetHeadDiameter(hd);
33
34
std::string col=
getAttributeAsString
(c, t,
"color"
,
res
);
35
if
(
res
)
36
b->SetColor(col);
37
}
AGDDBolt.h
AGDDController.h
BoltHandler.h
res
std::pair< std::vector< unsigned int >, bool > res
Definition
JetGroupProductTest.cxx:11
AGDDBolt
Definition
AGDDBolt.h:13
AGDDController
Definition
AGDDController.h:30
BoltHandler::BoltHandler
BoltHandler(const std::string &, AGDDController &c)
Definition
BoltHandler.cxx:10
BoltHandler::ElementHandle
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t) override
Definition
BoltHandler.cxx:16
XMLHandler::getAttributeAsDouble
double getAttributeAsDouble(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition
XMLHandler.cxx:78
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
Generated on
for ATLAS Offline Software by
1.17.0