CMS 3D CMS Logo

DDCompactViewImpl.cc
Go to the documentation of this file.
5 
7  : root_( rootnodedata )
8 {
9  LogDebug("DDCompactViewImpl") << "Root node data = " << rootnodedata << std::endl;
10 }
11 
13 {
15  if( graph_.size() == 0 ) {
16  LogDebug("DDCompactViewImpl") << "In destructor, graph is empty. Root:" << root_ << std::endl;
17  } else {
18  LogDebug("DDCompactViewImpl") << "In destructor, graph is NOT empty. Root:" << root_ << " graph_.size() = " << graph_.size() << std::endl;
19  for(; it < graph_.size() ; ++it ) {
20  Graph::edge_range erange = graph_.edges( it );
21  for(; erange.first != erange.second; ++(erange.first)) {
22  DDPosData * pd = graph_.edgeData( erange.first->second );
23  delete pd;
24  pd = nullptr;
25  }
26  }
27  }
28  edm::LogInfo("DDCompactViewImpl") << std::endl << "DDD transient representation has been destructed." << std::endl << std::endl;
29 }
30 
33 {
34  return GraphWalker( graph_, root_ );
35 }
36 
37 void
39  const DDLogicalPart & parent,
40  int copyno,
41  const DDTranslation & trans,
42  const DDRotation & rot,
43  const DDDivision * div )
44 {
45  DDPosData * pd = new DDPosData( trans, rot, copyno, div );
46  graph_.addEdge( parent, self, pd );
47 }
48 
49 void
51  graph_.swap( implToSwap.graph_ );
52 }
53 
#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:272
void addEdge(const N &from, const N &to, const E &edge)
Definition: Graph.h:261
DDLogicalPart root_
math::GraphWalker< DDLogicalPart, DDPosData * > GraphWalker
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:67
std::pair< edge_iterator, edge_iterator > edge_range
Definition: Graph.h:135
const E & edgeData(index_type i) const
Definition: Graph.h:178
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:92
void swap(Graph< N, E > &)
Definition: Graph.h:413
auto size() const -> adj_list::size_type
Definition: Graph.h:196
void swap(DDCompactViewImpl &)
GraphWalker walker() const
static const char root_[]