CMS 3D CMS Logo

Public Member Functions

DDLSphere Class Reference

DDLSphere processes all Sphere elements. More...

#include <DDLSphere.h>

Inheritance diagram for DDLSphere:
DDLSolid DDXMLElement

List of all members.

Public Member Functions

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

Detailed Description

DDLSphere processes all Sphere elements.

Author:
Michael Case

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

This processes DDL Sphere and Cons elements.

Definition at line 24 of file DDLSphere.h.


Constructor & Destructor Documentation

DDLSphere::DDLSphere ( DDLElementRegistry myreg)

Constructor.

Definition at line 22 of file DDLSphere.cc.

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

Destructor.

Definition at line 26 of file DDLSphere.cc.

{}

Member Function Documentation

void DDLSphere::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 DDLSphere.cc.

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

{  
  DCOUT_V('P', "DDLSphere::processElement started");
  ExprEvalInterface & ev = ExprEvalSingleton::instance();
  DDXMLAttribute atts = getAttributeSet();
  DDSolid ddsphere = DDSolidFactory::sphere( getDDName(nmspace),
                                             ev.eval(nmspace, atts.find("innerRadius")->second),
                                             ev.eval(nmspace, atts.find("outerRadius")->second),
                                             ev.eval(nmspace, atts.find("startPhi")->second),
                                             ev.eval(nmspace, atts.find("deltaPhi")->second),
                                             ev.eval(nmspace, atts.find("startTheta")->second),
                                             ev.eval(nmspace, atts.find("deltaTheta")->second ));
  
  DDLSolid::setReference(nmspace, cpv);

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