CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/DetectorDescription/Core/interface/DDCompactViewImpl.h

Go to the documentation of this file.
00001 #ifndef DDCompactViewImpl_h
00002 #define DDCompactViewImpl_h
00003 
00004 //  IMPORTANT: DO NOT USE THIS:  It is here temporarily only to obey the rule that 
00005 //  any .h that includes a .h even if it is not meant to be a public interface must
00006 //  remain in the interface directory.  If you fix/move/change this please delete
00007 //  this comment!  -- Michael Case 2007-04-05
00008 
00009 #include "DetectorDescription/Core/interface/DDLogicalPart.h"
00010 #include "DetectorDescription/Core/interface/DDPosData.h"
00011 #include "DetectorDescription/Core/interface/graphwalker.h"
00012 
00013 class DDPartSelector;
00014 
00015 class DDCompactViewImpl 
00016 {
00017 public:
00018   
00019   typedef ::graph<DDLogicalPart, DDPosData* > GraphNav;
00020   explicit DDCompactViewImpl();
00021   DDCompactViewImpl(const DDLogicalPart & rootnodedata);
00022   ~DDCompactViewImpl();
00023   
00024   //reassigns root with no check!!!
00025   void setRoot(const DDLogicalPart & root) { root_=root; }
00026 
00027   const DDLogicalPart & root() const { return root_; }
00028   
00029   DDLogicalPart & current() const;
00030   
00031   //  std::pair<bool,DDPhysicalPart> goTo(const DDPartSelector &) const;
00032   
00033   //expnode_t * expand(const DDPartSelector & path) const;
00034  
00035   const GraphNav & graph() const { return graph_; }
00041   graphwalker<DDLogicalPart,DDPosData*> walker() const; 
00042   
00043   //double weight(DDLogicalPart &);
00044   double weight(const DDLogicalPart &) const;
00045 
00046   void position (const DDLogicalPart & self,
00047                  const DDLogicalPart & parent,
00048                  int copyno,
00049                  const DDTranslation & trans,
00050                  const DDRotation & rot,
00051                  const DDDivision * div);
00052 
00053   void swap( DDCompactViewImpl& );  
00060 protected:    
00061   // internal use ! (see comments in DDCompactView(bool)!)
00062   DDLogicalPart root_;
00063   GraphNav graph_;
00064 };
00065 #endif