CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/DetectorDescription/Core/interface/DDScope.h

Go to the documentation of this file.
00001 #ifndef DDCore_DDScope_h
00002 #define DDCore_DDScope_h
00003 
00004 #include <vector>
00005 #include "DetectorDescription/Core/interface/DDExpandedNode.h"
00006 
00007 enum dd_scope_class { different_branch, subtree, supertree, delete_action };
00008 
00010 
00017 struct DDScopeClassification
00018 {
00019   dd_scope_class operator()( const DDGeoHistory &, const DDGeoHistory & ) const;
00020 };  
00021 
00023 
00026 class DDScope
00027 {
00028   friend std::ostream & operator<<( std::ostream &, const DDScope & );
00029   
00030 public:
00031   typedef std::vector<DDGeoHistory> scope_type;
00032   
00034   DDScope( void );
00035   
00037   DDScope( const DDGeoHistory &, int depth = 0 );
00038   
00039   ~DDScope( void );
00040   
00042 
00045   bool addScope( const DDGeoHistory & s );
00046   
00048   void setDepth( int );  
00049   
00051   int depth( void ) const;
00052   
00054   const scope_type & scope( void ) const;
00055   
00056 protected:
00057   scope_type subtrees_;
00058   DDScopeClassification classify_;
00059   int depth_;
00060 };
00061 
00062 std::ostream & operator<<( std::ostream &, const DDScope & );
00063 
00064 #endif