ATLAS Offline Software
Loading...
Searching...
No Matches
elementHandler.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
9#include <iostream>
10
11
12elementHandler::elementHandler(const std::string& s,
14 : XMLHandler(s, c)
15{
16}
17
19 xercesc::DOMNode *t)
20{
21 std::string name=getAttributeAsString(c, t, "name");
22 std::string symbol=getAttributeAsString(c, t, "symbol");
23 double ca=getAttributeAsInt(c, t, "aweight");
24 int cz=getAttributeAsInt(c, t, "z");
25 double density=getAttributeAsDouble(c, t, "density");
26 AGDDElement *el=new AGDDElement(c.GetMaterialStore(),name,symbol,cz,ca);
27 new AGDDMaterial(c.GetMaterialStore(),name,el,density);
28}
int getAttributeAsInt(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
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
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t) override
elementHandler(const std::string &, AGDDController &c)