CMS 3D CMS Logo

AlgoPos.h

Go to the documentation of this file.
00001 #ifndef ExprAlgo_AlgoPos_h
00002 #define ExprAlgo_AlgoPos_h
00003 
00004 #include <iostream>
00005 #include <vector>
00006 #include <string>
00007 
00008 #include "DetectorDescription/Base/interface/DDAlgoPar.h"
00009 #include "DetectorDescription/Base/interface/DDTranslation.h"
00010 #include "DetectorDescription/Base/interface/DDRotationMatrix.h"
00011 //#include "DetectorDescription/Core/src/DDNamedObject.h"
00012 
00013 
00014 class AlgoImpl;
00015 class AlgoCheck;
00016 
00018 
00027 class AlgoPos
00028 {
00029   friend class AlgoImpl;
00030 public:  
00032   AlgoPos(AlgoCheck * check=0);
00033   //AlgoPos();
00034   
00036   ~AlgoPos();
00037 
00039   void setParameters(int start, int end, int incr,
00040                      const parS_type &, const parE_type &);
00041     
00043   bool go() const;
00044   
00046   void next();
00047     
00049 
00053   DD3Vector translation();
00054   
00056 
00060   DDRotationMatrix rotation();
00061   
00063   int copyno() const;
00064   
00066   void stream(std::ostream & os) const;
00067   
00069 
00078   void registerAlgo(AlgoImpl *);
00079   
00081   size_t numRegistered();
00082   
00083   int start() const { return start_; }
00084   int end() const { return end_; }
00085   int incr() const { return incr_; }
00086   const parS_type & parS() const { return ParS_; }
00087   const parE_type & parE() const { return ParE_; }
00088 
00089 protected:  
00091 
00095   void terminate();
00096 
00098 
00114   void checkTermination();
00115   
00117 
00125   bool select();
00126   //bool checkParameters();
00127 
00129 
00138   int start_, end_, incr_;
00139   
00141 
00146   int curr_;
00147   
00149 
00153   int count_;
00154   
00156 
00161   parS_type ParS_;
00162   
00164 
00169   parE_type ParE_;
00170   
00172   bool terminate_;
00173   
00175   std::string err_;
00176   
00178   std::vector<AlgoImpl*> regAlgos_;
00179   
00181   AlgoImpl * selAlgo_;
00182   
00184   AlgoCheck * checkAlgo_;
00185   
00186 private:
00187 };
00188 #endif

Generated on Tue Jun 9 17:32:21 2009 for CMSSW by  doxygen 1.5.4