CMS 3D CMS Logo

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

Go to the documentation of this file.
00001 /***************************************************************************
00002                           DDLPseudoTrap.cc  -  description
00003                              -------------------
00004     begin                : Mon Jul 17 2003
00005     email                : case@ucdhep.ucdavis.edu
00006  ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *           DDDParser sub-component of DDD                                *
00011  *                                                                         *
00012  ***************************************************************************/
00013 
00014 #include "DetectorDescription/Parser/src/DDLPseudoTrap.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 DDLPseudoTrap::DDLPseudoTrap( DDLElementRegistry* myreg )
00023   : DDLSolid( myreg )
00024 {}
00025 
00026 DDLPseudoTrap::~DDLPseudoTrap( void )
00027 {}
00028 
00029 // Upon encountering an end of the tag, call DDCore's Trap.
00030 void
00031 DDLPseudoTrap::processElement( const std::string& name, const std::string& nmspace, DDCompactView& cpv )
00032 {
00033   DCOUT_V('P', "DDLPseudoTrap::processElement started");
00034 
00035   ExprEvalInterface & ev = ExprEvalSingleton::instance();
00036   DDXMLAttribute atts = getAttributeSet();
00037 
00038   DDSolid myTrap = DDSolidFactory::pseudoTrap( getDDName(nmspace),
00039                                                ev.eval(nmspace, atts.find("dx1")->second),
00040                                                ev.eval(nmspace, atts.find("dx2")->second),
00041                                                ev.eval(nmspace, atts.find("dy1")->second),
00042                                                ev.eval(nmspace, atts.find("dy2")->second),
00043                                                ev.eval(nmspace, atts.find("dz")->second),
00044                                                ev.eval(nmspace, atts.find("radius")->second),
00045                                                (atts.find("atMinusZ")->second == "true") ? true : false );
00046 
00047   DDLSolid::setReference(nmspace, cpv);
00048 
00049   DCOUT_V('P', "DDLPseudoTrap::processElement completed");
00050 }