#include <DetectorDescription/Parser/src/DDLReflectionSolid.h>
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. |
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.
DDLReflectionSolid::DDLReflectionSolid | ( | ) |
DDLReflectionSolid::~DDLReflectionSolid | ( | ) |
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 }