CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/CondCore/IOVService/interface/IOVService.h

Go to the documentation of this file.
00001 #ifndef CondCore_IOVService_IOVService_h
00002 #define CondCore_IOVService_IOVService_h
00003 #include <string>
00004 #include "CondCore/DBCommon/interface/Time.h"
00005 #include "CondCore/DBCommon/interface/DbSession.h"
00006 #include "CondFormats/Common/interface/IOVSequence.h"
00007 
00008 namespace cond{
00009   class IOVEditor;
00010   class IOVService{
00011   public:
00012 
00013     IOVService(cond::DbSession& dbSess);
00014     
00015     virtual ~IOVService();
00016 
00017     std::string payloadToken( const std::string& iovToken,
00018                               cond::Time_t currenttime );
00019 
00020     bool isValid( const std::string& iovToken,
00021                   cond::Time_t currenttime );
00022 
00023     std::pair<cond::Time_t, cond::Time_t>
00024     validity( const std::string& iovToken, cond::Time_t currenttime );
00025     
00026     std::string payloadContainerName( const std::string& iovtoken );
00027     
00028     cond::TimeType timeType( const std::string& iovToken );
00029     
00030     void deleteAll( bool withPayload=false );
00031 
00032 
00037     IOVEditor* newIOVEditor( const std::string& token="" );
00038 
00044     std::string exportIOVWithPayload( cond::DbSession& destDB,
00045                                       const std::string& iovToken );
00051     std::string exportIOVRangeWithPayload( cond::DbSession& destDB,
00052                                            const std::string& iovToken,
00053                                            const std::string& destToken,
00054                                            cond::Time_t since,
00055                                            cond::Time_t till,
00056                                            bool outOfOrder
00057                                            );
00058     
00059   private:
00060     cond::IOVSequence const & iovSeq(const std::string& iovToken);
00061     
00062     cond::DbSession m_dbSess;
00063     std::string m_token;
00064     boost::shared_ptr<cond::IOVSequence> m_iov;
00065   };
00066 
00067 }//ns cond
00068 #endif