CMS 3D CMS Logo

DDLSolid.cc
Go to the documentation of this file.
2 
3 #include <map>
4 #include <utility>
5 #include <vector>
6 
9 
10 class DDCompactView;
11 
13  : DDXMLElement( myreg )
14 {}
15 
16 void
18 {
19  // in case it was a BooleanSolid or a ReflectionSolid, clear rSolid.
20  auto myrSolid = myRegistry_->getElement("rSolid");
21  myrSolid->clear();
22 
23  // Make sure Solid elements are in LogicalPart elements.
24  if (parent() == "LogicalPart")
25  {
26  auto refsol = myRegistry_->getElement("rSolid");
27  std::vector<std::string> names;
28  std::vector<std::string> values;
29  names.push_back("name");
30  values.push_back(getAttributeSet().find("name")->second);
31  refsol->loadAttributes("rSolid", names, values, nmspace, cpv);
32  }
33 
34  // clear THIS solid's values.
35  clear();
36 }
DDLElementRegistry * myRegistry_
Definition: DDXMLElement.h:172
static const HistoName names[]
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
Definition: DDXMLElement.cc:73
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
type of data representation of DDCompactView
Definition: DDCompactView.h:90
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:12
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
void setReference(const std::string &nmspace, DDCompactView &cpv)
Definition: DDLSolid.cc:17