1 #include "gearxml/FixedPadAngleDiskLayoutXML.h"
3 #include "gearxml/XMLHandler.h"
6 #include "gearxml/tinyxml.h"
7 #include "gearimpl/FixedPadAngleDiskLayout.h"
8 #include "gear/GearMgr.h"
23 if (fixedPadLayout==NULL) {
25 throw ParseException(
"FixedPadAngleDiskLayoutXML::toXML wrong type !");
31 padRowLayout2DXML.
SetAttribute(
"type",
"FixedPadAngleDiskLayout");
45 return padRowLayout2DXML ;
57 int nPadsInRow = atoi(
getXMLAttribute( layout ,
"nPadsInRow" ) .c_str() ) ;
virtual TiXmlElement toXML(const PadRowLayout2D *layout) const
Creates an XML node for the given PadRowLayout2D.
Abstract description of a planar subdetector with pads (cells) that are positioned in rows (circular ...
Implementation of PadRowLayout2D for a disk with fixed angled keystone pads.
virtual const std::vector< double > & getPlaneExtent() const
Extent of the sensitive plane [rmin,rmax,phimin,phimax].
ParseException used for parse errors, e.g.
std::string getXMLAttribute(const TiXmlNode *node, const std::string &name)
Helper method used for parsing XML.
virtual PadRowLayout2D * fromXML(const TiXmlElement *xmlElement) const
Creates the appropriate PadRowLayout2D subclass from the given XML element (node) ...
The element is a container class.
void SetDoubleAttribute(const char *name, double value)
Sets an attribute of name to a given value.
void SetAttribute(const char *name, const char *value)
Sets an attribute of name to a given value.
virtual int getNRows() const
The number of rows.
virtual int getNPadsInRow() const
Get the (fixed) number of pads per row.