00001 /*************************************************************************** 00002 DDLSolid.cc - description 00003 ------------------- 00004 begin : Wed Oct 3 2002 00005 email : case@ucdhep.ucdavis.edu 00006 ***************************************************************************/ 00007 00008 /*************************************************************************** 00009 * * 00010 * DDDParser sub-component of DDD * 00011 * * 00012 ***************************************************************************/ 00013 00014 #include "DetectorDescription/Parser/src/DDLSolid.h" 00015 00016 #include "DetectorDescription/Base/interface/DDdebug.h" 00017 00018 DDLSolid::DDLSolid( DDLElementRegistry* myreg ) 00019 : DDXMLElement( myreg ) 00020 {} 00021 00022 DDLSolid::~DDLSolid( void ) 00023 {} 00024 00025 void 00026 DDLSolid::setReference( const std::string& nmspace, DDCompactView& cpv ) 00027 { 00028 // in case it was a BooleanSolid or a ReflectionSolid, clear rSolid. 00029 DDXMLElement* myrSolid = myRegistry_->getElement("rSolid"); 00030 myrSolid->clear(); 00031 00032 // Make sure Solid elements are in LogicalPart elements. 00033 if (parent() == "LogicalPart") 00034 { 00035 DDXMLElement* refsol = myRegistry_->getElement("rSolid"); 00036 std::vector<std::string> names; 00037 std::vector<std::string> values; 00038 names.push_back("name"); 00039 values.push_back(getAttributeSet().find("name")->second); 00040 refsol->loadAttributes("rSolid", names, values, nmspace, cpv); 00041 } 00042 00043 // clear THIS solid's values. 00044 clear(); 00045 00046 DCOUT_V('P', "DDLSolid::setReference completed"); 00047 }