CMS 3D CMS Logo

DDLReflectionSolid Class Reference

DDLReflectionSolid processes ReflectionSolid elements. More...

#include <DetectorDescription/Parser/src/DDLReflectionSolid.h>

Inheritance diagram for DDLReflectionSolid:

DDLSolid DDXMLElement

List of all members.

Public Member Functions

 DDLReflectionSolid ()
 Constructor.
void preProcessElement (const std::string &name, const std::string &nmspace)
 Called by loadAttributes AFTER attributes are loaded.
void processElement (const std::string &name, const std::string &nmspace)
 Processing the element.
 ~DDLReflectionSolid ()
 Destructor.


Detailed Description

DDLReflectionSolid processes ReflectionSolid elements.

Author:
Michael Case
DDLReflectionSolid.h - description ------------------- begin: Mon Mar 4, 2002 email: case@ucdhep.ucdavis.edu

This is the ReflectionSolid processor.

Definition at line 23 of file DDLReflectionSolid.h.


Constructor & Destructor Documentation

DDLReflectionSolid::DDLReflectionSolid (  ) 

Constructor.

Definition at line 34 of file DDLReflectionSolid.cc.

00035 {
00036 }

DDLReflectionSolid::~DDLReflectionSolid (  ) 

Destructor.

Definition at line 39 of file DDLReflectionSolid.cc.

00040 {
00041 }


Member Function Documentation

void DDLReflectionSolid::preProcessElement ( const std::string &  name,
const std::string &  nmspace 
) [virtual]

Called by loadAttributes AFTER attributes are loaded.

The preProcessElement method can assume that the attributes are loaded and perform any code that is necessary at the start of an element.

This would allow users to call their own code to setup anything necessary for the continued processing of the child elements.

Reimplemented from DDXMLElement.

Definition at line 44 of file DDLReflectionSolid.cc.

References DDXMLElement::clear(), and DDLElementRegistry::getElement().

00045 {
00046   DDLElementRegistry::getElement("rSolid")->clear();
00047 }

void DDLReflectionSolid::processElement ( const std::string &  name,
const std::string &  nmspace 
) [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 50 of file DDLReflectionSolid.cc.

References GenMuonPlsPt100GeV_cfg::cout, DCOUT_V, lat::endl(), DDXMLElement::getDDName(), DDLElementRegistry::getElement(), DDSolidFactory::reflection(), DDLSolid::setReference(), and DDXMLElement::size().

00051 {
00052   DCOUT_V('P', "DDLReflectionSolid::processElement started");
00053 
00054   // get solid reference:
00055   DDXMLElement* myrSolid = DDLElementRegistry::getElement("rSolid");
00056 
00057   if (myrSolid->size() != 1)
00058     {
00059       std::cout << "WARNING:  A ReflectionSolid had more than one rSolid.  "
00060            << "The first one was used." << std::endl;
00061       std::cout << "The element to look for is " << getDDName(nmspace) << std::endl;
00062     }
00063 
00064   DDSolid solid = DDSolid(myrSolid->getDDName(nmspace));
00065   DDSolid ddreflsol = DDSolidFactory::reflection(getDDName(nmspace), solid);
00066 
00067   DDLSolid::setReference(nmspace);
00068 
00069   DCOUT_V('P', "DDLReflectionSolid::processElement completed");
00070 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:18:03 2009 for CMSSW by  doxygen 1.5.4