test
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 
7 # include <vector>
8 
10 class DDPartSelector;
11 class DDPhysicalPart;
12 
13 namespace DDI {
14  class Material;
15  class Solid;
16  class LogicalPart;
17  class Specific;
18 }
19 
20 
27 //MEC: these comments are kept from original... Will we ever do this? don't think so.
28 //FIXME: DDCompactView: check for proper acyclic directed graph structure!!
29 //FIXME:
30 //FIXME: X [A-X] ... LogicalPart
31 //FIXME: / \ | ... PosPart (directed parten to child)
32 //FIXME: A A
33 //FIXME: | |
34 //FIXME: B C
35 //FIXME:
36 //FIXME: THIS IS NOT ALLOWED, but currently can be specified using DDL ....
37 //FIXME:
38 
39 //typedef TreeNode<DDPhysicalPart,int> expnode_t;
41 //typedef graph<DDLogicalPart,DDPosData*> graph_type; //:typedef Graph<DDLogicalPart,DDPosData*> graph_type;
42 
44 
78 {
79 
80 public:
82  typedef std::vector<DDLogicalPart> logchild_type;
83 
85  typedef std::vector< std::pair<DDLogicalPart,DDPosData*> > poschildren_type;
86 
88  typedef std::pair<DDLogicalPart,DDPosData*> pos_type;
89 
91 
93 
94  typedef ::graph<DDLogicalPart,DDPosData*> graph_type;
95 
97  explicit DDCompactView();
98 
100  explicit DDCompactView(const DDLogicalPart & rootnodedata);
101 
102  ~DDCompactView();
103 
105  const graph_type & graph() const;
106 
108  const DDLogicalPart & root() const;
109 
111  const DDPosData * worldPosition() const;
112 
114  double weight(const DDLogicalPart & p) const;
115 
116  void position (const DDLogicalPart & self,
117  const DDLogicalPart & parent,
118  std::string copyno,
119  const DDTranslation & trans,
120  const DDRotation & rot,
121  const DDDivision * div = NULL);
122 
123  void position (const DDLogicalPart & self,
124  const DDLogicalPart & parent,
125  int copyno,
126  const DDTranslation & trans,
127  const DDRotation & rot,
128  const DDDivision * div = NULL);
129 
130  // ************************************************************************
131  // UNSTABLE STUFF below! DON'T USE!
132  // ************************************************************************
133 
135  void setRoot(const DDLogicalPart & root);
136 
138  walker_type walker() const;
139 
140  // ---------------------------------------------------------------
141  // +++ DDCore INTERNAL USE ONLY ++++++++++++++++++++++++++++++++++
142 
143  // to modify the structure! DDCore internal!
145 
146  void swap( DDCompactView& );
147 
148  void lockdown();
149 
150  private:
151  std::unique_ptr<DDCompactViewImpl> rep_;
152  std::unique_ptr<DDPosData> worldpos_ ;
153 
154  // 2010-01-27 memory patch
155  // for copying and protecting DD Store's after parsing is complete.
161 
162 };
163 
166 #endif
Relative position of a child-volume inside a parent-volume.
Definition: DDPosData.h:13
DDCompactView()
Creates a compact-view.
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:85
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:77
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:88
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
type of representation of the compact-view (acyclic directed multigraph)
Definition: DDCompactView.h:94
std::vector< DDLogicalPart > logchild_type
container-type of children of a given node in the compact-view
Definition: DDCompactView.h:82
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
Definition: DDCompactView.h:90