CMS 3D CMS Logo

DDLRotationSequence.cc
Go to the documentation of this file.
8 
9 #include <cstddef>
10 #include <map>
11 #include <utility>
12 
13 class DDCompactView;
14 
16 
18  myRegistry_->getElement("RotationByAxis")->clear();
19 }
20 
25  std::shared_ptr<DDLRotationByAxis> myRotations =
26  std::static_pointer_cast<DDLRotationByAxis>(myRegistry_->getElement("RotationByAxis"));
27  DDXMLAttribute atts;
28 
30  for (size_t i = 0; i < myRotations->size(); ++i) {
31  atts = myRotations->getAttributeSet(i);
32  R = myRotations->processOne(R, atts.find("axis")->second, atts.find("angle")->second);
33  }
34 
35  DDRotation rot = DDrot(getDDName(nmspace), std::make_unique<DDRotationMatrix>(R));
36 
37  myRotations->clear();
38  clear();
39 }
DDXMLElement::clear
virtual void clear(void)
clear this element's contents.
Definition: DDXMLElement.cc:40
mps_fire.i
i
Definition: mps_fire.py:428
DDTransform.h
MessageLogger.h
DDrot
DDRotation DDrot(const DDName &name, std::unique_ptr< DDRotationMatrix > rot)
Definition of a uniquely identifiable rotation matrix named by DDName name.
Definition: DDRotation.cc:67
DDLElementRegistry
The main class for processing parsed elements.
Definition: DDLElementRegistry.h:23
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
DDLRotationByAxis
DDLRotationByAxis handles RotationByAxis elements.
Definition: DDLRotationByAxis.h:25
DDXMLAttribute
std::map< std::string, std::string > DDXMLAttribute
Definition: DDXMLElement.h:45
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DDLRotationSequence.h
DDLRotationSequence::DDLRotationSequence
DDLRotationSequence(DDLElementRegistry *myreg)
Definition: DDLRotationSequence.cc:15
DDLElementRegistry.h
DDXMLElement::getDDName
const virtual DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)
Definition: DDXMLElement.cc:56
DDLElementRegistry::getElement
std::shared_ptr< DDXMLElement > getElement(const std::string &name)
THE most important part. Getting the pointer to a given element type.
Definition: DDLElementRegistry.cc:42
DDRotationMatrix
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
Definition: DDRotationMatrix.h:8
DDLRotationSequence::preProcessElement
void preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Called by loadAttributes AFTER attributes are loaded.
Definition: DDLRotationSequence.cc:17
DDRotationMatrix.h
DDXMLElement.h
DDLRotationSequence::processElement
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
Definition: DDLRotationSequence.cc:21
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
DDRotation
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
DDXMLElement::myRegistry_
DDLElementRegistry * myRegistry_
Definition: DDXMLElement.h:173
DDLRotationByAxis.h
dttmaxenums::R
Definition: DTTMax.h:29