Go to the documentation of this file. 1 #ifndef CondCore_PoolDBOutputService_h
2 #define CondCore_PoolDBOutputService_h
65 throwException(
"Provided payload pointer is invalid.",
"PoolDBOutputService::writeOne");
66 std::lock_guard<std::recursive_mutex>
lock(
m_mutex);
69 Hash thePayloadHash(
"");
81 if (
time <= lastSince) {
83 <<
", because is less or equal to last available since = " << lastSince;
87 return thePayloadHash;
108 return thePayloadHash;
115 template <
typename T>
120 if (!firstPayloadObj)
121 throwException(
"Provided payload pointer is invalid.",
"PoolDBOutputService::createNewIOV");
122 std::lock_guard<std::recursive_mutex>
lock(
m_mutex);
132 createNewIOV(payloadId, cond::demangledName(
typeid(
T)), firstSinceTime, myrecord);
140 template <
typename T>
143 throwException(
"Provided payload pointer is invalid.",
"PoolDBOutputService::appendSinceTime");
144 std::lock_guard<std::recursive_mutex>
lock(
m_mutex);
148 "PoolDBOutputService::appendSinceTime");
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
EchoedLogStream< edm::LogInfo > logInfo()
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)
EchoedLogStream< edm::LogWarning > logWarning()
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::persistency::Logger m_logger
cond::Time_t endOfTime() const
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)
cond::persistency::Logger & logger()
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)