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 
34 //MEC: these comments are kept from original... Will we ever do this? don't think so.
35 //FIXME: DDCompactView: check for proper acyclic directed graph structure!!
36 //FIXME:
37 //FIXME: X [A-X] ... LogicalPart
38 //FIXME: / \ | ... PosPart (directed parten to child)
39 //FIXME: A A
40 //FIXME: | |
41 //FIXME: B C
42 //FIXME:
43 //FIXME: THIS IS NOT ALLOWED, but currently can be specified using DDL ....
44 //FIXME:
45 
47 
81 {
82 public:
85 
87  explicit DDCompactView();
88 
90  explicit DDCompactView( const DDName& );
91 
92  ~DDCompactView();
93 
95  // NOTE: It cannot be used to modify the stores if they are locked.
96  explicit DDCompactView(const DDLogicalPart & rootnodedata);
97 
99  const Graph & graph() const;
100  GraphWalker walker() const;
101 
103  const DDLogicalPart & root() const;
104 
106  const DDPosData * worldPosition() const;
107 
108  void position (const DDLogicalPart & self,
109  const DDLogicalPart & parent,
110  const std::string& copyno,
111  const DDTranslation & trans,
112  const DDRotation & rot,
113  const DDDivision * div = nullptr);
114 
115  void position (const DDLogicalPart & self,
116  const DDLogicalPart & parent,
117  int copyno,
118  const DDTranslation & trans,
119  const DDRotation & rot,
120  const DDDivision * div = nullptr);
121 
122  void setRoot(const DDLogicalPart & root);
123 
124  void lockdown();
125 
126  private:
127  void swap( DDCompactView& );
128 
129  std::unique_ptr<DDCompactViewImpl> rep_;
130  std::unique_ptr<DDPosData> worldpos_ ;
131 
137 };
138 
139 #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:80
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:68
DDI::Store< DDName, std::unique_ptr< DDI::Solid > > solidStore_
std::unique_ptr< DDPosData > worldpos_
DDI::Store< DDName, std::unique_ptr< DDI::Specific > > specStore_
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
std::unique_ptr< DDCompactViewImpl > rep_
DDI::Store< DDName, std::unique_ptr< DDI::LogicalPart > > lpStore_
static int position[264][3]
Definition: ReadPGInfo.cc:509
DDI::Store< DDName, std::unique_ptr< DDI::Material > > matStore_
DDI::Store< DDName, std::unique_ptr< DDRotationMatrix > > rotStore_