00001 #ifndef CondCore_IOVService_IOVServiceImpl_h
00002 #define CondCore_IOVService_IOVServiceImpl_h
00003 #include <string>
00004 #include <map>
00005 #include "CondCore/DBCommon/interface/TypedRef.h"
00006 #include "CondCore/DBCommon/interface/Time.h"
00007 #include "IOV.h"
00008 namespace cond{
00009 class PoolStorageManager;
00010 class IOVIterator;
00011 class IOVEditor;
00012 class IOVServiceImpl{
00013 public:
00014 IOVServiceImpl(cond::PoolTransaction& pooldb);
00015
00016 ~IOVServiceImpl();
00017
00018 std::string payloadToken( const std::string& iovToken,
00019 cond::Time_t currenttime );
00020
00021 bool isValid( const std::string& iovToken,
00022 cond::Time_t currenttime );
00023
00024 std::pair<cond::Time_t, cond::Time_t>
00025 validity( const std::string& iovToken, cond::Time_t currenttime );
00026
00027 std::string payloadContainerName( const std::string& iovtoken );
00028
00029 void deleteAll(bool withPayload);
00030
00031 cond::TimeType timeType() const;
00032 cond::Time_t globalSince() const;
00033 cond::Time_t globalTill() const;
00034
00035 std::string exportIOVWithPayload( cond::PoolTransaction& destDB,
00036 const std::string& iovToken );
00037
00038
00039 std::string exportIOVRangeWithPayload( cond::PoolTransaction& destDB,
00040 const std::string& iovToken,
00041 const std::string& destToken,
00042 cond::Time_t since,
00043 cond::Time_t till );
00044 private:
00045 cond::PoolTransaction* m_pooldb;
00046 std::map< std::string,cond::IOV* > m_iovcache;
00047 };
00048
00049 }
00050 #endif