CMS 3D CMS Logo

DDLString.cc
Go to the documentation of this file.
2 
3 #include <map>
4 #include <utility>
5 
9 
10 class DDCompactView;
11 class DDLElementRegistry;
12 
14  : DDXMLElement( myreg )
15 {}
16 
17 void
19 {}
20 
21 void
23 {
24  if (parent() == "ConstantsSection" || parent() == "DDDefinition")
25  {
26  // I do not like "newing" things without my control. But this is
27  // the only way I was able to get this to work.
28 
29  std::string * ts = new std::string((getAttributeSet().find("value"))->second);
30  DDName ddn = getDDName(nmspace);
31  DDString( ddn, ts );
32  clear();
33  }
34 }
35 
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
Definition: DDXMLElement.cc:73
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:16
const std::string & parent(void) const
access to parent element name
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
Definition: DDLString.cc:22
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:90
a named constant corresponding to the DDL-XML tag <Constant> and <ConstantsVector> ...
Definition: DDString.h:16
U second(std::pair< T, U > const &p)
void preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Called by loadAttributes AFTER attributes are loaded.
Definition: DDLString.cc:18
DDLString(DDLElementRegistry *myreg)
Definition: DDLString.cc:13
This is a base class for processing XML elements in the DDD.
Definition: DDXMLElement.h:48
The main class for processing parsed elements.
virtual void clear(void)
clear this element&#39;s contents.
Definition: DDXMLElement.cc:55
virtual const DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)
Definition: DDXMLElement.cc:80