CMS 3D CMS Logo

IOVEditorImpl.h

Go to the documentation of this file.
00001 #ifndef CondCore_IOVService_IOVEditorImpl_h
00002 #define CondCore_IOVService_IOVEditorImpl_h
00003 #include "CondCore/IOVService/interface/IOVEditor.h"
00004 #include "CondCore/DBCommon/interface/TypedRef.h"
00005 
00006 namespace cond{
00007   class PoolTransaction;
00008   class IOV;
00009 
00010   class IOVEditorImpl : virtual public cond::IOVEditor{
00011   public:
00012     // constructor from existing iov
00013     IOVEditorImpl( cond::PoolTransaction& pooldb,
00014                    const std::string& token);
00016     virtual ~IOVEditorImpl();
00017 
00019     void create(cond::Time_t firstSince,
00020                          cond::TimeType timetype);
00021 
00023     virtual unsigned int insert( cond::Time_t tillTime,
00024                                  const std::string& payloadToken
00025                                  );
00026 
00027     void bulkInsert( std::vector< std::pair<cond::Time_t,std::string> >& values );
00028 
00029     virtual void updateClosure( cond::Time_t newtillTime );
00030 
00032     virtual unsigned int append(  cond::Time_t sinceTime,
00033                                   const std::string& payloadToken
00034                                   );
00035     
00037     unsigned int 
00038     freeInsert(cond::Time_t sinceTime ,
00039                const std::string& payloadToken
00040               );
00041 
00042     // delete entry at a given time
00043     virtual  unsigned int deleteEntry(cond::Time_t time,
00044                                         bool withPayload=false );
00045 
00046 
00047     virtual unsigned int replaceInterval(cond::Time_t sinceTime,
00048                                          cond::Time_t tillTime,
00049                                          const std::string& payloadToken,
00050                                          bool deletePayload=false);
00051     
00052 
00053     virtual void deleteEntries( bool withPayload=false );
00054 
00055     virtual void import( const std::string& sourceIOVtoken );
00056 
00057     std::string token() const {
00058       return m_token;
00059     }
00060 
00061     cond::Time_t firstSince() const;
00062     
00063     cond::TimeType timetype() const;
00064 
00065   private:
00066     void init();
00067     bool validTime(cond::Time_t time, cond::TimeType timetype) const;
00068     bool validTime(cond::Time_t time) const;
00069 
00070     cond::PoolTransaction* m_pooldb;
00071     std::string m_token;
00072     bool m_isActive;
00073     cond::TypedRef<cond::IOV> m_iov;
00074   };
00075 }//ns cond
00076 #endif

Generated on Tue Jun 9 17:26:08 2009 for CMSSW by  doxygen 1.5.4