17 std::unique_ptr<WriterProxy>
writer(factory->create(recordType +
"@Writer"));
18 if (
writer.get() ==
nullptr) {
19 throw cond::Exception(
"DataWriter: could not create WriterProxy with name " + recordType +
"@Writer");
24 throw cond::Exception(
"DataWriter: PoolDBOutputService not available.");
52 throw cond::Exception(
"DataWriter: PoolDBOutputService not available.");
61 std::shared_ptr<L1TriggerKeyListExt> pointer(keyList);
70 updateIOV(
"L1TriggerKeyListExtRcd", payloadToken, sinceRun, logTransactions);
76 bool logTransactions) {
81 throw cond::Exception(
"DataWriter: PoolDBOutputService not available.");
84 bool iovUpdated =
true;
91 poolDb->
tagInfo(esRecordName, tagInfo);
100 poolDb->
appendSinceTime(payloadToken, sinceRun, esRecordName, logTransactions);
108 edm::LogVerbatim(
"L1-O2O") << esRecordName <<
" " << poolDb->
tag(esRecordName) <<
" SINCE " << sinceRun;
117 throw cond::Exception(
"DataWriter: PoolDBOutputService not available.");
129 auto iP = iov.
find(runNumber);
130 if (iP != iov.
end()) {
131 payloadToken = (*iP).payloadId;
140 throw cond::Exception(
"DataWriter: PoolDBOutputService not available.");
144 poolDb->
tagInfo(recordName, tagInfo);
150 if (keyListToken.empty()) {
persistency::Exception Exception
void readObject(const std::string &payloadToken, T &outputObject)
bool fillLastTriggerKeyList(L1TriggerKeyListExt &output)
void start(bool readOnly=true)
cond::persistency::Session session() const
std::string lastPayloadToken(const std::string &recordName)
void writeKeyList(L1TriggerKeyListExt *keyList, edm::RunNumber_t sinceRun=0, bool logTransactions=false)
Transaction & transaction()
std::string tag(const std::string &recordName)
cond::ValidityInterval lastInterval
bool updateIOV(const std::string &esRecordName, const std::string &payloadToken, edm::RunNumber_t sinceRun, bool logTransactions=false)
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
IOVProxy readIov(const std::string &tag, bool full=false)
bool isNewTagRequest(const std::string &recordName)
cond::Time_t beginOfTime() const
std::string payloadToken(const std::string &recordName, edm::RunNumber_t runNumber)
Iterator find(cond::Time_t time)
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
void tagInfo(const std::string &recordName, cond::TagInfo_t &result)
std::string lastPayloadToken
cond::Time_t endOfTime() const
std::string writePayload(const edm::EventSetup &setup, const std::string &recordType)
cond::Hash storePayload(const T &payload, const boost::posix_time::ptime &creationTime=boost::posix_time::microsec_clock::universal_time())