CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch1/src/DetectorDescription/Parser/src/DDLSphere.cc

Go to the documentation of this file.
00001 /***************************************************************************
00002                           DDLSphere.cc  -  description
00003                              -------------------
00004     begin                : Sun July 12 2009
00005     email                : case@ucdhep.ucdavis.edu
00006  ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *           DDDParser sub-component of DDD                                *
00011  *                                                                         *
00012  ***************************************************************************/
00013 
00014 #include "DetectorDescription/Parser/src/DDLSphere.h"
00015 
00016 #include "DetectorDescription/Core/interface/DDName.h"
00017 #include "DetectorDescription/Core/interface/DDSolid.h"
00018 #include "DetectorDescription/Base/interface/DDdebug.h"
00019 
00020 #include "DetectorDescription/ExprAlgo/interface/ExprEvalSingleton.h"
00021 
00022 DDLSphere::DDLSphere( DDLElementRegistry* myreg )
00023   : DDLSolid( myreg )
00024 {}
00025 
00026 DDLSphere::~DDLSphere( void )
00027 {}
00028 
00029 // Upon encountering the end of the Sphere element, call DDCore.
00030 void
00031 DDLSphere::processElement( const std::string& name, const std::string& nmspace, DDCompactView& cpv )
00032 {  
00033   DCOUT_V('P', "DDLSphere::processElement started");
00034   ExprEvalInterface & ev = ExprEvalSingleton::instance();
00035   DDXMLAttribute atts = getAttributeSet();
00036   DDSolid ddsphere = DDSolidFactory::sphere( getDDName(nmspace),
00037                                              ev.eval(nmspace, atts.find("innerRadius")->second),
00038                                              ev.eval(nmspace, atts.find("outerRadius")->second),
00039                                              ev.eval(nmspace, atts.find("startPhi")->second),
00040                                              ev.eval(nmspace, atts.find("deltaPhi")->second),
00041                                              ev.eval(nmspace, atts.find("startTheta")->second),
00042                                              ev.eval(nmspace, atts.find("deltaTheta")->second ));
00043   
00044   DDLSolid::setReference(nmspace, cpv);
00045 
00046   DCOUT_V('P', "DDLSphere::processElement completed");
00047 }