CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DetectorDescription/Parser/src/DDLBox.cc

Go to the documentation of this file.
00001 /***************************************************************************
00002                           DDLBox.cc  -  description
00003                              -------------------
00004     begin                : Wed Oct 24 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/DDLBox.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 DDLBox::DDLBox( DDLElementRegistry* myreg )
00023   : DDLSolid( myreg )
00024 {}
00025 
00026 DDLBox::~DDLBox( void )
00027 {}
00028 
00029 // Upon ending a Box element, call DDCore giving the box name, and dimensions.
00030 void
00031 DDLBox::processElement( const std::string& name, const std::string& nmspace, DDCompactView& cpv )
00032 {
00033   DCOUT_V( 'P', "DDLBox::processElement started" );
00034   
00035   ExprEvalInterface & ev = ExprEvalSingleton::instance();
00036   DDXMLAttribute atts = getAttributeSet();
00037   
00038   DDName ddname = getDDName( nmspace );
00039   DDSolid ddbox = DDSolidFactory::box( ddname,
00040                                        ev.eval( nmspace, atts.find( "dx" )->second ),
00041                                        ev.eval( nmspace, atts.find( "dy" )->second ),
00042                                        ev.eval( nmspace, atts.find( "dz" )->second ));
00043   // Attempt to make sure Solid elements can be in LogicalPart elements.
00044   DDLSolid::setReference( nmspace, cpv );
00045 
00046   DCOUT_V( 'P', "DDLBox::processElement completed" );
00047 }