File indexing completed on 2024-04-06 12:05:33
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
0015 auto myrSolid = myRegistry_->getElement("rSolid");
0016 myrSolid->clear();
0017
0018
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
0029 clear();
0030 }