Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:54

0001 #ifndef LMFIOV_H
0002 #define LMFIOV_H
0003 
0004 /*
0005  Last updated by  Giovanni.Organtini@roma1.infn.it 2010
0006  */
0007 
0008 #include <string>
0009 #include <stdexcept>
0010 
0011 #include "OnlineDB/EcalCondDB/interface/LMFUnique.h"
0012 #include "OnlineDB/EcalCondDB/interface/EcalDBConnection.h"
0013 
0014 /**
0015  *   LMF IOV
0016  */
0017 class LMFIOV : public LMFUnique {
0018 public:
0019   friend class EcalCondDBInterface;  // need permission to write
0020 
0021   LMFIOV();
0022   LMFIOV(EcalDBConnection *c);
0023   LMFIOV(const oracle::occi::Environment *env, const oracle::occi::Connection *conn);
0024   ~LMFIOV() override;
0025 
0026   LMFIOV &setStart(const Tm &start);
0027   LMFIOV &setStop(const Tm &stop);
0028   LMFIOV &setIOV(const Tm &start, const Tm &stop);
0029   LMFIOV &setVmin(int vmin);
0030   LMFIOV &setVmax(int vmax);
0031   LMFIOV &setVersions(int vmin, int vmax);
0032 
0033   Tm getStart() const;
0034   Tm getStop() const;
0035   int getVmin() const;
0036   int getVmax() const;
0037 
0038   void dump() const override;
0039 
0040 private:
0041   // Methods from LMFUnique
0042   std::string writeDBSql(Statement *stmt) override;
0043   std::string fetchIdSql(Statement *stmt) override;
0044   //  std::string fetchAllSql(Statement *stmt) const;
0045   std::string setByIDSql(Statement *stmt, int id) override;
0046 
0047   void getParameters(ResultSet *rset) override;
0048   void fetchParentIDs() override {}
0049   LMFUnique *createObject() const override;
0050 
0051   Tm m_iov_start;
0052   Tm m_iov_stop;
0053   int m_vmin;
0054   int m_vmax;
0055 };
0056 
0057 #endif