|
|
Go to the documentation of this file. 1 #ifndef CondCore_PoolDBOutputService_h
2 #define CondCore_PoolDBOutputService_h
58 throwException(
"Provided payload pointer is invalid.",
"PoolDBOutputService::writeOne");
59 std::lock_guard<std::recursive_mutex>
lock(
m_mutex);
62 Hash thePayloadHash(
"");
73 if (
time <= lastSince) {
75 <<
", because is less or equal to last available since = " << lastSince;
78 return thePayloadHash;
99 return thePayloadHash;
106 template <
typename T>
111 if (!firstPayloadObj)
112 throwException(
"Provided payload pointer is invalid.",
"PoolDBOutputService::createNewIOV");
113 std::lock_guard<std::recursive_mutex>
lock(
m_mutex);
123 createNewIOV(payloadId, cond::demangledName(
typeid(
T)), firstSinceTime, myrecord);
131 template <
typename T>
134 throwException(
"Provided payload pointer is invalid.",
"PoolDBOutputService::appendSinceTime");
135 std::lock_guard<std::recursive_mutex>
lock(
m_mutex);
139 "PoolDBOutputService::appendSinceTime");
233 static constexpr
const char*
const MSGSOURCE =
"PoolDBOuputService";
Record & lookUpRecord(const std::string &recordName)
std::string tag(const std::string &recordName)
std::map< std::string, cond::UserLogInfo > m_logheaders
cond::Time_t beginOfTime() const
void eraseSinceTime(const std::string &payloadId, cond::Time_t sinceTime, const std::string &recordName)
cond::TimeType m_timetype
cond::TimeType m_timetype
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
bool tagInfo(const std::string &recordName, cond::TagInfo_t &result)
void preGlobalBeginLumi(edm::GlobalContext const &)
void appendSinceTime(const T *payloadObj, cond::Time_t sinceTime, const std::string &recordName)
void closeIOV(Time_t lastTill, const std::string &recordName)
std::map< std::string, Record > m_records
std::string timetypestr() const
cond::persistency::Session m_session
cond::UserLogInfo & lookUpUserLogInfo(const std::string &recordName)
const TimeTypeSpecs timeTypeSpecs[]
void createNewIOV(const T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t, const std::string &recordName)
cond::persistency::Session session() const
void preEventProcessing(edm::StreamContext const &)
bool m_onlyAppendUpdatePolicy
void doStartTransaction()
cond::persistency::ConnectionPool m_connection
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
void fillRecord(edm::ParameterSet &pset, const std::string &gTimeTypeStr)
void doCommitTransaction()
unsigned long long Time_t
bool getTagInfo(const std::string &recordName, cond::TagInfo_t &result)
unsigned int m_writeTransactionDelay
const Time_t MAX_VAL(std::numeric_limits< Time_t >::max())
std::vector< cond::Time_t > m_currentTimes
cond::Time_t endOfTime() const
static constexpr const char *const MSGSOURCE
cond::Hash storePayload(const T &payload, const boost::posix_time::ptime &creationTime=boost::posix_time::microsec_clock::universal_time())
Transaction & transaction()
void setLogHeaderForRecord(const std::string &recordName, const std::string &provenance, const std::string &usertext)
Hash writeOne(const T *payload, Time_t time, const std::string &recordName)
bool isNewTagRequest(const std::string &recordName)
virtual ~PoolDBOutputService()
cond::persistency::Session newReadOnlySession(const std::string &connectionString, const std::string &transactionId)
void preGlobalBeginRun(edm::GlobalContext const &)
std::recursive_mutex m_mutex
cond::Time_t currentTime() const
PoolDBOutputService(const edm::ParameterSet &iConfig, edm::ActivityRegistry &iAR)
void throwException(const std::string &message, const std::string &methodName)