CMS 3D CMS Logo

DDLTorus.cc

Go to the documentation of this file.
00001 
00002 /***************************************************************************
00003                           DDLTorus.cc  -  description
00004                              -------------------
00005     begin                : Fri May 25 2007
00006     email                : case@ucdhep.ucdavis.edu
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *           DDDParser sub-component of DDD                                *
00012  *                                                                         *
00013  ***************************************************************************/
00014 
00015 
00016 
00017 // -------------------------------------------------------------------------
00018 // Includes 
00019 // -------------------------------------------------------------------------
00020 // Parser parts
00021 #include "DDLTorus.h"
00022 #include "DDLElementRegistry.h"
00023 
00024 // DDCore dependencies
00025 #include "DetectorDescription/Core/interface/DDName.h"
00026 #include "DetectorDescription/Core/interface/DDSolid.h"
00027 #include "DetectorDescription/Base/interface/DDdebug.h"
00028 #include "DetectorDescription/Base/interface/DDException.h"
00029 
00030 #include "DetectorDescription/ExprAlgo/interface/ExprEvalSingleton.h"
00031 
00032 #include <string>
00033 
00034 // Default constructor
00035 DDLTorus::DDLTorus()
00036 {
00037 }
00038 
00039 // Default destructor
00040 DDLTorus::~DDLTorus()
00041 {
00042 }
00043 
00044 // Upon encountering an end of the tag, call DDCore's Torus.
00045 void DDLTorus::processElement (const std::string& name, const std::string& nmspace)
00046 {
00047   DCOUT_V('P', "DDLTorus::processElement started");
00048 
00049   ExprEvalInterface & ev = ExprEvalSingleton::instance();
00050   DDXMLAttribute atts = getAttributeSet();
00051 
00052   DDSolid myTorus = 
00053     DDSolidFactory::torus(getDDName(nmspace)
00054                           , ev.eval(nmspace, atts.find("innerRadius")->second)
00055                           , ev.eval(nmspace, atts.find("outerRadius")->second)
00056                           , ev.eval(nmspace, atts.find("torusRadius")->second)
00057                           , ev.eval(nmspace, atts.find("startPhi")->second)
00058                           , ev.eval(nmspace, atts.find("deltaPhi")->second)
00059                           );
00060   DDLSolid::setReference(nmspace);
00061 
00062   DCOUT_V('P', "DDLTorus::processElement completed");
00063 }

Generated on Tue Jun 9 17:32:24 2009 for CMSSW by  doxygen 1.5.4