Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:23

0001 #ifndef DETECTOR_DESCRIPTION_CORE_DD_COMPACT_VIEW_IMPL_H
0002 #define DETECTOR_DESCRIPTION_CORE_DD_COMPACT_VIEW_IMPL_H
0003 
0004 #include "DetectorDescription/Core/interface/DDTranslation.h"
0005 #include "DetectorDescription/Core/interface/DDLogicalPart.h"
0006 #include "DetectorDescription/Core/interface/DDPosData.h"
0007 #include "DetectorDescription/Core/interface/DDTransform.h"
0008 #include "DataFormats/Math/interface/Graph.h"
0009 #include "DataFormats/Math/interface/GraphWalker.h"
0010 
0011 class DDDivision;
0012 struct DDPosData;
0013 
0014 class DDCompactViewImpl {
0015 public:
0016   using Graph = math::Graph<DDLogicalPart, DDPosData*>;
0017   using GraphWalker = math::GraphWalker<DDLogicalPart, DDPosData*>;
0018 
0019   explicit DDCompactViewImpl();
0020   DDCompactViewImpl(const DDLogicalPart& rootnodedata);
0021   ~DDCompactViewImpl();
0022 
0023   //reassigns root with no check!!!
0024   void setRoot(const DDLogicalPart& root) { root_ = root; }
0025 
0026   const DDLogicalPart& root() const { return root_; }
0027 
0028   DDLogicalPart& current() const;
0029 
0030   const Graph& graph() const { return graph_; }
0031   GraphWalker walker() const;
0032 
0033   void position(const DDLogicalPart& self,
0034                 const DDLogicalPart& parent,
0035                 int copyno,
0036                 const DDTranslation& trans,
0037                 const DDRotation& rot,
0038                 const DDDivision* div);
0039 
0040   void swap(DDCompactViewImpl&);
0041 
0042 protected:
0043   // internal use ! (see comments in DDCompactView(bool)!)
0044   DDLogicalPart root_;
0045   Graph graph_;
0046 };
0047 
0048 #endif