![]() |
![]() |
#include <DetectorDescription/Parser/src/DDLNumeric.h>
Public Member Functions | |
DDLNumeric () | |
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. | |
~DDLNumeric () |
DDLNumeric.h - description ------------------- begin: Fri Nov 21 2003 email: case@ucdhep.ucdavis.edu
Definition at line 26 of file DDLNumeric.h.
DDLNumeric::DDLNumeric | ( | ) |
DDLNumeric::~DDLNumeric | ( | ) |
void DDLNumeric::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 33 of file DDLNumeric.cc.
void DDLNumeric::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 37 of file DDLNumeric.cc.
References DDXMLElement::clear(), DCOUT_V, find(), DDXMLElement::getAttributeSet(), DDXMLElement::getDDName(), DDI::Singleton< I >::instance(), DDXMLElement::parent(), and edm::second().
00038 { 00039 DCOUT_V('P', "DDLNumeric::processElement started"); 00040 00041 if (parent() == "ConstantsSection" || parent() == "DDDefinition") 00042 { 00043 DDNumeric ddnum ( getDDName(nmspace), new double(ExprEvalSingleton::instance().eval(nmspace, getAttributeSet().find("value")->second)) ); 00044 clear(); 00045 } // else, save it, don't clear it, because some other element (parent node) will use it. 00046 00047 DCOUT_V('P', "DDLNumeric::processElement completed"); 00048 }