CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDLString.cc
Go to the documentation of this file.
1 /***************************************************************************
2  DDLString.cc - description
3  -------------------
4  begin : Friday Nov. 21, 2003
5  email : case@ucdhep.ucdavis.edu
6  ***************************************************************************/
7 
9 
11 
13  : DDXMLElement( myreg )
14 {}
15 
17 {}
18 
19 void
21 {}
22 
23 void
25 {
26  DCOUT_V('P', "DDLString::processElement started");
27  if (parent() == "ConstantsSection" || parent() == "DDDefinition")
28  {
29  // I do not like "newing" things without my control. But this is
30  // the only way I was able to get this to work.
31 
32  std::string * ts = new std::string((getAttributeSet().find("value"))->second);
33  DDName ddn = getDDName(nmspace);
34  DDString (ddn
35  , ts
36  );
37 
38  clear();
39  }
40 
41  DCOUT_V('P', "DDLString::processElement completed");
42 }
43 
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
Definition: DDXMLElement.cc:79
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:18
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:76
a named constant corresponding to the DDL-XML tag &lt;Constant&gt; and &lt;ConstantsVector&gt; ...
Definition: DDString.h:16
U second(std::pair< T, U > const &p)
void preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Called by loadAttributes AFTER attributes are loaded.
Definition: DDLString.cc:20
DDLString(DDLElementRegistry *myreg)
Definition: DDLString.cc:12
~DDLString(void)
Definition: DDLString.cc:16
#define DCOUT_V(M_v_Y, M_v_S)
Definition: DDdebug.h:54
This is a base class for processing XML elements in the DDD.
Definition: DDXMLElement.h:58
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Processing the element.
Definition: DDLString.cc:24
The main class for processing parsed elements.
virtual void clear(void)
clear this element&#39;s contents.
Definition: DDXMLElement.cc:61
virtual const DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)
Definition: DDXMLElement.cc:86