CMS 3D CMS Logo

DDLSolid.cc
Go to the documentation of this file.
4 
5 #include <map>
6 #include <utility>
7 #include <vector>
8 
9 class DDCompactView;
10 
12 
13 void DDLSolid::setReference(const std::string& nmspace, DDCompactView& cpv) {
14  // in case it was a BooleanSolid or a ReflectionSolid, clear rSolid.
15  auto myrSolid = myRegistry_->getElement("rSolid");
16  myrSolid->clear();
17 
18  // Make sure Solid elements are in LogicalPart elements.
19  if (parent() == "LogicalPart") {
20  auto refsol = myRegistry_->getElement("rSolid");
21  std::vector<std::string> names;
22  std::vector<std::string> values;
23  names.emplace_back("name");
24  values.emplace_back(getAttributeSet().find("name")->second);
25  refsol->loadAttributes("rSolid", names, values, nmspace, cpv);
26  }
27 
28  // clear THIS solid's values.
29  clear();
30 }
DDXMLElement::parent
const std::string & parent(void) const
access to parent element name
Definition: DDXMLElement.cc:201
DDXMLElement::clear
virtual void clear(void)
clear this element's contents.
Definition: DDXMLElement.cc:40
DDLSolid::setReference
void setReference(const std::string &nmspace, DDCompactView &cpv)
Definition: DDLSolid.cc:13
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
DDLElementRegistry
The main class for processing parsed elements.
Definition: DDLElementRegistry.h:23
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
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
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
DDLElementRegistry.h
DDLSolid.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
DDLSolid::DDLSolid
DDLSolid(DDLElementRegistry *myreg)
Constructor.
Definition: DDLSolid.cc:11
DDXMLElement.h
DDXMLElement::myRegistry_
DDLElementRegistry * myRegistry_
Definition: DDXMLElement.h:173