CMS 3D CMS Logo

DDComparator.h

Go to the documentation of this file.
00001 #ifndef DDComparator_h
00002 #define DDComparator_h
00003 
00004 #include "DetectorDescription/Core/interface/DDExpandedView.h"
00005 #include "DetectorDescription/Core/interface/DDPartSelection.h"
00006 #include "DetectorDescription/Core/interface/DDLogicalPart.h"
00007 
00008 
00010 
00013 class DDCompareEqual // : public binary_function<DDGeoHistory,DDPartSelection,bool> 
00014 {
00015 public:
00016   DDCompareEqual(const DDGeoHistory & h, const DDPartSelection & s)
00017     : hist_(h), 
00018     partsel_(s), 
00019     hMax_(h.size()), 
00020     hIndex_(0), 
00021     sMax_(s.size()), 
00022     sIndex_(0), 
00023     sLp_(), 
00024     sCopyno_(0), 
00025     absResult_(hMax_>0 && sMax_>0 ) 
00026     { 
00027       // it makes only sense to compare if both std::vectors have at least one entry each.
00028         //std::cout << std::endl << std::endl << "COMPARATOR CREATED" << std::endl << std::endl;
00029       //DCOUT('U', "Comparator():\n  hist=" << h << "\n  PartSel=" << s);
00030     }
00031 
00032   bool operator() (const DDGeoHistory &, const DDPartSelection &);
00033   bool operator() ();
00034 
00035 protected:
00036   inline bool nextAnylogp();
00037   inline bool nextAnyposp();
00038   inline bool nextChildlogp();
00039   inline bool nextChildposp();
00040   
00041 private:
00042   DDCompareEqual();  
00043   const DDGeoHistory & hist_;
00044   const DDPartSelection & partsel_;
00045   DDGeoHistory::size_type const hMax_;
00046   DDGeoHistory::size_type hIndex_;
00047   DDPartSelection::size_type const sMax_;
00048   DDPartSelection::size_type sIndex_;
00049   DDLogicalPart sLp_;
00050   /*
00051   lpredir_type * hLp_;
00052   lpredir_type * sLp_;
00053   */
00054   int sCopyno_;
00055   bool absResult_;
00056 };
00057 
00058 
00059 #endif

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