00001 #ifndef CondCore_IOVService_IOVEditor_h 00002 #define CondCore_IOVService_IOVEditor_h 00003 #include <string> 00004 #include <vector> 00005 #include "CondCore/DBCommon/interface/Time.h" 00006 // 00007 // Package: CondCore/IOVService 00008 // Class : IOVEditor 00009 // 00013 // 00014 // Author: Zhen Xie 00015 // 00016 namespace cond{ 00017 class IOVEditor{ 00018 public: 00020 virtual ~IOVEditor(){} 00021 00022 virtual void create(cond::Time_t firstSince, 00023 cond::TimeType timetype) = 0; 00024 00025 00026 00028 virtual unsigned int insert( cond::Time_t tillTime, 00029 const std::string& payloadToken 00030 ) = 0; 00032 virtual unsigned int append( cond::Time_t sinceTime, 00033 const std::string& payloadToken 00034 ) = 0; 00036 virtual unsigned int 00037 freeInsert( cond::Time_t sinceTime , 00038 const std::string& payloadToken 00039 )=0; 00041 virtual void bulkInsert( std::vector< std::pair<cond::Time_t,std::string> >& values ) = 0; 00042 00044 virtual unsigned int deleteEntry(cond::Time_t time, 00045 bool withPayload=false ) = 0; 00046 00050 virtual unsigned int replaceInterval(cond::Time_t sinceTime, 00051 cond::Time_t tillTime, 00052 const std::string& payloadToken, 00053 bool deletePayload=false) = 0; 00054 00055 00057 virtual void updateClosure( cond::Time_t newtillTime ) = 0; 00058 virtual void deleteEntries( bool withPayload=false ) = 0; 00059 virtual void import( const std::string& sourceIOVtoken ) = 0; 00061 virtual std::string token() const = 0; 00062 protected: 00064 IOVEditor(){} 00065 }; 00066 }//ns cond 00067 #endif