CMS 3D CMS Logo

DDCompactViewImpl.cc
Go to the documentation of this file.
5 
6 DDCompactViewImpl::DDCompactViewImpl(const DDLogicalPart& rootnodedata) : root_(rootnodedata) {
7  LogDebug("DDCompactViewImpl") << "Root node data = " << rootnodedata << std::endl;
8 }
9 
12  if (graph_.size() == 0) {
13  LogDebug("DDCompactViewImpl") << "In destructor, graph is empty. Root:" << root_ << std::endl;
14  } else {
15  LogDebug("DDCompactViewImpl") << "In destructor, graph is NOT empty. Root:" << root_
16  << " graph_.size() = " << graph_.size() << std::endl;
17  for (; it < graph_.size(); ++it) {
18  Graph::edge_range erange = graph_.edges(it);
19  for (; erange.first != erange.second; ++(erange.first)) {
20  DDPosData* pd = graph_.edgeData(erange.first->second);
21  delete pd;
22  pd = nullptr;
23  }
24  }
25  }
26  edm::LogInfo("DDCompactViewImpl") << std::endl
27  << "DDD transient representation has been destructed." << std::endl
28  << std::endl;
29 }
30 
32 
34  const DDLogicalPart& parent,
35  int copyno,
36  const DDTranslation& trans,
37  const DDRotation& rot,
38  const DDDivision* div) {
39  DDPosData* pd = new DDPosData(trans, rot, copyno, div);
40  graph_.addEdge(parent, self, pd);
41 }
42 
43 void DDCompactViewImpl::swap(DDCompactViewImpl& implToSwap) { graph_.swap(implToSwap.graph_); }
44 
#define LogDebug(id)
void position(const DDLogicalPart &self, const DDLogicalPart &parent, int copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div)
Relative position of a child-volume inside a parent-volume.
Definition: DDPosData.h:13
edge_range edges(index_type nodeIndex)
Definition: Graph.h:240
void addEdge(const N &from, const N &to, const E &edge)
Definition: Graph.h:231
DDLogicalPart root_
uint16_t size_type
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
std::pair< edge_iterator, edge_iterator > edge_range
Definition: Graph.h:115
const E & edgeData(index_type i) const
Definition: Graph.h:158
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
void swap(Graph< N, E > &)
Definition: Graph.h:363
math::GraphWalker< DDLogicalPart, DDPosData * > GraphWalker
auto size() const -> adj_list::size_type
Definition: Graph.h:176
void swap(DDCompactViewImpl &)
GraphWalker walker() const
static const char root_[]