CMS 3D CMS Logo

Public Member Functions

DDLTorus Class Reference

#include <DDLTorus.h>

Inheritance diagram for DDLTorus:
DDLSolid DDXMLElement

List of all members.

Public Member Functions

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

Detailed Description

Author:
Michael Case

DDLTorus.h - description ------------------- begin: Fri May 25 2007 email: case@ucdhep.ucdavis.edu

Torus, same as G4Torus

Definition at line 23 of file DDLTorus.h.


Constructor & Destructor Documentation

DDLTorus::DDLTorus ( DDLElementRegistry myreg)

Constructor.

Definition at line 23 of file DDLTorus.cc.

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

Destructor.

Definition at line 27 of file DDLTorus.cc.

{}

Member Function Documentation

void DDLTorus::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 32 of file DDLTorus.cc.

References DCOUT_V, ExprEvalInterface::eval(), DDXMLElement::getAttributeSet(), DDXMLElement::getDDName(), DDI::Singleton< I >::instance(), DDLSolid::setReference(), and DDSolidFactory::torus().

{
  DCOUT_V('P', "DDLTorus::processElement started");

  ExprEvalInterface & ev = ExprEvalSingleton::instance();
  DDXMLAttribute atts = getAttributeSet();

  DDSolid myTorus = 
    DDSolidFactory::torus( getDDName(nmspace),
                           ev.eval(nmspace, atts.find("innerRadius")->second),
                           ev.eval(nmspace, atts.find("outerRadius")->second),
                           ev.eval(nmspace, atts.find("torusRadius")->second),
                           ev.eval(nmspace, atts.find("startPhi")->second),
                           ev.eval(nmspace, atts.find("deltaPhi")->second));
  DDLSolid::setReference( nmspace, cpv );

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