CMS 3D CMS Logo

Public Member Functions

DDLParallelepiped Class Reference

DDLParallelepiped processes all Parallelepiped elements. More...

#include <DDLParallelepiped.h>

Inheritance diagram for DDLParallelepiped:
DDLSolid DDXMLElement

List of all members.

Public Member Functions

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

Detailed Description

DDLParallelepiped processes all Parallelepiped elements.

Author:
Michael Case

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

This processes DDL Parallelepiped elements.

Definition at line 24 of file DDLParallelepiped.h.


Constructor & Destructor Documentation

DDLParallelepiped::DDLParallelepiped ( DDLElementRegistry myreg)

Constructor.

Definition at line 22 of file DDLParallelepiped.cc.

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

Destructor.

Definition at line 26 of file DDLParallelepiped.cc.

{}

Member Function Documentation

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

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

{  
  DCOUT_V('P', "DDLParallelepiped::processElement started");
  ExprEvalInterface & ev = ExprEvalSingleton::instance();
  DDXMLAttribute atts = getAttributeSet();
  DDSolid ddp = DDSolidFactory::parallelepiped( getDDName(nmspace),
                                                ev.eval(nmspace, atts.find("xHalf")->second),
                                                ev.eval(nmspace, atts.find("yHalf")->second),
                                                ev.eval(nmspace, atts.find("zHalf")->second),
                                                ev.eval(nmspace, atts.find("alpha")->second),
                                                ev.eval(nmspace, atts.find("theta")->second),
                                                ev.eval(nmspace, atts.find("phi")->second));
  DDLSolid::setReference(nmspace, cpv);

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