1 #include "gearxml/SimpleMaterialXML.h"
3 #include "gear/GearMgr.h"
4 #include "gearimpl/SimpleMaterialImpl.h"
6 #include "gearxml/tinyxml.h"
7 #include "gearxml/XMLHandler.h"
41 std::stringstream ss ;
50 ss <<
getXMLAttribute( xmlElement ,
"density" ) ; ss >> dummy ; ss.clear() ;
53 ss <<
getXMLAttribute( xmlElement ,
"radLength" ) ; ss >> dummy ; ss.clear() ;
56 ss <<
getXMLAttribute( xmlElement ,
"intLength" ) ; ss >> dummy ; ss.clear() ;
virtual double getA() const =0
The mass number of the (averaged) material.
Abstract interface for a simple material description tjhat hold s the following properties: A...
virtual double getIntLength() const =0
Interaction length of material in mm.
virtual double getRadLength() const =0
Radiation length of material in mm.
virtual void registerSimpleMaterial(const SimpleMaterial *material)=0
Register the SimpleMaterial with SimpleMaterial::getName() - throws Exception if a material of the gi...
virtual const std::string & getName() const =0
The material name.
std::string getXMLAttribute(const TiXmlNode *node, const std::string &name)
Helper method used for parsing XML.
The element is a container class.
virtual SimpleMaterial * fromXML(const TiXmlElement *xmlElement, GearMgr *gearMgr=0) const
Creates a SimpleMaterial from the XML element (node)
virtual double getZ() const =0
The atomic number of the (averaged) material.
void SetDoubleAttribute(const char *name, double value)
Sets an attribute of name to a given value.
virtual TiXmlElement toXML(const SimpleMaterial &material) const
Creates an XML node for the given material.
Abstract interface for a manager class that returns the Gear classes for the relevant subdetectors...
void SetAttribute(const char *name, const char *value)
Sets an attribute of name to a given value.
virtual double getDensity() const =0
Density in kg/m^3.
Implementation of gear::SimpleMaterial.