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.");
60 std::shared_ptr<L1TriggerKeyList> pointer(keyList);
69 updateIOV(
"L1TriggerKeyListRcd", payloadToken, sinceRun, logTransactions);
75 bool logTransactions) {
80 throw cond::Exception(
"DataWriter: PoolDBOutputService not available.");
83 bool iovUpdated =
true;
87 poolDb->
createNewIOV(payloadToken, sinceRun, esRecordName);
90 poolDb->
tagInfo(esRecordName, tagInfo);
107 edm::LogVerbatim(
"L1-O2O") << esRecordName <<
" " << poolDb->
tag(esRecordName) <<
" SINCE " << sinceRun;
116 throw cond::Exception(
"DataWriter: PoolDBOutputService not available.");
128 auto iP =
iovs.find(runNumber);
129 if (iP !=
iovs.end()) {
130 payloadToken = (*iP).payloadId;
139 throw cond::Exception(
"DataWriter: PoolDBOutputService not available.");
143 poolDb->
tagInfo(recordName, tagInfo);
149 if (keyListToken.empty()) {
persistency::Exception Exception
Log< level::Info, true > LogVerbatim
void start(bool readOnly=true)
cond::persistency::Session session() const
Transaction & transaction()
std::string lastPayloadToken(const std::string &recordName)
std::string payloadToken(const std::string &recordName, edm::RunNumber_t runNumber)
std::string tag(const std::string &recordName)
void appendSinceTime(const T *payloadPtr, cond::Time_t sinceTime, const std::string &recordName)
bool isNewTagRequest(const std::string &recordName)
cond::Time_t beginOfTime() const
std::string writePayload(const edm::EventSetup &setup, const std::string &recordType)
void writeKeyList(L1TriggerKeyList *keyList, edm::RunNumber_t sinceRun=0, bool logTransactions=false)
bool fillLastTriggerKeyList(L1TriggerKeyList &output)
IOVProxy readIov(const std::string &tag)
void readObject(const std::string &payloadToken, T &outputObject)
cond::Hash storePayload(const T &payload, const boost::posix_time::ptime &creationTime=boost::posix_time::microsec_clock::universal_time())
bool updateIOV(const std::string &esRecordName, const std::string &payloadToken, edm::RunNumber_t sinceRun, bool logTransactions=false)
bool tagInfo(const std::string &recordName, cond::TagInfo_t &result)
void createNewIOV(const T *payloadPtr, cond::Time_t firstSinceTime, cond::Time_t, const std::string &recordName)