1 #include "gearxml/FixedPadSizeDiskLayoutXML.h"
3 #include "gearxml/XMLHandler.h"
6 #include "gearxml/tinyxml.h"
7 #include "gearimpl/FixedPadSizeDiskLayout.h"
8 #include "gear/GearMgr.h"
25 if (fixedPadLayout==NULL) {
27 throw ParseException(
"FixedPadSizeDiskLayoutXML::toXML wrong type !");
33 padRowLayout2DXML.
SetAttribute(
"type",
"FixedPadSizeDiskLayout");
49 return padRowLayout2DXML ;
58 double padHeight = atof(
getXMLAttribute( layout ,
"padHeight" ) .c_str() ) ;
59 double padWidth = atof(
getXMLAttribute( layout ,
"padWidth" ) .c_str() ) ;
63 double phiMax = 2*M_PI;
virtual int getNRows() const
The number of rows.
Abstract description of a planar subdetector with pads (cells) that are positioned in rows (circular ...
Implementation of PadRowLayout2D for a disk with fixed sized keystone pads.
virtual double getPadGap() const
The gap width in mm that was given in the C'tor.
virtual PadRowLayout2D * fromXML(const TiXmlElement *xmlElement) const
Creates the appropriate PadRowLayout2D subclass from the given XML element (node) ...
ParseException used for parse errors, e.g.
std::string getXMLAttribute(const TiXmlNode *node, const std::string &name)
Helper method used for parsing XML.
The element is a container class.
virtual double getFixedPadWidth() const
The fixed width of the pads in mm.
virtual double getPadHeight(int) const
The height of the pad in mm.
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 const std::vector< double > & getPlaneExtent() const
Extent of the sensitive plane - [xmin,xmax,ymin,ymax] CARTESIAN or [rmin,rmax,phimin,phimax] POLAR.
virtual TiXmlElement toXML(const PadRowLayout2D *layout) const
Creates an XML node for the given PadRowLayout2D.