Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:55:08

0001 #include "DetectorDescription/Parser/src/DDLSolid.h"
0002 #include "DetectorDescription/Parser/interface/DDLElementRegistry.h"
0003 #include "DetectorDescription/Parser/src/DDXMLElement.h"
0004 
0005 #include <map>
0006 #include <utility>
0007 #include <vector>
0008 
0009 class DDCompactView;
0010 
0011 DDLSolid::DDLSolid(DDLElementRegistry* myreg) : DDXMLElement(myreg) {}
0012 
0013 void DDLSolid::setReference(const std::string& nmspace, DDCompactView& cpv) {
0014   // in case it was a BooleanSolid or a ReflectionSolid, clear rSolid.
0015   auto myrSolid = myRegistry_->getElement("rSolid");
0016   myrSolid->clear();
0017 
0018   // Make sure Solid elements are in LogicalPart elements.
0019   if (parent() == "LogicalPart") {
0020     auto refsol = myRegistry_->getElement("rSolid");
0021     std::vector<std::string> names;
0022     std::vector<std::string> values;
0023     names.emplace_back("name");
0024     values.emplace_back(getAttributeSet().find("name")->second);
0025     refsol->loadAttributes("rSolid", names, values, nmspace, cpv);
0026   }
0027 
0028   // clear THIS solid's values.
0029   clear();
0030 }