CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/DetectorDescription/Parser/src/DDLCone.cc

Go to the documentation of this file.
00001 /***************************************************************************
00002                           DDLCone.cc  -  description
00003                              -------------------
00004     begin                : Mon Oct 29 2001
00005     email                : case@ucdhep.ucdavis.edu
00006  ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *           DDDParser sub-component of DDD                                *
00011  *                                                                         *
00012  ***************************************************************************/
00013 
00014 #include "DetectorDescription/Parser/src/DDLCone.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 DDLCone::DDLCone( DDLElementRegistry* myreg )
00023   : DDLSolid( myreg )
00024 {}
00025 
00026 DDLCone::~DDLCone( void )
00027 {}
00028 
00029 // Upon encountering the end of the Cone element, call DDCore.
00030 void
00031 DDLCone::processElement( const std::string& name, const std::string& nmspace, DDCompactView& cpv )
00032 {  
00033   DCOUT_V( 'P', "DDLCone::processElement started" );
00034   ExprEvalInterface & ev = ExprEvalSingleton::instance();
00035   DDXMLAttribute atts = getAttributeSet();
00036 
00037   DDSolid ddcone = DDSolidFactory::cons( getDDName( nmspace ),
00038                                          ev.eval( nmspace, atts.find( "dz" )->second ),
00039                                          ev.eval( nmspace, atts.find( "rMin1" )->second ),
00040                                          ev.eval( nmspace, atts.find( "rMax1" )->second ),
00041                                          ev.eval( nmspace, atts.find( "rMin2" )->second ),
00042                                          ev.eval( nmspace, atts.find( "rMax2" )->second ),
00043                                          ev.eval( nmspace, atts.find( "startPhi" )->second ),
00044                                          ev.eval( nmspace, atts.find( "deltaPhi" )->second ));
00045 
00046   DDLSolid::setReference( nmspace, cpv );
00047 
00048   DCOUT_V( 'P', "DDLCone::processElement completed" );
00049 }