ATLAS Offline Software
Loading...
Searching...
No Matches
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
8#include <iostream>
9
10BoltHandler::BoltHandler(const std::string& s,
12 : XMLHandler(s, c)
13{
14}
15
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}
std::pair< std::vector< unsigned int >, bool > res
BoltHandler(const std::string &, AGDDController &c)
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t) override
double getAttributeAsDouble(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