1 #ifndef CondCore_PoolDBOutputService_h 2 #define CondCore_PoolDBOutputService_h 50 bool isNewTagRequest(
const std::string& recordName );
55 if( !payload )
throwException(
"Provided payload pointer is invalid.",
"PoolDBOutputService::writeOne");
56 std::lock_guard<std::recursive_mutex>
lock(m_mutex);
57 if (!m_dbstarted) this->initDB();
58 Hash payloadId = m_session.storePayload( *payload );
60 if (isNewTagRequest(recordName) ){
61 createNewIOV(payloadId, payloadType, time, endOfTime(), recordName, withlogging);
63 appendSinceTime(payloadId, time, recordName, withlogging);
69 bool withlogging=
false);
77 bool withlogging=
false){
78 if( !firstPayloadObj )
throwException(
"Provided payload pointer is invalid.",
"PoolDBOutputService::createNewIOV");
79 std::lock_guard<std::recursive_mutex>
lock(m_mutex);
80 if (!m_dbstarted) this->initDB();
81 createNewIOV( m_session.storePayload( *firstPayloadObj ),
82 cond::demangledName(
typeid(
T)),
89 void createNewIOV(
const std::string& firstPayloadId,
94 bool withlogging=
false);
97 void createNewIOV(
const std::string& firstPayloadId,
101 bool withlogging=
false);
107 bool withlogging=
false){
108 if( !payloadObj )
throwException(
"Provided payload pointer is invalid.",
"PoolDBOutputService::appendSinceTime");
109 appendSinceTime( m_session.storePayload( *payloadObj ),
119 void appendSinceTime(
const std::string& payloadId,
122 bool withlogging=
false);
142 void setLogHeaderForRecord(
const std::string& recordName,
189 void initDB(
bool dummy=
false );
204 std::vector< std::pair<std::string,std::string> >
m_newtags;
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::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)