60 DDName rotn(( myrRotation->size() > 0) ? myrRotation->getDDName( nmspace ) :
61 (( myDDLRotation->size() > 0) ? myDDLRotation->getDDName( nmspace ) :
62 (( myDDLRefl->size() > 0) ? myDDLRefl->getDDName(nmspace) :
63 (( myrRefl->size() > 0 ) ? myrRefl->getDDName(nmspace) :
DDName(
"")))));
67 double x = 0.0,
y = 0.0,
z = 0.0;
68 if (myTranslation->size() > 0)
71 x = ev.
eval(nmspace, atts.find(
"x")->second);
72 y = ev.
eval(nmspace, atts.find(
"y")->second);
73 z = ev.
eval(nmspace, atts.find(
"z")->second);
76 std::unique_ptr<DDRotation> myDDRotation;
78 if ( !rotn.
name().empty() && !rotn.
ns().empty() ) {
79 myDDRotation = std::make_unique<DDRotation>(rotn);
84 if ( !myDDRotation->isValid() ) {
94 if (atts.find(
"copyNumber") != atts.end())
95 copyno = atts.find(
"copyNumber")->second;
106 myTranslation->clear();
107 myDDLRotation->clear();
108 myrRotation->clear();
void preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Called by loadAttributes AFTER attributes are loaded.
DDLElementRegistry * myRegistry_
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
const std::string & ns() const
Returns the namespace.
DDName is used to identify DDD entities uniquely.
Compact representation of the geometrical detector hierarchy.
std::map< std::string, std::string > DDXMLAttribute
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
ClhepEvaluator & evaluator()
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
DDLPosPart(DDLElementRegistry *myreg)
std::shared_ptr< DDXMLElement > getElement(const std::string &name)
THE most important part. Getting the pointer to a given element type.
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
This is a base class for processing XML elements in the DDD.
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
double eval(const std::string &ns, const std::string &expr)
The main class for processing parsed elements.
virtual void clear(void)
clear this element's contents.
const std::string & name() const
Returns the name.