37 DCOUT_V(
'P',
"DDLPosPart::preProcessElement started");
43 DCOUT_V(
'P',
"DDLPosPart::preProcessElement completed");
52 DCOUT_V(
'P',
"DDLPosPart::processElement started");
76 if (myrRotation->
size() > 0){
79 else if (myDDLRotation->
size() > 0) {
86 else if (myDDLRefl->
size() > 0) {
92 else if (myrRefl->
size() > 0) {
96 DCOUT_V(
'P',
"DDLPosPart::processElement: Final Rotation info: " << rotn);
100 double x = 0.0,
y = 0.0,
z = 0.0;
101 if (myTranslation->
size() > 0)
104 x = ev.
eval(nmspace, atts.find(
"x")->second);
105 y = ev.
eval(nmspace, atts.find(
"y")->second);
106 z = ev.
eval(nmspace, atts.find(
"z")->second);
109 DCOUT_V(
'P',
"DDLPosPart::processElement: Final Translation info x=" << x <<
" y=" <<
y <<
" z=" <<
z);
113 if ( rotn.
name() !=
"" && rotn.
ns() !=
"" ) {
115 myDDRotation = &
temp;
119 myDDRotation = &
temp;
121 if ( !myDDRotation->
isValid() ) {
124 myDDRotation = &
temp;
131 DCOUT_V(
'P',
"about to make a PosPart ...");
132 DCOUT_V(
'p',
" myDDRotation : " << *myDDRotation);
133 DCOUT_V(
'p',
" myDDTranslation : " << myDDTranslation);
139 if (atts.find(
"copyNumber") != atts.end())
140 copyno = atts.find(
"copyNumber")->second;
151 myTranslation->
clear();
152 myDDLRotation->
clear();
153 myrRotation->
clear();
160 DCOUT_V(
'P',
"DDLPosPart::processElement completed");
DDLElementRegistry * myRegistry_
~DDLPosPart(void)
Destructor.
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
void position(const DDLogicalPart &self, const DDLogicalPart &parent, std::string copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=NULL)
const std::string & ns() const
Returns the namespace.
DDName is used to identify DDD entities uniquely.
type of data representation of DDCompactView
std::map< std::string, std::string > DDXMLAttribute
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
DDXMLElement * getElement(const std::string &name)
THE most important part. Getting the pointer to a given element type.
bool isValid() const
true, if the wrapped pointer is valid
ClhepEvaluator & evaluator()
virtual size_t size(void) const
Number of elements accumulated.
DDLPosPart(DDLElementRegistry *myreg)
Constructor.
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
void preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Called by loadAttributes AFTER attributes are loaded.
#define DCOUT_V(M_v_Y, M_v_S)
This is a base class for processing XML elements in the DDD.
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.
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Processing the element.
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
virtual const DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)
const std::string & name() const
Returns the name.