21 writer_ = factory->create(recordType +
"@Writer");
23 throw cond::Exception(
"DataWriter: could not create WriterProxy with name " + recordType +
"@Writer");
26 <<
"Created new " <<
typeid(
writer_).
name() <<
" | address " <<
writer_.get() <<
" | rcd " << recordType;
36 throw cond::Exception(
"DataWriter: PoolDBOutputService not available.");
43 auto& writerRef = *
writer_.get();
52 if (writer.get() ==
nullptr) {
53 throw cond::Exception(
"DataWriter: could not create WriterProxy with name " + recordType +
"@Writer");
59 throw cond::Exception(
"DataWriter: PoolDBOutputService not available.");
75 auto& writerRef = *
writer_.get();
87 throw cond::Exception(
"DataWriter: PoolDBOutputService not available.");
96 std::shared_ptr<L1TriggerKeyListExt> pointer(keyList);
104 updateIOV(
"L1TriggerKeyListExtRcd", payloadToken, sinceRun, logTransactions);
110 bool logTransactions) {
115 throw cond::Exception(
"DataWriter: PoolDBOutputService not available.");
118 bool iovUpdated =
true;
122 poolDb->
createNewIOV(payloadToken, sinceRun, esRecordName);
125 poolDb->
tagInfo(esRecordName, tagInfo);
142 edm::LogVerbatim(
"L1-O2O") << esRecordName <<
" " << poolDb->
tag(esRecordName) <<
" SINCE " << sinceRun;
151 throw cond::Exception(
"DataWriter: PoolDBOutputService not available.");
163 auto iP =
iovs.find(runNumber);
164 if (iP !=
iovs.end()) {
165 payloadToken = (*iP).payloadId;
174 throw cond::Exception(
"DataWriter: PoolDBOutputService not available.");
178 poolDb->
tagInfo(recordName, tagInfo);
184 if (keyListToken.empty()) {
persistency::Exception Exception
void readObject(const std::string &payloadToken, T &outputObject)
Log< level::Info, true > LogVerbatim
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)
bool updateIOV(const std::string &esRecordName, const std::string &payloadToken, edm::RunNumber_t sinceRun, bool logTransactions=false)
bool isNewTagRequest(const std::string &recordName)
cond::Time_t beginOfTime() const
std::string payloadToken(const std::string &recordName, edm::RunNumber_t runNumber)
IOVProxy readIov(const std::string &tag)
std::unique_ptr< WriterProxy > WriterProxyPtr
bool appendSinceTime(const std::string &payloadId, cond::Time_t sinceTime, const std::string &recordName)
void createNewIOV(const std::string &firstPayloadId, cond::Time_t firstSinceTime, const std::string &recordName)
cond::Hash storePayload(const T &payload, const boost::posix_time::ptime &creationTime=boost::posix_time::microsec_clock::universal_time())
std::string writePayload(const edm::EventSetup &setup)
bool tagInfo(const std::string &recordName, cond::TagInfo_t &result)