42 DCOUT_V(
'P',
"DDLPolyGenerator::processElement started");
51 std::vector<double>
z,
r;
52 for (
size_t i = 0;
i < myRZPoints->
size(); ++
i)
55 z.push_back(ev.
eval(nmspace, atts.find(
"z")->second));
56 r.push_back(ev.
eval(nmspace, atts.find(
"r")->second));
66 std::vector<double> rMax;
68 for (
size_t i = 0;
i < myZSection->
size(); ++
i)
71 z.push_back(ev.
eval(nmspace, atts.find(
"z")->second));
72 r.push_back(ev.
eval(nmspace, atts.find(
"rMin")->second));
73 rMax.push_back(ev.
eval(nmspace, atts.find(
"rMax")->second));
76 if (name ==
"Polycone")
80 , ev.
eval(nmspace, atts.find(
"startPhi")->second)
81 , ev.
eval(nmspace, atts.find(
"deltaPhi")->second)
86 else if (name ==
"Polyhedra")
90 ,
int (ev.
eval(nmspace, atts.find(
"numSide")->second))
91 , ev.
eval(nmspace, atts.find(
"startPhi")->second)
92 , ev.
eval(nmspace, atts.find(
"deltaPhi")->second)
99 else if (name ==
"Polycone")
104 , ev.
eval(nmspace, atts.find(
"startPhi")->second)
105 , ev.
eval(nmspace, atts.find(
"deltaPhi")->second)
109 else if (name ==
"Polyhedra")
114 ,
int (ev.
eval(nmspace, atts.find(
"numSide")->second))
115 , ev.
eval(nmspace, atts.find(
"startPhi")->second)
116 , ev.
eval(nmspace, atts.find(
"deltaPhi")->second)
122 std::string msg =
"\nDDLPolyGenerator::processElement was called with incorrect name of solid: " +
name;
132 DCOUT_V(
'P',
"DDLPolyGenerator::processElement completed");
DDLElementRegistry * myRegistry_
DDLPolyGenerator(DDLElementRegistry *myreg)
Constructor.
static DDSolid polycone(const DDName &name, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polycone (refere to Geant3 or Geant4 documentation)
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Processing the element.
void throwError(const std::string &keyMessage) const
format std::string for throw an error.
type of data representation of DDCompactView
std::map< std::string, std::string > DDXMLAttribute
A DDSolid represents the shape of a part.
~DDLPolyGenerator(void)
Destructor.
DDXMLElement * getElement(const std::string &name)
THE most important part. Getting the pointer to a given element type.
static value_type & instance()
virtual size_t size(void) const
Number of elements accumulated.
Interface of an Expression Evaluator.
#define DCOUT_V(M_v_Y, M_v_S)
DDLSolid processes Box elements.
virtual double eval(const std::string &ns, const std::string &expr)=0
evaluate an expression expr inside the local namespace
This is a base class for processing XML elements in the DDD.
The main class for processing parsed elements.
virtual void clear(void)
clear this element's contents.
void preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Called by loadAttributes AFTER attributes are loaded.
virtual const DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)
void setReference(const std::string &nmspace, DDCompactView &cpv)
static DDSolid polyhedra(const DDName &name, int sides, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polyhedra (refere to Geant3 or Geant4 documentation)