CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/CondCore/Utilities/interface/CondBasicIter.h

Go to the documentation of this file.
00001 #ifndef CondIter_CondBasicIter_h
00002 #define CondIter_CondBasicIter_h
00003 #include "CondCore/Utilities/interface/CondPyInterface.h"
00004 #include <string>
00005 
00006 namespace cond {
00007   class DbSession;
00008 }
00009 
00010 class CondBasicIter{
00011 
00012 public:
00013   
00014   CondBasicIter();    
00015   ~CondBasicIter();    
00016   
00017   
00029   CondBasicIter(const std::string & NameDB,
00030                 const std::string & Tag,
00031                 const std::string & User,
00032                 const std::string & Pass,
00033                 const std::string & nameBlob = ""
00034                 );
00035 
00036   CondBasicIter(const std::string & NameDB,
00037                 const std::string & Tag,
00038                 const std::string & auth = ""
00039                 );
00040 
00041   void create(const std::string & NameDB,
00042               const std::string & Tag,
00043               const std::string & User,
00044               const std::string & Pass,
00045               const std::string & nameBlob = ""
00046               );
00047 
00048   void create(const std::string & NameDB,
00049               const std::string & Tag,
00050               const std::string & auth = ""
00051               );
00052   
00053   
00057   void setRange(unsigned int min,unsigned int max);
00058   
00059   
00064   void setMin(unsigned int min);
00065   
00070   void setMax(unsigned int max);
00071  
00075   unsigned int getTime() const;
00076   
00080   unsigned int getStartTime()  const;
00081   
00085   unsigned int getStopTime()  const;
00086   
00090   std::string const & getToken() const;
00091 
00092 
00093   bool init();
00094   bool forward();
00095   bool make();
00096   virtual bool load(cond::DbSession& sess, std::string const & token) =0;
00097   virtual void clear() =0;
00098 
00099 protected:
00100   cond::RDBMS rdbms;
00101   cond::CondDB db;
00102   cond::IOVProxy iov;
00103   cond::IOVProxy::const_iterator iter;
00104  
00105 private:
00106   cond::IOVRange::const_iterator m_begin;
00107   cond::IOVRange::const_iterator m_end;
00108   
00109 };
00110 
00111 
00112 #endif