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