CMS 3D CMS Logo

DDExpandedView.h

Go to the documentation of this file.
00001 #ifndef DDExpandedView_h
00002 #define DDExpandedView_h
00003 
00004 #include <iostream>
00005 #include <vector>
00006 #include <string>
00007 #include <map>
00008 
00009 #include "DetectorDescription/Core/interface/DDTransform.h"
00010 #include "DetectorDescription/Base/interface/DDTranslation.h"
00011 #include "DetectorDescription/Core/interface/DDCompactView.h"
00012 #include "DetectorDescription/Core/interface/DDLogicalPart.h"
00013 #include "DetectorDescription/Core/interface/DDPosData.h"
00014 #include "DetectorDescription/Core/interface/DDExpandedNode.h"
00015 #include "DetectorDescription/Core/interface/DDsvalues.h"
00016 
00017 class DDFilteredView;
00018 
00029 
00030 
00035 class DDExpandedView
00036 {
00037   friend class DDFilteredView;
00038   
00039 public:
00041   typedef std::vector<int> nav_type;
00042   
00044   DDExpandedView(const DDCompactView &);
00045   
00046   virtual ~DDExpandedView();
00047   
00049   const DDLogicalPart & logicalPart() const;
00050   
00052   const DDTranslation & translation() const;
00053   
00055   const DDRotationMatrix & rotation() const;
00056   
00058   const DDGeoHistory & geoHistory() const;
00059   
00061   bool goTo(const nav_type &);
00062   
00064   nav_type navPos() const;
00065   
00067   nav_type copyNumbers() const;
00068   
00070   std::vector<const DDsvalues_type * > specifics() const;
00071   void specificsV(std::vector<const DDsvalues_type * > & vc ) const;
00072 
00073   DDsvalues_type mergedSpecifics() const;
00074   void mergedSpecificsV(DDsvalues_type & res) const;
00075   
00077   int copyno() const;
00078   
00079   // navigation 
00080 
00082   const DDGeoHistory & scope() const;
00083   
00085   bool setScope(const DDGeoHistory & hist, int depth=0);
00086   
00088   void clearScope();
00089   
00091   int depth() const;
00092     
00094   bool next(); 
00095   
00097   bool nextB();
00098   
00100   bool nextSibling();
00101   
00103   bool firstChild();
00104   
00106   bool parent();
00107   
00109   //bool hasChildren() const;
00110   
00112   void reset();
00113   
00119   /* was protected, now public; was named goTo, now goToHistory*/
00120   bool goToHistory(const DDGeoHistory & sc);
00121   
00122 protected:
00123   bool descend(const DDGeoHistory & sc);
00124 
00125 protected:
00126   DDCompactView::walker_type * walker_; 
00127   DDCompactView::walker_type w2_;
00128   const DDTranslation trans_;
00129   const DDRotationMatrix rot_;
00130   DDGeoHistory history_; 
00131   DDGeoHistory scope_; 
00132   unsigned int depth_; 
00133   DDPosData * worldpos_ ; 
00134   std::vector<nav_type> nextBStack_;
00135   //std::map<std::string,std::string> dummySpecifics_;    
00136 };
00137 
00138 std::ostream & operator<<(std::ostream &, const DDExpandedView::nav_type &);
00139 #endif

Generated on Tue Jun 9 17:31:58 2009 for CMSSW by  doxygen 1.5.4