CMS 3D CMS Logo

DDLMaterial.cc
Go to the documentation of this file.
4 
5 #include <map>
6 #include <utility>
7 #include <vector>
8 
9 class DDCompactView;
10 
12 
14  // in case it there were any rMaterials
15  myRegistry_->getElement("rMaterial")->clear();
16 
17  // Attempt to make sure Material elements can be in LogicalPart elements.
18  if (myRegistry_->getElement("LogicalPart")->size() > 0) {
19  auto refmat = myRegistry_->getElement("rMaterial");
20  std::vector<std::string> names;
21  std::vector<std::string> values;
22  names.emplace_back("name");
24  values.emplace_back(atts.find("name")->second);
25  refmat->loadAttributes("rMaterial", names, values, nmspace, cpv);
26  }
27  // clear THIS material's values.
28  clear();
29 }
DDXMLElement::clear
virtual void clear(void)
clear this element's contents.
Definition: DDXMLElement.cc:40
DDLElementRegistry
The main class for processing parsed elements.
Definition: DDLElementRegistry.h:23
DDXMLElement::getAttributeSet
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
Definition: DDXMLElement.cc:54
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:124
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
DDXMLAttribute
std::map< std::string, std::string > DDXMLAttribute
Definition: DDXMLElement.h:45
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DDXMLElement
This is a base class for processing XML elements in the DDD.
Definition: DDXMLElement.h:48
DDLMaterial::setReference
virtual void setReference(const std::string &nmspace, DDCompactView &cpv)
Definition: DDLMaterial.cc:13
DDLElementRegistry.h
DDLMaterial.h
DDLElementRegistry::getElement
std::shared_ptr< DDXMLElement > getElement(const std::string &name)
THE most important part. Getting the pointer to a given element type.
Definition: DDLElementRegistry.cc:42
DDXMLElement.h
DDLMaterial::DDLMaterial
DDLMaterial(DDLElementRegistry *myreg)
Definition: DDLMaterial.cc:11
DDXMLElement::myRegistry_
DDLElementRegistry * myRegistry_
Definition: DDXMLElement.h:173