CMS 3D CMS Logo

Public Member Functions

DDLEllipsoid Class Reference

DDLEllipsoid processes all Ellipsoid elements. More...

#include <DDLEllipsoid.h>

Inheritance diagram for DDLEllipsoid:
DDLSolid DDXMLElement

List of all members.

Public Member Functions

 DDLEllipsoid (DDLElementRegistry *myreg)
 Constructor.
void processElement (const std::string &name, const std::string &nmspace, DDCompactView &cpv)
 Processing the element.
 ~DDLEllipsoid (void)
 Destructor.

Detailed Description

DDLEllipsoid processes all Ellipsoid elements.

Author:
Michael Case

DDLEllipsoid.h - description ------------------- begin: Mon Oct 29 2001 email: case@ucdhep.ucdavis.edu

This processes DDL Ellipsoid elements.

Definition at line 24 of file DDLEllipsoid.h.


Constructor & Destructor Documentation

DDLEllipsoid::DDLEllipsoid ( DDLElementRegistry myreg)

Constructor.

Definition at line 22 of file DDLEllipsoid.cc.

  : DDLSolid( myreg )
{}
DDLEllipsoid::~DDLEllipsoid ( void  )

Destructor.

Definition at line 26 of file DDLEllipsoid.cc.

{}

Member Function Documentation

void DDLEllipsoid::processElement ( const std::string &  name,
const std::string &  nmspace,
DDCompactView cpv 
) [virtual]

Processing the element.

The processElement method completes any necessary work to process the XML element.

For example, this can be used to call the DDCore to make the geometry in memory. There is a default for this so that if not declared in the inheriting class, no processing is done.

Reimplemented from DDXMLElement.

Definition at line 31 of file DDLEllipsoid.cc.

References DCOUT_V, DDSolidFactory::ellipsoid(), ExprEvalInterface::eval(), DDXMLElement::getAttributeSet(), DDXMLElement::getDDName(), instance, and DDLSolid::setReference().

{ 
  DCOUT_V( 'P', "DDLEllipsoid::processElement started" );
  ExprEvalInterface & ev = ExprEvalSingleton::instance();
  DDXMLAttribute atts = getAttributeSet();
  double zbot(0.), ztop(0.);
  if( atts.find( "zBottomCut" ) != atts.end() )
  {
    zbot = ev.eval( nmspace, atts.find( "zBottomCut" )->second );
  }
  if( atts.find( "zTopCut" ) != atts.end() )
  {
    ztop = ev.eval( nmspace, atts.find( "zTopCut" )->second );
  }
  DDSolid ddel = DDSolidFactory::ellipsoid( getDDName( nmspace ),
                                            ev.eval(nmspace, atts.find("xSemiAxis")->second),
                                            ev.eval(nmspace, atts.find("ySemiAxis")->second),
                                            ev.eval(nmspace, atts.find("zSemiAxis")->second),
                                            zbot,
                                            ztop );
  DDLSolid::setReference( nmspace, cpv );

  DCOUT_V( 'P', "DDLEllipsoid::processElement completed" );
}