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 
9 
10 
11 class DDPartSelector;
12 class DDPhysicalPart;
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  //:typedef GraphWalker<DDLogicalPart,DDPosData*> walker_type;
93 
95  //:typedef walker_type::value_type value_type;
96 
98 
99  typedef ::graph<DDLogicalPart,DDPosData*> graph_type;
100 
102  explicit DDCompactView();
103 
105  explicit DDCompactView(const DDLogicalPart & rootnodedata);
106 
107  ~DDCompactView();
108 
110  const graph_type & graph() const;
111 
113  const DDLogicalPart & root() const;
114 
116  const DDPosData * worldPosition() const;
117 
119  double weight(const DDLogicalPart & p) const;
120 
122  void algoPosPart(const DDLogicalPart & self,
123  const DDLogicalPart & parent,
124  DDAlgo & algo
125  );
126 
127  void position (const DDLogicalPart & self,
128  const DDLogicalPart & parent,
129  std::string copyno,
130  const DDTranslation & trans,
131  const DDRotation & rot,
132  const DDDivision * div = NULL);
133 
134  void position (const DDLogicalPart & self,
135  const DDLogicalPart & parent,
136  int copyno,
137  const DDTranslation & trans,
138  const DDRotation & rot,
139  const DDDivision * div = NULL);
140 
141  // ************************************************************************
142  // UNSTABLE STUFF below! DON'T USE!
143  // ************************************************************************
144 
146  void setRoot(const DDLogicalPart & root);
147 
149  walker_type walker() const;
150 
151  // ---------------------------------------------------------------
152  // +++ DDCore INTERNAL USE ONLY ++++++++++++++++++++++++++++++++++
153 
154  // to modify the structure! DDCore internal!
156 
157  void swap( DDCompactView& );
158 
159  void lockdown();
160 
161  private:
162  std::unique_ptr<DDCompactViewImpl> rep_;
163  std::unique_ptr<DDPosData> worldpos_ ;
164 
165  // 2010-01-27 memory patch
166  // for copying and protecting DD Store's after parsing is complete.
172 
173 };
174 
177 #endif
Relative position of a child-volume inside a parent-volume.
Definition: DDPosData.h:16
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.
void algoPosPart(const DDLogicalPart &self, const DDLogicalPart &parent, DDAlgo &algo)
positioning...
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)
Definition: DDAlgo.h:17
#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
not used
Definition: DDCompactView.h:99
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
not used
Definition: DDCompactView.h:92