ATLAS Offline Software
Loading...
Searching...
No Matches
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
6#include "AGDDModel/AGDDBox.h"
8#include <iostream>
9
10
11boxHandler::boxHandler(const std::string& s,
13 : XMLHandler(s, c)
14{
15}
16
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}
std::pair< std::vector< unsigned int >, bool > res
std::vector< double > getAttributeAsVector(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
XMLHandler(const std::string &n, AGDDController &c)
std::string getAttributeAsString(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
boxHandler(const std::string &, AGDDController &c)
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t) override