CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDCompactView.h
Go to the documentation of this file.
1 #ifndef DDCompactView_h
2 #define DDCompactView_h
3 
4 #include <vector>
5 
8 
9 
10 class DDPartSelector;
11 class DDPhysicalPart;
12 namespace DDI {
13  class Material;
14  class Solid;
15  class LogicalPart;
16  class Specific;
17 }
18 
19 
26 //MEC: these comments are kept from original... Will we ever do this? don't think so.
27 //FIXME: DDCompactView: check for proper acyclic directed graph structure!!
28 //FIXME:
29 //FIXME: X [A-X] ... LogicalPart
30 //FIXME: / \ | ... PosPart (directed parten to child)
31 //FIXME: A A
32 //FIXME: | |
33 //FIXME: B C
34 //FIXME:
35 //FIXME: THIS IS NOT ALLOWED, but currently can be specified using DDL ....
36 //FIXME:
37 
38 //typedef TreeNode<DDPhysicalPart,int> expnode_t;
40 //typedef graph<DDLogicalPart,DDPosData*> graph_type; //:typedef Graph<DDLogicalPart,DDPosData*> graph_type;
41 
43 
77 {
78 
79 public:
81  typedef std::vector<DDLogicalPart> logchild_type;
82 
84  typedef std::vector< std::pair<DDLogicalPart,DDPosData*> > poschildren_type;
85 
87  typedef std::pair<DDLogicalPart,DDPosData*> pos_type;
88 
90  //:typedef GraphWalker<DDLogicalPart,DDPosData*> walker_type;
92 
94  //:typedef walker_type::value_type value_type;
95 
97 
98  typedef ::graph<DDLogicalPart,DDPosData*> graph_type;
99 
101  explicit DDCompactView();
102 
104  explicit DDCompactView(const DDLogicalPart & rootnodedata);
105 
106  ~DDCompactView();
107 
109  const graph_type & graph() const;
110 
112  const DDLogicalPart & root() const;
113 
115  const DDPosData * worldPosition() const;
116 
118  double weight(const DDLogicalPart & p) const;
119 
120  void position (const DDLogicalPart & self,
121  const DDLogicalPart & parent,
122  std::string copyno,
123  const DDTranslation & trans,
124  const DDRotation & rot,
125  const DDDivision * div = NULL);
126 
127  void position (const DDLogicalPart & self,
128  const DDLogicalPart & parent,
129  int copyno,
130  const DDTranslation & trans,
131  const DDRotation & rot,
132  const DDDivision * div = NULL);
133 
134  // ************************************************************************
135  // UNSTABLE STUFF below! DON'T USE!
136  // ************************************************************************
137 
139  void setRoot(const DDLogicalPart & root);
140 
142  walker_type walker() const;
143 
144  // ---------------------------------------------------------------
145  // +++ DDCore INTERNAL USE ONLY ++++++++++++++++++++++++++++++++++
146 
147  // to modify the structure! DDCore internal!
149 
150  void swap( DDCompactView& );
151 
152  void lockdown();
153 
154  private:
155  std::unique_ptr<DDCompactViewImpl> rep_;
156  std::unique_ptr<DDPosData> worldpos_ ;
157 
158  // 2010-01-27 memory patch
159  // for copying and protecting DD Store's after parsing is complete.
165 
166 };
167 
170 #endif
Relative position of a child-volume inside a parent-volume.
Definition: DDPosData.h:13
DDCompactView()
Creates a compact-view.
list parent
Definition: dbtoconf.py:74
double weight(const DDLogicalPart &p) const
Prototype version of calculating the weight of a detector component.
DDCompactView::walker_type walker_type
global type for a compact-view walker
std::vector< std::pair< DDLogicalPart, DDPosData * > > poschildren_type
container-type of pairs of children nodes and their relative position data of a given node in the com...
Definition: DDCompactView.h:84
const graph_type & graph() const
Provides read-only access to the data structure of the compact-view.
void position(const DDLogicalPart &self, const DDLogicalPart &parent, std::string copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=NULL)
#define NULL
Definition: scimark2.h:8
graph_type & writeableGraph()
type of data representation of DDCompactView
Definition: DDCompactView.h:76
void setRoot(const DDLogicalPart &root)
don&#39;t use : interface not stable ....
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:66
std::pair< DDLogicalPart, DDPosData * > pos_type
pair ...
Definition: DDCompactView.h:87
DDI::Store< DDName, DDI::Specific * > specStore_
void swap(DDCompactView &)
std::unique_ptr< DDPosData > worldpos_
DDI::Store< DDName, DDI::Solid * > solidStore_
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:88
std::unique_ptr< DDCompactViewImpl > rep_
::graph< DDLogicalPart, DDPosData * > graph_type
not used
Definition: DDCompactView.h:98
std::vector< DDLogicalPart > logchild_type
container-type of children of a given node in the compact-view
Definition: DDCompactView.h:81
const DDPosData * worldPosition() const
The absolute position of the world.
DDI::Store< DDName, DDRotationMatrix * > rotStore_
walker_type walker() const
dont&#39;t use ! Proper implementation missing ...
const DDLogicalPart & root() const
returns the DDLogicalPart representing the root of the geometrical hierarchy
DDI::Store< DDName, DDI::LogicalPart * > lpStore_
DDI::Store< DDName, DDI::Material * > matStore_
graphwalker< DDLogicalPart, DDPosData * > walker_type
not used
Definition: DDCompactView.h:91