1 #ifndef CondCore_PoolDBOutputService_h 2 #define CondCore_PoolDBOutputService_h 49 bool isNewTagRequest(
const std::string& recordName);
55 throwException(
"Provided payload pointer is invalid.",
"PoolDBOutputService::writeOne");
56 std::lock_guard<std::recursive_mutex>
lock(m_mutex);
59 Hash payloadId = m_session.storePayload(*payload);
61 if (isNewTagRequest(recordName)) {
62 createNewIOV(payloadId, payloadType, time, endOfTime(), recordName, withlogging);
64 appendSinceTime(payloadId, time, recordName, withlogging);
69 void closeIOV(
Time_t lastTill,
const std::string& recordName,
bool withlogging =
false);
77 bool withlogging =
false) {
79 throwException(
"Provided payload pointer is invalid.",
"PoolDBOutputService::createNewIOV");
80 std::lock_guard<std::recursive_mutex>
lock(m_mutex);
83 createNewIOV(m_session.storePayload(*firstPayloadObj),
84 cond::demangledName(
typeid(
T)),
91 void createNewIOV(
const std::string& firstPayloadId,
96 bool withlogging =
false);
99 void createNewIOV(
const std::string& firstPayloadId,
103 bool withlogging =
false);
106 template <
typename T>
110 bool withlogging =
false) {
112 throwException(
"Provided payload pointer is invalid.",
"PoolDBOutputService::appendSinceTime");
113 appendSinceTime(m_session.storePayload(*payloadObj), sinceTime,
recordName, withlogging);
123 bool withlogging =
false);
143 void setLogHeaderForRecord(
const std::string& recordName,
181 void initDB(
bool dummy =
false);
196 std::vector<std::pair<std::string, std::string> >
m_newtags;
const TimeTypeSpecs timeTypeSpecs[]
std::map< std::string, cond::UserLogInfo > m_logheaders
std::vector< cond::Time_t > m_currentTimes
std::string classNameForTypeId(const std::type_info &typeInfo)
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
unsigned long long Time_t
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
cond::persistency::Session m_session
cond::TimeType m_timetype
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
std::vector< std::pair< std::string, std::string > > m_newtags
std::string timetypestr() const
std::recursive_mutex m_mutex
std::string const & className() const
cond::TimeType m_timetype
std::map< std::string, Record > m_callbacks
std::string m_timetypestr
void throwException(const std::string &message, const std::string &methodName)