CMS 3D CMS Logo

DDCompactView.h
Go to the documentation of this file.
1 #ifndef DETECTOR_DESCRIPTION_CORE_DD_COMPACT_VIEW_H
2 #define DETECTOR_DESCRIPTION_CORE_DD_COMPACT_VIEW_H
3 
4 #include <cstddef>
5 #include <memory>
6 #include <string>
7 #include <utility>
8 #include <vector>
9 
18 
19 class DDCompactViewImpl;
20 class DDDivision;
21 class DDName;
22 struct DDPosData;
23 
24 namespace DDI {
25  class LogicalPart;
26  class Material;
27  class Solid;
28  class Specific;
29 }
30 
37 //MEC: these comments are kept from original... Will we ever do this? don't think so.
38 //FIXME: DDCompactView: check for proper acyclic directed graph structure!!
39 //FIXME:
40 //FIXME: X [A-X] ... LogicalPart
41 //FIXME: / \ | ... PosPart (directed parten to child)
42 //FIXME: A A
43 //FIXME: | |
44 //FIXME: B C
45 //FIXME:
46 //FIXME: THIS IS NOT ALLOWED, but currently can be specified using DDL ....
47 //FIXME:
48 
50 
84 {
85 public:
88 
90  explicit DDCompactView();
91 
93  explicit DDCompactView(const DDLogicalPart & rootnodedata);
94 
95  ~DDCompactView();
96 
98  const Graph & graph() const;
99  GraphWalker walker() const;
100 
102  const DDLogicalPart & root() const;
103 
105  const DDPosData * worldPosition() const;
106 
107  void position (const DDLogicalPart & self,
108  const DDLogicalPart & parent,
109  const std::string& copyno,
110  const DDTranslation & trans,
111  const DDRotation & rot,
112  const DDDivision * div = nullptr);
113 
114  void position (const DDLogicalPart & self,
115  const DDLogicalPart & parent,
116  int copyno,
117  const DDTranslation & trans,
118  const DDRotation & rot,
119  const DDDivision * div = nullptr);
120 
121  // ************************************************************************
122  // UNSTABLE STUFF below! DON'T USE!
123  // ************************************************************************
124 
126  void setRoot(const DDLogicalPart & root);
127 
128  // ---------------------------------------------------------------
129  // +++ DDCore INTERNAL USE ONLY ++++++++++++++++++++++++++++++++++
130 
131  void swap( DDCompactView& );
132 
133  void lockdown();
134 
135  private:
136  std::unique_ptr<DDCompactViewImpl> rep_;
137  std::unique_ptr<DDPosData> worldpos_ ;
138 
144 };
145 
146 #endif
Relative position of a child-volume inside a parent-volume.
Definition: DDPosData.h:13
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:83
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:116
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:67
DDI::Store< DDName, DDI::Specific * > specStore_
std::unique_ptr< DDPosData > worldpos_
DDI::Store< DDName, DDI::Solid * > solidStore_
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:92
std::unique_ptr< DDCompactViewImpl > rep_
DDI::Store< DDName, DDRotationMatrix * > rotStore_
static int position[264][3]
Definition: ReadPGInfo.cc:509
DDI::Store< DDName, DDI::LogicalPart * > lpStore_
DDI::Store< DDName, DDI::Material * > matStore_