ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
DetectorDescription
AGDD
AGDDHandlers
src
tubsHandler.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/tubsHandler.h
"
6
#include "
AGDDControl/AGDDController.h
"
7
#include "
AGDDModel/AGDDTubs.h
"
8
#include <iostream>
9
10
11
12
tubsHandler::tubsHandler
(
const
std::string& s,
13
AGDDController
& c)
14
:
XMLHandler
(s, c)
15
{
16
// std::cout<<"Creating handler for tubs"<<std::endl;
17
}
18
19
void
tubsHandler::ElementHandle
(
AGDDController
& c,
20
xercesc::DOMNode *t)
21
{
22
bool
res
;
23
std::string name=
getAttributeAsString
(c, t,
"name"
,
res
);
24
std::string material=
getAttributeAsString
(c, t,
"material"
,
res
);
25
std::vector<double> vvv=
getAttributeAsVector
(c, t,
"Rio_Z"
,
res
);
26
AGDDTubs
*v=
new
AGDDTubs
(name, c.GetVolumeStore(), c.GetSectionStore());
27
v->SetMaterial(material);
28
v->SetRio_Z(vvv);
29
30
vvv=
getAttributeAsVector
(c, t,
"profile"
,
res
);
31
if
(
res
)
32
v->SetProfile(vvv[0],vvv[1]);
33
else
34
v->SetProfile(0.,360.);
35
36
std::string col=
getAttributeAsString
(c, t,
"color"
,
res
);
37
38
if
(
res
)
39
v->SetColor(col);
40
}
AGDDController.h
AGDDTubs.h
res
std::pair< std::vector< unsigned int >, bool > res
Definition
JetGroupProductTest.cxx:11
AGDDController
Definition
AGDDController.h:30
AGDDTubs
Definition
AGDDTubs.h:13
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
tubsHandler::tubsHandler
tubsHandler(const std::string &, AGDDController &c)
Definition
tubsHandler.cxx:12
tubsHandler::ElementHandle
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t) override
Definition
tubsHandler.cxx:19
tubsHandler.h
Generated on
for ATLAS Offline Software by
1.17.0