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  : DDXMLElement( myreg )
13 {}
14 
15 void
17 {
18  // in case it was a BooleanSolid or a ReflectionSolid, clear rSolid.
19  auto myrSolid = myRegistry_->getElement("rSolid");
20  myrSolid->clear();
21 
22  // Make sure Solid elements are in LogicalPart elements.
23  if (parent() == "LogicalPart")
24  {
25  auto refsol = myRegistry_->getElement("rSolid");
26  std::vector<std::string> names;
27  std::vector<std::string> values;
28  names.emplace_back("name");
29  values.emplace_back(getAttributeSet().find("name")->second);
30  refsol->loadAttributes("rSolid", names, values, nmspace, cpv);
31  }
32 
33  // clear THIS solid's values.
34  clear();
35 }
DDLElementRegistry * myRegistry_
Definition: DDXMLElement.h:172
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
Definition: DDXMLElement.cc:72
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:20
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
const std::string names[nVars_]
U second(std::pair< T, U > const &p)
std::shared_ptr< DDXMLElement > getElement(const std::string &name)
THE most important part. Getting the pointer to a given element type.
DDLSolid(DDLElementRegistry *myreg)
Constructor.
Definition: DDLSolid.cc:11
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:54
void setReference(const std::string &nmspace, DDCompactView &cpv)
Definition: DDLSolid.cc:16