CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DetectorDescription/Parser/src/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 #include "DetectorDescription/Parser/src/DDLTorus.h"
00016 
00017 #include "DetectorDescription/Core/interface/DDName.h"
00018 #include "DetectorDescription/Core/interface/DDSolid.h"
00019 #include "DetectorDescription/Base/interface/DDdebug.h"
00020 
00021 #include "DetectorDescription/ExprAlgo/interface/ExprEvalSingleton.h"
00022 
00023 DDLTorus::DDLTorus( DDLElementRegistry* myreg )
00024   : DDLSolid( myreg )
00025 {}
00026 
00027 DDLTorus::~DDLTorus( void )
00028 {}
00029 
00030 // Upon encountering an end of the tag, call DDCore's Torus.
00031 void
00032 DDLTorus::processElement( const std::string& name, const std::string& nmspace, DDCompactView& cpv )
00033 {
00034   DCOUT_V('P', "DDLTorus::processElement started");
00035 
00036   ExprEvalInterface & ev = ExprEvalSingleton::instance();
00037   DDXMLAttribute atts = getAttributeSet();
00038 
00039   DDSolid myTorus = 
00040     DDSolidFactory::torus( getDDName(nmspace),
00041                            ev.eval(nmspace, atts.find("innerRadius")->second),
00042                            ev.eval(nmspace, atts.find("outerRadius")->second),
00043                            ev.eval(nmspace, atts.find("torusRadius")->second),
00044                            ev.eval(nmspace, atts.find("startPhi")->second),
00045                            ev.eval(nmspace, atts.find("deltaPhi")->second));
00046   DDLSolid::setReference( nmspace, cpv );
00047 
00048   DCOUT_V('P', "DDLTorus::processElement completed");
00049 }