Go to the documentation of this file.00001 #ifndef DDCompactView_h
00002 #define DDCompactView_h
00003
00004 #include <vector>
00005
00006
00007
00008 #include "DetectorDescription/Base/interface/Ptr.h"
00009
00010 #include "DetectorDescription/Core/interface/DDAlgo.h"
00011 #include "DetectorDescription/Core/interface/DDCompactViewImpl.h"
00012 #include "DetectorDescription/Core/interface/graphwalker.h"
00013
00014
00015 class DDPartSelector;
00016 class DDPhysicalPart;
00017 namespace DDI {
00018 class Material;
00019 class Solid;
00020 class LogicalPart;
00021 class Specific;
00022 }
00023
00024
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00045
00046
00048
00081 class DDCompactView
00082 {
00083
00084 public:
00086 typedef std::vector<DDLogicalPart> logchild_type;
00087
00089 typedef std::vector< std::pair<DDLogicalPart,DDPosData*> > poschildren_type;
00090
00092 typedef std::pair<DDLogicalPart,DDPosData*> pos_type;
00093
00095
00096 typedef graphwalker<DDLogicalPart,DDPosData*> walker_type;
00097
00099
00100
00102
00103 typedef ::graph<DDLogicalPart,DDPosData*> graph_type;
00104
00106 explicit DDCompactView();
00107
00109 explicit DDCompactView(const DDLogicalPart & rootnodedata);
00110
00111 ~DDCompactView();
00112
00114 const graph_type & graph() const;
00115
00117 const DDLogicalPart & root() const;
00118
00120 double weight(const DDLogicalPart & p) const;
00121
00123 void algoPosPart(const DDLogicalPart & self,
00124 const DDLogicalPart & parent,
00125 DDAlgo & algo
00126 );
00127
00128 void position (const DDLogicalPart & self,
00129 const DDLogicalPart & parent,
00130 std::string copyno,
00131 const DDTranslation & trans,
00132 const DDRotation & rot,
00133 const DDDivision * div = NULL);
00134
00135 void position (const DDLogicalPart & self,
00136 const DDLogicalPart & parent,
00137 int copyno,
00138 const DDTranslation & trans,
00139 const DDRotation & rot,
00140 const DDDivision * div = NULL);
00141
00142
00143
00144
00145
00147 void setRoot(const DDLogicalPart & root);
00148
00150 walker_type walker() const;
00151
00152
00153
00154
00155
00156 graph_type & writeableGraph();
00157
00158 void swap( DDCompactView& );
00159
00160 void lockdown();
00161
00162 protected:
00163 DDCompactViewImpl* rep_;
00164
00165 private:
00166
00167
00168 DDI::Store<DDName, DDI::Material*> matStore_;
00169 DDI::Store<DDName, DDI::Solid*> solidStore_;
00170 DDI::Store<DDName, DDI::LogicalPart*> lpStore_;
00171 DDI::Store<DDName, DDI::Specific*> specStore_;
00172 DDI::Store<DDName, DDRotationMatrix*> rotStore_;
00173
00174 };
00175
00177 typedef DDCompactView::walker_type walker_type;
00178 #endif