ATLAS Offline Software
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 
12 elementHandler::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 }
AGDDController.h
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
elementHandler::elementHandler
elementHandler(const std::string &, AGDDController &c)
Definition: elementHandler.cxx:12
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
XMLHandler::getAttributeAsDouble
double getAttributeAsDouble(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition: XMLHandler.cxx:78
AGDDController
Definition: AGDDController.h:30
WriteCaloSwCorrections.ca
ca
Definition: WriteCaloSwCorrections.py:28
AGDDMaterial
Definition: AGDDMaterial.h:15
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
elementHandler::ElementHandle
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t) override
Definition: elementHandler.cxx:18
XMLHandler::getAttributeAsString
std::string getAttributeAsString(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition: XMLHandler.cxx:69
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AGDDMaterial.h
XMLHandler
Definition: XMLHandler.h:15
AGDDElement.h
AGDDElement
Definition: AGDDElement.h:11
XMLHandler::getAttributeAsInt
int getAttributeAsInt(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition: XMLHandler.cxx:89
elementHandler.h
python.compressB64.c
def c
Definition: compressB64.py:93