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 
6 //#include <memory>
7 
9 
13 
14 
15 class DDPartSelector;
16 class DDPhysicalPart;
17 namespace DDI {
18  class Material;
19  class Solid;
20  class LogicalPart;
21  class Specific;
22 }
23 
24 
31 //MEC: these comments are kept from original... Will we ever do this? don't think so.
32 //FIXME: DDCompactView: check for proper acyclic directed graph structure!!
33 //FIXME:
34 //FIXME: X [A-X] ... LogicalPart
35 //FIXME: / \ | ... PosPart (directed parten to child)
36 //FIXME: A A
37 //FIXME: | |
38 //FIXME: B C
39 //FIXME:
40 //FIXME: THIS IS NOT ALLOWED, but currently can be specified using DDL ....
41 //FIXME:
42 
43 //typedef TreeNode<DDPhysicalPart,int> expnode_t;
45 //typedef graph<DDLogicalPart,DDPosData*> graph_type; //:typedef Graph<DDLogicalPart,DDPosData*> graph_type;
46 
48 
82 {
83 
84 public:
86  typedef std::vector<DDLogicalPart> logchild_type;
87 
89  typedef std::vector< std::pair<DDLogicalPart,DDPosData*> > poschildren_type;
90 
92  typedef std::pair<DDLogicalPart,DDPosData*> pos_type;
93 
95  //:typedef GraphWalker<DDLogicalPart,DDPosData*> walker_type;
97 
99  //:typedef walker_type::value_type value_type;
100 
102 
103  typedef ::graph<DDLogicalPart,DDPosData*> graph_type;
104 
106  explicit DDCompactView();
107 
109  explicit DDCompactView(const DDLogicalPart & rootnodedata);
110 
111  ~DDCompactView();
112 
114  const graph_type & graph() const;
115 
117  const DDLogicalPart & root() const;
118 
120  double weight(const DDLogicalPart & p) const;
121 
123  void algoPosPart(const DDLogicalPart & self,
124  const DDLogicalPart & parent,
125  DDAlgo & algo
126  );
127 
128  void position (const DDLogicalPart & self,
129  const DDLogicalPart & parent,
130  std::string copyno,
131  const DDTranslation & trans,
132  const DDRotation & rot,
133  const DDDivision * div = NULL);
134 
135  void position (const DDLogicalPart & self,
136  const DDLogicalPart & parent,
137  int copyno,
138  const DDTranslation & trans,
139  const DDRotation & rot,
140  const DDDivision * div = NULL);
141 
142  // ************************************************************************
143  // UNSTABLE STUFF below! DON'T USE!
144  // ************************************************************************
145 
147  void setRoot(const DDLogicalPart & root);
148 
150  walker_type walker() const;
151 
152  // ---------------------------------------------------------------
153  // +++ DDCore INTERNAL USE ONLY ++++++++++++++++++++++++++++++++++
154 
155  // to modify the structure! DDCore internal!
157 
158  void swap( DDCompactView& );
159 
160  void lockdown();
161 
162  protected:
164 
165  private:
166  // 2010-01-27 memory patch
167  // for copying and protecting DD Store's after parsing is complete.
173 
174 };
175 
178 #endif
DDCompactView()
Creates a compact-view.
list parent
Definition: dbtoconf.py:74
DDCompactViewImpl * rep_
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:89
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:21
#define NULL
Definition: scimark2.h:8
graph_type & writeableGraph()
type of data representation of DDCompactView
Definition: DDCompactView.h:81
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:92
DDI::Store< DDName, DDI::Specific * > specStore_
void swap(DDCompactView &)
DDI::Store< DDName, DDI::Solid * > solidStore_
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:95
::graph< DDLogicalPart, DDPosData * > graph_type
not used
std::vector< DDLogicalPart > logchild_type
container-type of children of a given node in the compact-view
Definition: DDCompactView.h:86
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:96