CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDLNumeric.cc
Go to the documentation of this file.
1 /***************************************************************************
2  DDLNumeric.cc - description
3  -------------------
4  begin : Friday Nov. 21, 2003
5  email : case@ucdhep.ucdavis.edu
6  ***************************************************************************/
7 
9 
12 
14  : DDXMLElement( myreg )
15 {}
16 
18 {}
19 
20 void
22 {}
23 
24 void
26 {
27  DCOUT_V( 'P', "DDLNumeric::processElement started" );
28 
29  if( parent() == "ConstantsSection" || parent() == "DDDefinition" )
30  {
31  DDNumeric ddnum( getDDName( nmspace ), new double( ExprEvalSingleton::instance().eval( nmspace, getAttributeSet().find( "value" )->second )));
32  clear();
33  } // else, save it, don't clear it, because some other element (parent node) will use it.
34 
35  DCOUT_V( 'P', "DDLNumeric::processElement completed" );
36 }
37 
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Processing the element.
Definition: DDLNumeric.cc:25
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
Definition: DDXMLElement.cc:79
const std::string & parent(void) const
access to parent element name
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
type of data representation of DDCompactView
Definition: DDCompactView.h:77
U second(std::pair< T, U > const &p)
static value_type & instance()
DDLNumeric(DDLElementRegistry *myreg)
Definition: DDLNumeric.cc:13
#define DCOUT_V(M_v_Y, M_v_S)
Definition: DDdebug.h:54
void preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Called by loadAttributes AFTER attributes are loaded.
Definition: DDLNumeric.cc:21
This is a base class for processing XML elements in the DDD.
Definition: DDXMLElement.h:58
The main class for processing parsed elements.
virtual void clear(void)
clear this element&#39;s contents.
Definition: DDXMLElement.cc:61
a named constant corresponding to the DDL-XML tag &lt;Constant&gt; and &lt;ConstantsVector&gt; ...
Definition: DDConstant.h:15
virtual const DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)
Definition: DDXMLElement.cc:86
~DDLNumeric(void)
Definition: DDLNumeric.cc:17