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 
DDCompactViewImpl::DDCompactViewImpl
DDCompactViewImpl()
Definition: DDCompactViewImpl.cc:45
MessageLogger.h
math::GraphWalker< DDLogicalPart, DDPosData * >
edm::LogInfo
Definition: MessageLogger.h:254
DDCompactViewImpl
Definition: DDCompactViewImpl.h:14
DDCompactViewImpl::root_
DDLogicalPart root_
Definition: DDCompactViewImpl.h:44
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
DDPosData.h
math::Graph::size
auto size() const -> adj_list::size_type
Definition: Graph.h:176
DDPosData
Relative position of a child-volume inside a parent-volume.
Definition: DDPosData.h:13
math::Graph::edgeData
const E & edgeData(index_type i) const
Definition: Graph.h:158
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
math::Graph::addEdge
void addEdge(const N &from, const N &to, const E &edge)
Definition: Graph.h:231
DDLogicalPart
A DDLogicalPart aggregates information concerning material, solid and sensitveness ....
Definition: DDLogicalPart.h:93
sistrip::root_
static const char root_[]
Definition: ConstantsForDqm.h:30
DDDivision
Definition: DDDivision.h:78
DDCompactViewImpl::GraphWalker
math::GraphWalker< DDLogicalPart, DDPosData * > GraphWalker
Definition: DDCompactViewImpl.h:17
DDCompactViewImpl.h
DDCompactViewImpl::walker
GraphWalker walker() const
Definition: DDCompactViewImpl.cc:31
DDCompactViewImpl::~DDCompactViewImpl
~DDCompactViewImpl()
Definition: DDCompactViewImpl.cc:10
DDName.h
math::Graph::swap
void swap(Graph< N, E > &)
Definition: Graph.h:363
DDCompactViewImpl::graph_
Graph graph_
Definition: DDCompactViewImpl.h:45
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
DDRotation
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
DDCompactViewImpl::swap
void swap(DDCompactViewImpl &)
Definition: DDCompactViewImpl.cc:43
DDCompactViewImpl::position
void position(const DDLogicalPart &self, const DDLogicalPart &parent, int copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div)
Definition: DDCompactViewImpl.cc:33
math::Graph::edges
edge_range edges(index_type nodeIndex)
Definition: Graph.h:240
class-composition.parent
parent
Definition: class-composition.py:88
math::Graph< DDLogicalPart, DDPosData * >::edge_range
std::pair< edge_iterator, edge_iterator > edge_range
Definition: Graph.h:115