56 const xercesc::DOMNamedNodeMap*
const attributes = element->getAttributes();
57 XMLSize_t attributeCount = attributes->getLength();
59 for (XMLSize_t attribute_index=0;
60 attribute_index<attributeCount; attribute_index++)
62 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
64 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
67 const xercesc::DOMAttr*
const attribute
68 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
71 G4Exception(
"G4GDMLReadParamvol::Box_dimensionsRead()",
78 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
95 const xercesc::DOMNamedNodeMap*
const attributes = element->getAttributes();
96 XMLSize_t attributeCount = attributes->getLength();
98 for (XMLSize_t attribute_index=0;
99 attribute_index<attributeCount; attribute_index++)
101 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
103 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
106 const xercesc::DOMAttr*
const attribute
107 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
110 G4Exception(
"G4GDMLReadParamvol::Trd_dimensionsRead()",
117 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
139 const xercesc::DOMNamedNodeMap*
const attributes = element->getAttributes();
140 XMLSize_t attributeCount = attributes->getLength();
142 for (XMLSize_t attribute_index=0;
143 attribute_index<attributeCount; attribute_index++)
145 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
147 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
150 const xercesc::DOMAttr*
const attribute
151 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
154 G4Exception(
"G4GDMLReadParamvol::Trap_dimensionsRead()",
161 if (attName==
"lunit")
163 if (attName==
"aunit")
167 if (attName==
"theta")
177 if (attName==
"alpha1")
185 if (attName==
"alpha2")
209 const xercesc::DOMNamedNodeMap*
const attributes = element->getAttributes();
210 XMLSize_t attributeCount = attributes->getLength();
212 for (XMLSize_t attribute_index=0;
213 attribute_index<attributeCount; attribute_index++)
215 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
217 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
220 const xercesc::DOMAttr*
const attribute
221 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
224 G4Exception(
"G4GDMLReadParamvol::Tube_dimensionsRead()",
231 if (attName==
"lunit")
233 if (attName==
"aunit")
241 if (attName==
"StartPhi")
243 if (attName==
"DeltaPhi")
261 const xercesc::DOMNamedNodeMap*
const attributes = element->getAttributes();
262 XMLSize_t attributeCount = attributes->getLength();
264 for (XMLSize_t attribute_index=0;
265 attribute_index<attributeCount; attribute_index++)
267 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
269 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
272 const xercesc::DOMAttr*
const attribute
273 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
276 G4Exception(
"G4GDMLReadParamvol::Cone_dimensionsRead()",
283 if (attName==
"lunit")
285 if (attName==
"aunit")
287 if (attName==
"rmin1")
289 if (attName==
"rmax1")
291 if (attName==
"rmin2")
293 if (attName==
"rmax2")
297 if (attName==
"startphi")
299 if (attName==
"deltaphi")
319 const xercesc::DOMNamedNodeMap*
const attributes = element->getAttributes();
320 XMLSize_t attributeCount = attributes->getLength();
322 for (XMLSize_t attribute_index=0;
323 attribute_index<attributeCount; attribute_index++)
325 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
327 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
330 const xercesc::DOMAttr*
const attribute
331 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
334 G4Exception(
"G4GDMLReadParamvol::Sphere_dimensionsRead()",
341 if (attName==
"lunit")
343 if (attName==
"aunit")
349 if (attName==
"startphi")
351 if (attName==
"deltaphi")
353 if (attName==
"starttheta")
355 if (attName==
"deltatheta")
373 const xercesc::DOMNamedNodeMap*
const attributes = element->getAttributes();
374 XMLSize_t attributeCount = attributes->getLength();
376 for (XMLSize_t attribute_index=0;
377 attribute_index<attributeCount; attribute_index++)
379 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
381 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
384 const xercesc::DOMAttr*
const attribute
385 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
388 G4Exception(
"G4GDMLReadParamvol::Orb_dimensionsRead()",
395 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
409 const xercesc::DOMNamedNodeMap*
const attributes = element->getAttributes();
410 XMLSize_t attributeCount = attributes->getLength();
412 for (XMLSize_t attribute_index=0;
413 attribute_index<attributeCount; attribute_index++)
415 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
417 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
420 const xercesc::DOMAttr*
const attribute
421 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
424 G4Exception(
"G4GDMLReadParamvol::Torus_dimensionsRead()",
431 if (attName==
"lunit")
433 if (attName==
"aunit")
441 if (attName==
"startphi")
443 if (attName==
"deltaphi")
461 const xercesc::DOMNamedNodeMap*
const attributes = element->getAttributes();
462 XMLSize_t attributeCount = attributes->getLength();
464 for (XMLSize_t attribute_index=0;
465 attribute_index<attributeCount; attribute_index++)
467 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
469 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
472 const xercesc::DOMAttr*
const attribute
473 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
476 G4Exception(
"G4GDMLReadParamvol::Para_dimensionsRead()",
483 if (attName==
"lunit")
485 if (attName==
"aunit")
493 if (attName==
"alpha")
495 if (attName==
"theta")
516 const xercesc::DOMNamedNodeMap*
const attributes = element->getAttributes();
517 XMLSize_t attributeCount = attributes->getLength();
519 for (XMLSize_t attribute_index=0;
520 attribute_index<attributeCount; attribute_index++)
522 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
524 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
527 const xercesc::DOMAttr*
const attribute
528 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
531 G4Exception(
"G4GDMLReadParamvol::Hype_dimensionsRead()",
538 if (attName==
"lunit")
540 if (attName==
"aunit")
548 if (attName==
"outst")
569 for (xercesc::DOMNode* iter = element->getFirstChild();
570 iter != 0; iter = iter->getNextSibling())
572 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
574 const xercesc::DOMElement*
const child
575 =
dynamic_cast<xercesc::DOMElement*
>(iter);
578 G4Exception(
"G4GDMLReadParamvol::ParametersRead()",
585 if (
tag==
"positionref")
587 if (
tag==
"rotationref")
601 G4String error_msg =
"Unknown tag in parameters: " +
tag;
602 G4Exception(
"G4GDMLReadParamvol::ParametersRead()",
"ReadError",
621 for (xercesc::DOMNode* iter = element->getFirstChild();
622 iter != 0; iter = iter->getNextSibling())
624 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
626 const xercesc::DOMElement*
const child
627 =
dynamic_cast<xercesc::DOMElement*
>(iter);
630 G4Exception(
"G4GDMLReadParamvol::ParameterisedRead()",
636 if (
tag==
"parameters")
638 const xercesc::DOMNamedNodeMap*
const attributes
639 = element->getAttributes();
640 XMLSize_t attributeCount = attributes->getLength();
641 for (XMLSize_t attribute_index=0;
642 attribute_index<attributeCount; attribute_index++)
644 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
646 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
649 const xercesc::DOMAttr*
const attribute
650 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
653 G4Exception(
"G4GDMLReadParamvol::ParameterisedRead()",
674 for (xercesc::DOMNode* iter = element->getFirstChild();
675 iter != 0; iter = iter->getNextSibling())
677 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
679 const xercesc::DOMElement*
const child
680 =
dynamic_cast<xercesc::DOMElement*
>(iter);
683 G4Exception(
"G4GDMLReadParamvol::Paramvol_contentRead()",
"InvalidRead",
700 for (xercesc::DOMNode* iter = element->getFirstChild();
701 iter != 0; iter = iter->getNextSibling())
703 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
705 const xercesc::DOMElement*
const child
706 =
dynamic_cast<xercesc::DOMElement*
>(iter);
709 G4Exception(
"G4GDMLReadParamvol::ParamvolRead()",
"InvalidRead",
715 if (
tag==
"volumeref") { volumeref =
RefRead(child); }
727 "No parameters are defined in parameterised volume!");
CLHEP::HepRotation G4RotationMatrix
HepRotation & rotateX(double delta)
HepRotation & rotateZ(double delta)
HepRotation & rotateY(double delta)
G4double Evaluate(const G4String &)
void AddParameter(const PARAMETER &)
void VectorRead(const xercesc::DOMElement *const, G4ThreeVector &)
G4ThreeVector GetPosition(const G4String &)
G4String RefRead(const xercesc::DOMElement *const)
G4ThreeVector GetRotation(const G4String &)
virtual void ParamvolRead(const xercesc::DOMElement *const, G4LogicalVolume *)
virtual ~G4GDMLReadParamvol()
void ParametersRead(const xercesc::DOMElement *const)
void Cone_dimensionsRead(const xercesc::DOMElement *const, G4GDMLParameterisation::PARAMETER &)
void Box_dimensionsRead(const xercesc::DOMElement *const, G4GDMLParameterisation::PARAMETER &)
void Para_dimensionsRead(const xercesc::DOMElement *const, G4GDMLParameterisation::PARAMETER &)
void Torus_dimensionsRead(const xercesc::DOMElement *const, G4GDMLParameterisation::PARAMETER &)
G4GDMLParameterisation * parameterisation
void Sphere_dimensionsRead(const xercesc::DOMElement *const, G4GDMLParameterisation::PARAMETER &)
void Hype_dimensionsRead(const xercesc::DOMElement *const, G4GDMLParameterisation::PARAMETER &)
void ParameterisedRead(const xercesc::DOMElement *const)
void Trap_dimensionsRead(const xercesc::DOMElement *const, G4GDMLParameterisation::PARAMETER &)
void Orb_dimensionsRead(const xercesc::DOMElement *const, G4GDMLParameterisation::PARAMETER &)
void Trd_dimensionsRead(const xercesc::DOMElement *const, G4GDMLParameterisation::PARAMETER &)
virtual void Paramvol_contentRead(const xercesc::DOMElement *const)
void Tube_dimensionsRead(const xercesc::DOMElement *const, G4GDMLParameterisation::PARAMETER &)
virtual void Paramvol_contentRead(const xercesc::DOMElement *const)=0
G4String GenerateName(const G4String &name, G4bool strip=false)
virtual G4LogicalVolume * GetVolume(const G4String &) const =0
void LoopRead(const xercesc::DOMElement *const, void(G4GDMLRead::*)(const xercesc::DOMElement *const))
G4String Transcode(const XMLCh *const)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)