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  double weight(const DDLogicalPart & p) const;
117 
119  void algoPosPart(const DDLogicalPart & self,
120  const DDLogicalPart & parent,
121  DDAlgo & algo
122  );
123 
124  void position (const DDLogicalPart & self,
125  const DDLogicalPart & parent,
126  std::string copyno,
127  const DDTranslation & trans,
128  const DDRotation & rot,
129  const DDDivision * div = NULL);
130 
131  void position (const DDLogicalPart & self,
132  const DDLogicalPart & parent,
133  int copyno,
134  const DDTranslation & trans,
135  const DDRotation & rot,
136  const DDDivision * div = NULL);
137 
138  // ************************************************************************
139  // UNSTABLE STUFF below! DON'T USE!
140  // ************************************************************************
141 
143  void setRoot(const DDLogicalPart & root);
144 
146  walker_type walker() const;
147 
148  // ---------------------------------------------------------------
149  // +++ DDCore INTERNAL USE ONLY ++++++++++++++++++++++++++++++++++
150 
151  // to modify the structure! DDCore internal!
153 
154  void swap( DDCompactView& );
155 
156  void lockdown();
157 
158  protected:
160 
161  private:
162  // 2010-01-27 memory patch
163  // for copying and protecting DD Store's after parsing is complete.
169 
170 };
171 
174 #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: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 &)
DDI::Store< DDName, DDI::Solid * > solidStore_
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:88
::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
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