CMS 3D CMS Logo

Public Member Functions

DDLBox Class Reference

DDLBox processes Box elements. More...

#include <DDLBox.h>

Inheritance diagram for DDLBox:
DDLSolid DDXMLElement

List of all members.

Public Member Functions

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

Detailed Description

DDLBox processes Box elements.

Author:
Michael Case

DDLBox.h - description ------------------- begin: Wed Oct 24 2001 email: case@ucdhep.ucdavis.edu

This is the Box element processor.

Definition at line 24 of file DDLBox.h.


Constructor & Destructor Documentation

DDLBox::DDLBox ( DDLElementRegistry myreg)

Constructor.

Definition at line 22 of file DDLBox.cc.

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

Destructor.

Definition at line 26 of file DDLBox.cc.

{}

Member Function Documentation

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

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

{
  DCOUT_V( 'P', "DDLBox::processElement started" );
  
  ExprEvalInterface & ev = ExprEvalSingleton::instance();
  DDXMLAttribute atts = getAttributeSet();
  
  DDName ddname = getDDName( nmspace );
  DDSolid ddbox = DDSolidFactory::box( ddname,
                                       ev.eval( nmspace, atts.find( "dx" )->second ),
                                       ev.eval( nmspace, atts.find( "dy" )->second ),
                                       ev.eval( nmspace, atts.find( "dz" )->second ));
  // Attempt to make sure Solid elements can be in LogicalPart elements.
  DDLSolid::setReference( nmspace, cpv );

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