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 00015 00016 // ------------------------------------------------------------------------- 00017 // Includes 00018 // ------------------------------------------------------------------------- 00019 #include "DDLSolid.h" 00020 #include "DDLElementRegistry.h" 00021 #include "DDLLogicalPart.h" 00022 00023 // DDCore dependencies 00024 #include "DetectorDescription/Core/interface/DDName.h" 00025 #include "DetectorDescription/Core/interface/DDSolid.h" 00026 #include "DetectorDescription/Base/interface/DDdebug.h" 00027 00028 #include "DetectorDescription/ExprAlgo/interface/ExprEvalSingleton.h" 00029 00030 //#include <strstream> 00031 #include <string> 00032 00033 // Default constructor 00034 DDLSolid::DDLSolid() 00035 { 00036 } 00037 00038 // Default desctructor 00039 DDLSolid::~DDLSolid() 00040 { 00041 } 00042 00043 void DDLSolid::setReference (const std::string& nmspace) 00044 { 00045 // in case it was a BooleanSolid or a ReflectionSolid, clear rSolid. 00046 DDXMLElement* myrSolid = DDLElementRegistry::getElement("rSolid"); 00047 myrSolid->clear(); 00048 00049 // Make sure Solid elements are in LogicalPart elements. 00050 if (parent() == "LogicalPart") 00051 { 00052 DDXMLElement* refsol = DDLElementRegistry::getElement("rSolid"); 00053 std::vector<std::string> names; 00054 std::vector<std::string> values; 00055 names.push_back("name"); 00056 values.push_back(getAttributeSet().find("name")->second); 00057 refsol->loadAttributes("rSolid", names, values, nmspace); 00058 } 00059 00060 // clear THIS solid's values. 00061 clear(); 00062 00063 DCOUT_V('P', "DDLSolid::setReference completed"); 00064 }