CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
cond::service::PoolDBOutputService Class Reference

#include <PoolDBOutputService.h>

Inheritance diagram for cond::service::PoolDBOutputService:
cond::service::OnlineDBOutputService

Classes

struct  Record
 

Public Member Functions

template<typename T >
void appendOneIOV (const T &payload, cond::Time_t sinceTime, const std::string &recordName)
 
bool appendSinceTime (const std::string &payloadId, cond::Time_t sinceTime, const std::string &recordName)
 
cond::Time_t beginOfTime () const
 
void closeIOV (Time_t lastTill, const std::string &recordName)
 
void commitTransaction ()
 
void createNewIOV (const std::string &firstPayloadId, cond::Time_t firstSinceTime, const std::string &recordName)
 
template<typename T >
void createOneIOV (const T &payload, cond::Time_t firstSinceTime, const std::string &recordName)
 
cond::Time_t currentTime () const
 
cond::Time_t endOfTime () const
 
void eraseSinceTime (const std::string &payloadId, cond::Time_t sinceTime, const std::string &recordName)
 
void forceInit ()
 
bool isNewTagRequest (const std::string &recordName)
 
void lockRecords ()
 
cond::persistency::Loggerlogger ()
 
const RecordlookUpRecord (const std::string &recordName)
 
cond::persistency::Session newReadOnlySession (const std::string &connectionString, const std::string &transactionId)
 
 PoolDBOutputService (const edm::ParameterSet &iConfig, edm::ActivityRegistry &iAR)
 
void postEndJob ()
 
void releaseLocks ()
 
cond::persistency::Session session () const
 
void setLogHeaderForRecord (const std::string &recordName, const std::string &provenance, const std::string &usertext)
 
void startTransaction ()
 
std::string tag (const std::string &recordName)
 
bool tagInfo (const std::string &recordName, cond::TagInfo_t &result)
 
template<typename T >
void writeMany (const std::map< Time_t, std::shared_ptr< T > > &iovAndPayloads, const std::string &recordName)
 
template<typename T >
Hash writeOneIOV (const T &payload, Time_t time, const std::string &recordName)
 
virtual ~PoolDBOutputService ()
 

Static Public Attributes

static const std::string kSharedResource = "PoolDBOutputService"
 

Private Member Functions

bool appendSinceTime (const std::string &payloadId, cond::Time_t sinceTime, const Record &record)
 
void createNewIOV (const std::string &firstPayloadId, const std::string payloadType, cond::Time_t firstSinceTime, Record &record)
 
void doCommitTransaction ()
 
void doStartTransaction ()
 
void fillRecord (edm::ParameterSet &pset, const std::string &gTimeTypeStr)
 
RecordgetRecord (const std::string &recordName)
 
bool getTagInfo (const std::string &recordName, cond::TagInfo_t &result)
 
bool initDB (bool readOnly=false)
 
cond::UserLogInfolookUpUserLogInfo (const std::string &recordName)
 
void postModuleEvent (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void preEventProcessing (edm::StreamContext const &)
 
void preGlobalBeginLumi (edm::GlobalContext const &)
 
void preGlobalBeginRun (edm::GlobalContext const &)
 
void preModuleEvent (edm::StreamContext const &, edm::ModuleCallingContext const &)
 

Private Attributes

bool m_autoCommit
 
cond::persistency::ConnectionPool m_connection
 
std::vector< cond::Time_tm_currentTimes
 
bool m_dbInitialised
 
cond::persistency::Logger m_logger
 
std::map< std::string, cond::UserLogInfom_logheaders
 
std::recursive_mutex m_mutex
 
std::map< std::string, Recordm_records
 
cond::persistency::Session m_session
 
cond::TimeType m_timetype
 
bool m_transactionActive
 
unsigned int m_writeTransactionDelay = 0
 

Detailed Description

Definition at line 33 of file PoolDBOutputService.h.

Constructor & Destructor Documentation

◆ PoolDBOutputService()

PoolDBOutputService::PoolDBOutputService ( const edm::ParameterSet iConfig,
edm::ActivityRegistry iAR 
)

Definition at line 41 of file PoolDBOutputService.cc.

42  : m_logger(iConfig.getUntrackedParameter<std::string>("jobName", "DBOutputService")),
44  m_session(),
45  m_transactionActive(false),
46  m_dbInitialised(false),
47  m_records(),
48  m_logheaders() {
49  std::string timetypestr = iConfig.getUntrackedParameter<std::string>("timetype", "runnumber");
51  m_autoCommit = iConfig.getUntrackedParameter<bool>("autoCommit", true);
52  m_writeTransactionDelay = iConfig.getUntrackedParameter<unsigned int>("writeTransactionDelay", 0);
53  edm::ParameterSet connectionPset = iConfig.getParameter<edm::ParameterSet>("DBParameters");
54  m_connection.setParameters(connectionPset);
59  bool saveLogsOnDb = iConfig.getUntrackedParameter<bool>("saveLogsOnDB", false);
60  if (saveLogsOnDb)
62  // implicit start
63  //doStartTransaction();
64  typedef std::vector<edm::ParameterSet> Parameters;
65  Parameters toPut = iConfig.getParameter<Parameters>("toPut");
66  for (Parameters::iterator itToPut = toPut.begin(); itToPut != toPut.end(); ++itToPut)
67  fillRecord(*itToPut, timetypestr);
68 
70  iAR.watchPreallocate(
71  [this](edm::service::SystemBounds const& iBounds) { m_currentTimes.resize(iBounds.maxNumberOfStreams()); });
72  if (m_timetype == cond::timestamp) { //timestamp
76  } else if (m_timetype == cond::runnumber) { //runnumber
77  //NOTE: this assumes only one run is being processed at a time.
78  // This is true for 7_1_X but plan are to allow multiple in flight at a time
79  s_streamIndex = 0;
81  } else if (m_timetype == cond::lumiid) {
82  //NOTE: this assumes only one lumi is being processed at a time.
83  // This is true for 7_1_X but plan are to allow multiple in flight at a time
84  s_streamIndex = 0;
86  }
87 }
static thread_local int s_streamIndex
void setLogDestination(Logger &logger)
void watchPreEvent(PreEvent::slot_type const &iSlot)
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
void watchPreallocate(Preallocate::slot_type const &iSlot)
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
void preEventProcessing(edm::StreamContext const &)
void fillRecord(edm::ParameterSet &pset, const std::string &gTimeTypeStr)
void watchPreModuleEvent(PreModuleEvent::slot_type const &iSlot)
std::map< std::string, cond::UserLogInfo > m_logheaders
unsigned int maxNumberOfStreams() const
Definition: SystemBounds.h:35
void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const &iSlot)
std::vector< cond::Time_t > m_currentTimes
void watchPostModuleEvent(PostModuleEvent::slot_type const &iSlot)
void preGlobalBeginLumi(edm::GlobalContext const &)
void setParameters(const edm::ParameterSet &connectionPset)
T getUntrackedParameter(std::string const &, T const &) const
TimeType timeTypeFromName(const std::string &name)
Definition: Time.cc:25
cond::persistency::ConnectionPool m_connection
Session createSession(const std::string &connectionString, bool writeCapable=false)
cond::persistency::Session m_session
std::map< std::string, Record > m_records
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
cond::persistency::Logger m_logger
void preGlobalBeginRun(edm::GlobalContext const &)
std::vector< AlignmentParameters * > Parameters
Definition: Utilities.h:32
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
void setDbDestination(const std::string &connectionString)
Definition: Logger.cc:66
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)

◆ ~PoolDBOutputService()

PoolDBOutputService::~PoolDBOutputService ( )
virtual

Definition at line 241 of file PoolDBOutputService.cc.

241 {}

Member Function Documentation

◆ appendOneIOV()

template<typename T >
void cond::service::PoolDBOutputService::appendOneIOV ( const T payload,
cond::Time_t  sinceTime,
const std::string &  recordName 
)
inline

Definition at line 185 of file PoolDBOutputService.h.

References appendSinceTime(), doCommitTransaction(), doStartTransaction(), cppFunctionSkipper::exception, initDB(), CommonMethods::lock(), lookUpRecord(), m_autoCommit, m_mutex, m_session, jetsAK4_Puppi_cff::payload, cond::persistency::Session::storePayload(), AlCaHLTBitMon_QueryRunRegistry::string, cond::throwException(), and cond::persistency::Session::transaction().

Referenced by DBWriter::analyze(), SiStripPedestalsBuilder::analyze(), SiStripThresholdBuilder::analyze(), SiStripApvGainBuilder::analyze(), SiStripNoisesBuilder::analyze(), SiStripSummaryBuilder::analyze(), SiStripDetVOffFakeBuilder::analyze(), cms::SiPixelPerformanceSummaryBuilder::analyze(), SiStripNoisesAndBadCompsChecker::analyze(), SiPixelLorentzAngleDBLoader::analyze(), SiPixelLorentzAngleDB::analyze(), SiPixelVCalDB::analyze(), SiPixelDynamicInefficiencyDB::analyze(), WriteEcalMiscalibConstants::analyze(), WriteEcalMiscalibConstantsMC::analyze(), SiStripNoiseNormalizedWithApvGainBuilder::analyze(), SiStripApvGainBuilderFromTag::analyze(), SiPixelCalibConfigurationObjectMaker::analyze(), EcalTestDevDB::analyze(), cms::SiPixelCondObjBuilder::analyze(), cms::SiPixelCondObjOfflineBuilder::analyze(), cms::SiPixelCondObjForHLTBuilder::analyze(), BeamSpotOnlineFromOfflineConverter::analyze(), SiStripChannelGainFromDBMiscalibrator::analyze(), SiStripNoisesFromDBMiscalibrator::analyze(), SiStripApvGainFromFileBuilder::analyze(), SiStripFedCablingBuilder::beginRun(), SiPixelGainCalibScaler::computeAndStorePalyoads(), CocoaDBMgr::DumpCocoaResults(), BeamSpotWrite2DB::endJob(), StoreESCondition::endJob(), BeamSpotOnlineRecordsWriter::endJob(), StoreEcalCondition::endJob(), SiStripFedCablingManipulator::endRun(), SiPixelGainCalibrationReadDQMFile::fillDatabase(), SiPixelGainCalibrationRejectNoisyAndDead::fillDatabase(), SiStripBadChannelBuilder::getNewObject(), SiPhase2BadStripChannelBuilder::getNewObject(), CaloGeometryDBWriter::write(), BeamFitter::write2DB(), CaloGeometryDBWriter::writeIndexed(), and BeamSpotOnlineShifter::writeToDB().

185  {
186  std::lock_guard<std::recursive_mutex> lock(m_mutex);
189  try {
190  bool dbexists = this->initDB(true);
191  if (!dbexists) {
192  cond::throwException(std::string("Target database does not exist."),
193  "PoolDBOutputService::appendSinceTime");
194  }
195  auto& myrecord = this->lookUpRecord(recordName);
196  if (myrecord.m_isNewTag) {
197  cond::throwException(std::string("Cannot append to non-existing tag ") + myrecord.m_tag,
198  "PoolDBOutputService::appendSinceTime");
199  }
200  appendSinceTime(m_session.storePayload(payload), sinceTime, myrecord);
201  if (m_autoCommit) {
203  }
204  } catch (const std::exception& er) {
205  cond::throwException(std::string(er.what()), "PoolDBOutputService::appendSinceTime");
206  }
207  scope.close();
208  }
const Record & lookUpRecord(const std::string &recordName)
Transaction & transaction()
Definition: Session.cc:52
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18
cond::persistency::Session m_session
bool appendSinceTime(const std::string &payloadId, cond::Time_t sinceTime, const std::string &recordName)
cond::Hash storePayload(const T &payload, const boost::posix_time::ptime &creationTime=boost::posix_time::microsec_clock::universal_time())
Definition: Session.h:186

◆ appendSinceTime() [1/2]

bool PoolDBOutputService::appendSinceTime ( const std::string &  payloadId,
cond::Time_t  sinceTime,
const std::string &  recordName 
)

Definition at line 314 of file PoolDBOutputService.cc.

References cppFunctionSkipper::exception, CommonMethods::lock(), align_cfg::recordName, runTheMatrix::ret, AlCaHLTBitMon_QueryRunRegistry::string, cond::throwException(), and hcalRecHitTable_cff::time.

Referenced by appendOneIOV(), l1t::DataWriter::updateIOV(), l1t::DataWriterExt::updateIOV(), AlCaRecoTriggerBitsRcdUpdate::writeBitsToDB(), and writeOneIOV().

316  {
317  bool ret = false;
318  std::lock_guard<std::recursive_mutex> lock(m_mutex);
321  try {
322  bool dbexists = this->initDB();
323  if (!dbexists) {
324  cond::throwException(std::string("Target database does not exist."), "PoolDBOutputService::appendSinceTime");
325  }
326  auto& myrecord = this->lookUpRecord(recordName);
327  if (myrecord.m_isNewTag) {
328  cond::throwException(std::string("Cannot append to non-existing tag ") + myrecord.m_tag,
329  "PoolDBOutputService::appendSinceTime");
330  }
331  ret = appendSinceTime(payloadId, time, myrecord);
332  if (m_autoCommit) {
334  }
335  } catch (const std::exception& er) {
336  cond::throwException(std::string(er.what()), "PoolDBOutputService::appendSinceTime");
337  }
338  scope.close();
339  return ret;
340 }
const Record & lookUpRecord(const std::string &recordName)
ret
prodAgent to be discontinued
Transaction & transaction()
Definition: Session.cc:52
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18
cond::persistency::Session m_session
bool appendSinceTime(const std::string &payloadId, cond::Time_t sinceTime, const std::string &recordName)

◆ appendSinceTime() [2/2]

bool PoolDBOutputService::appendSinceTime ( const std::string &  payloadId,
cond::Time_t  sinceTime,
const Record record 
)
private

Definition at line 343 of file PoolDBOutputService.cc.

References a, cppFunctionSkipper::exception, cond::persistency::IOVEditor::flush(), cond::persistency::IOVEditor::insert(), cond::service::PoolDBOutputService::Record::m_idName, cond::service::PoolDBOutputService::Record::m_tag, AlCaHLTBitMon_QueryRunRegistry::string, cond::throwException(), and hcalRecHitTable_cff::time.

345  {
346  m_logger.logInfo() << "Updating existing tag " << myrecord.m_tag << ", adding iov with since " << time;
347  try {
348  cond::persistency::IOVEditor editor = m_session.editIov(myrecord.m_tag);
349  editor.insert(time, payloadId);
350  cond::UserLogInfo a = this->lookUpUserLogInfo(myrecord.m_idName);
351  editor.flush(a.usertext);
352  } catch (const std::exception& er) {
353  cond::throwException(std::string(er.what()), "PoolDBOutputService::appendSinceTime");
354  }
355  return true;
356 }
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18
cond::persistency::Session m_session
cond::persistency::Logger m_logger
IOVEditor editIov(const std::string &tag)
Definition: Session.cc:130
void insert(cond::Time_t since, const cond::Hash &payloadHash, bool checkType=false)
Definition: IOVEditor.cc:159
double a
Definition: hdecay.h:121
EchoedLogStream< edm::LogInfo > logInfo()
Definition: Logger.cc:157
cond::UserLogInfo & lookUpUserLogInfo(const std::string &recordName)

◆ beginOfTime()

cond::Time_t PoolDBOutputService::beginOfTime ( ) const

Definition at line 260 of file PoolDBOutputService.cc.

References cond::TimeTypeSpecs::beginValue, and cond::timeTypeSpecs.

Referenced by L1KeyListWriter::analyze(), L1KeyWriter::analyze(), L1TMuonOverlapParamsWriter::analyze(), L1TCaloParamsUpdater::analyze(), L1MenuWriter::analyze(), DBWriter::analyze(), SiStripThresholdBuilder::analyze(), L1TCaloStage2ParamsWriter::analyze(), SurveyInputTrackerFromDB::analyze(), SiStripPedestalsBuilder::analyze(), L1TGlobalPrescalesVetosWriter::analyze(), L1TMuonEndCapForestWriter::analyze(), L1TMuonGlobalParamsWriter::analyze(), SiStripSummaryBuilder::analyze(), SiStripNoisesBuilder::analyze(), L1TMuonEndCapParamsWriter::analyze(), SiStripApvGainBuilder::analyze(), L1TMuonBarrelParamsWriter::analyze(), L1TMuonOverlapFwVersionTester::analyze(), EcalPFRecHitThresholdsMaker::analyze(), SiStripDetVOffFakeBuilder::analyze(), GBRForestWriter::analyze(), cms::SiPixelPerformanceSummaryBuilder::analyze(), SiPixelLorentzAngleDBLoader::analyze(), SiStripNoisesAndBadCompsChecker::analyze(), PPSGeometryBuilder::analyze(), SiPixelLorentzAngleDB::analyze(), SiPixelVCalDB::analyze(), SiPixelDynamicInefficiencyDB::analyze(), WriteEcalMiscalibConstantsMC::analyze(), WriteEcalMiscalibConstants::analyze(), SiStripNoiseNormalizedWithApvGainBuilder::analyze(), SiStripApvGainBuilderFromTag::analyze(), SiPixelGenErrorDBObjectUploader::analyze(), SiPixel2DTemplateDBObjectUploader::analyze(), SiPixelCalibConfigurationObjectMaker::analyze(), SiPixelTemplateDBObjectUploader::analyze(), EcalTestDevDB::analyze(), cms::SiPixelCondObjBuilder::analyze(), cms::SiPixelCondObjForHLTBuilder::analyze(), cms::SiPixelCondObjOfflineBuilder::analyze(), TrackerGeometryCompare::analyze(), TrackerSystematicMisalignments::analyze(), BeamSpotOnlineFromOfflineConverter::analyze(), SiStripApvGainFromFileBuilder::analyze(), XMLGeometryBuilder::beginJob(), PTrackerParametersDBBuilder::beginRun(), HcalParametersDBBuilder::beginRun(), ME0RecoIdealDBLoader::beginRun(), RPCRecoIdealDBLoader::beginRun(), PHGCalParametersDBBuilder::beginRun(), CSCRecoIdealDBLoader::beginRun(), DTRecoIdealDBLoader::beginRun(), GEMRecoIdealDBLoader::beginRun(), PGeometricDetBuilder::beginRun(), SiStripFedCablingBuilder::beginRun(), SiPixelGainCalibScaler::computeAndStorePalyoads(), ESDBCopy::copyToDB(), EcalTPGDBCopy::copyToDB(), EcalDBCopy::copyToDB(), SiStripBadStripFromQualityDBWriter::dqmEndJob(), CocoaDBMgr::DumpCocoaResults(), BeamSpotWrite2DB::endJob(), BeamProfile2DBWriter::endJob(), StoreESCondition::endJob(), BeamSpotOnlineRecordsWriter::endJob(), StoreEcalCondition::endJob(), DummyCondDBWriter< TObject, TObjectO, TRecord >::endRun(), SiStripFedCablingManipulator::endRun(), LaserAlignment::endRunProduce(), SiPixelGainCalibrationReadDQMFile::fillDatabase(), SiPixelGainCalibrationRejectNoisyAndDead::fillDatabase(), SiStripBadChannelBuilder::getNewObject(), SiPhase2BadStripChannelBuilder::getNewObject(), EcalLaserCondTools::processIov(), MuonMisalignedProducer::saveToDB(), ConditionDBWriter< SiStripApvGain >::storeOnDb(), l1t::DataWriter::updateIOV(), l1t::DataWriterExt::updateIOV(), CaloGeometryDBWriter::write(), BeamFitter::write2DB(), CaloGeometryDBWriter::writeIndexed(), DTCalibDBUtils::writeToDB(), and BeamSpotOnlineShifter::writeToDB().

const TimeTypeSpecs timeTypeSpecs[]
Definition: Time.cc:16
Time_t beginValue
Definition: Time.h:41

◆ closeIOV()

void PoolDBOutputService::closeIOV ( Time_t  lastTill,
const std::string &  recordName 
)

Definition at line 407 of file PoolDBOutputService.cc.

References cppFunctionSkipper::exception, cond::persistency::IOVEditor::flush(), CommonMethods::lock(), align_cfg::recordName, cond::persistency::IOVEditor::setEndOfValidity(), AlCaHLTBitMon_QueryRunRegistry::string, and cond::throwException().

Referenced by popcon::PopCon::finalize().

407  {
408  std::lock_guard<std::recursive_mutex> lock(m_mutex);
411  try {
412  bool dbexists = this->initDB();
413  if (!dbexists) {
414  cond::throwException(std::string("Target database does not exist."), "PoolDBOutputService::closeIOV");
415  }
416  auto& myrecord = lookUpRecord(recordName);
417  if (myrecord.m_isNewTag) {
418  cond::throwException(std::string("Cannot close non-existing tag ") + myrecord.m_tag,
419  "PoolDBOutputService::closeIOV");
420  }
421  m_logger.logInfo() << "Updating existing tag " << myrecord.m_tag << ", closing with end of validity " << lastTill;
422  cond::persistency::IOVEditor editor = m_session.editIov(myrecord.m_tag);
423  editor.setEndOfValidity(lastTill);
424  editor.flush("Tag closed.");
425  if (m_autoCommit) {
427  }
428  } catch (const std::exception& er) {
429  cond::throwException(std::string(er.what()), "PoolDBOutputService::closeIOV");
430  }
431  scope.close();
432 }
const Record & lookUpRecord(const std::string &recordName)
Transaction & transaction()
Definition: Session.cc:52
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18
cond::persistency::Session m_session
cond::persistency::Logger m_logger
IOVEditor editIov(const std::string &tag)
Definition: Session.cc:130
void setEndOfValidity(cond::Time_t validity)
Definition: IOVEditor.cc:129
EchoedLogStream< edm::LogInfo > logInfo()
Definition: Logger.cc:157

◆ commitTransaction()

void PoolDBOutputService::commitTransaction ( )

◆ createNewIOV() [1/2]

void PoolDBOutputService::createNewIOV ( const std::string &  firstPayloadId,
cond::Time_t  firstSinceTime,
const std::string &  recordName 
)

Definition at line 267 of file PoolDBOutputService.cc.

References a, cppFunctionSkipper::exception, cond::persistency::IOVEditor::flush(), cond::persistency::IOVEditor::insert(), CommonMethods::lock(), align_cfg::recordName, cond::persistency::IOVEditor::setDescription(), AlCaHLTBitMon_QueryRunRegistry::string, cond::SYNCH_ANY, and cond::throwException().

Referenced by createOneIOV(), l1t::DataWriter::updateIOV(), l1t::DataWriterExt::updateIOV(), AlCaRecoTriggerBitsRcdUpdate::writeBitsToDB(), and writeOneIOV().

269  {
270  std::lock_guard<std::recursive_mutex> lock(m_mutex);
273  try {
274  this->initDB();
275  auto& myrecord = this->getRecord(recordName);
276  if (!myrecord.m_isNewTag) {
277  cond::throwException(myrecord.m_tag + " is not a new tag", "PoolDBOutputService::createNewIOV");
278  }
279  m_logger.logInfo() << "Creating new tag " << myrecord.m_tag << ", adding iov with since " << firstSinceTime
280  << " pointing to payload id " << firstPayloadId;
282  m_session.createIovForPayload(firstPayloadId, myrecord.m_tag, myrecord.m_timetype, cond::SYNCH_ANY);
283  editor.setDescription("New Tag");
284  editor.insert(firstSinceTime, firstPayloadId);
285  cond::UserLogInfo a = this->lookUpUserLogInfo(myrecord.m_idName);
286  editor.flush(a.usertext);
287  myrecord.m_isNewTag = false;
288  if (m_autoCommit) {
290  }
291  } catch (const std::exception& er) {
292  cond::throwException(std::string(er.what()), "PoolDBOutputService::createNewIov");
293  }
294  scope.close();
295 }
void setDescription(const std::string &description)
Definition: IOVEditor.cc:139
Transaction & transaction()
Definition: Session.cc:52
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18
cond::persistency::Session m_session
cond::persistency::Logger m_logger
void insert(cond::Time_t since, const cond::Hash &payloadHash, bool checkType=false)
Definition: IOVEditor.cc:159
Record & getRecord(const std::string &recordName)
double a
Definition: hdecay.h:121
IOVEditor createIovForPayload(const Hash &payloadHash, const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::SYNCH_ANY)
Definition: Session.cc:114
EchoedLogStream< edm::LogInfo > logInfo()
Definition: Logger.cc:157
cond::UserLogInfo & lookUpUserLogInfo(const std::string &recordName)

◆ createNewIOV() [2/2]

void PoolDBOutputService::createNewIOV ( const std::string &  firstPayloadId,
const std::string  payloadType,
cond::Time_t  firstSinceTime,
Record record 
)
private

Definition at line 298 of file PoolDBOutputService.cc.

References a, cond::persistency::IOVEditor::flush(), cond::persistency::IOVEditor::insert(), cond::service::PoolDBOutputService::Record::m_idName, cond::service::PoolDBOutputService::Record::m_isNewTag, cond::service::PoolDBOutputService::Record::m_tag, cond::service::PoolDBOutputService::Record::m_timetype, HLT_2024v10_cff::payloadType, cond::persistency::IOVEditor::setDescription(), and cond::SYNCH_ANY.

301  {
302  m_logger.logInfo() << "Creating new tag " << myrecord.m_tag << " for payload type " << payloadType
303  << ", adding iov with since " << firstSinceTime;
304  // FIX ME: synchronization type and description have to be passed as the other parameters?
306  m_session.createIov(payloadType, myrecord.m_tag, myrecord.m_timetype, cond::SYNCH_ANY);
307  editor.setDescription("New Tag");
308  editor.insert(firstSinceTime, firstPayloadId);
309  cond::UserLogInfo a = this->lookUpUserLogInfo(myrecord.m_idName);
310  editor.flush(a.usertext);
311  myrecord.m_isNewTag = false;
312 }
IOVEditor createIov(const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::SYNCH_ANY)
Definition: Session.h:179
void setDescription(const std::string &description)
Definition: IOVEditor.cc:139
cond::persistency::Session m_session
cond::persistency::Logger m_logger
void insert(cond::Time_t since, const cond::Hash &payloadHash, bool checkType=false)
Definition: IOVEditor.cc:159
double a
Definition: hdecay.h:121
EchoedLogStream< edm::LogInfo > logInfo()
Definition: Logger.cc:157
cond::UserLogInfo & lookUpUserLogInfo(const std::string &recordName)

◆ createOneIOV()

template<typename T >
void cond::service::PoolDBOutputService::createOneIOV ( const T payload,
cond::Time_t  firstSinceTime,
const std::string &  recordName 
)
inline

Definition at line 163 of file PoolDBOutputService.h.

References createNewIOV(), doCommitTransaction(), doStartTransaction(), cppFunctionSkipper::exception, getRecord(), initDB(), CommonMethods::lock(), m_autoCommit, m_mutex, m_session, jetsAK4_Puppi_cff::payload, cond::persistency::Session::storePayload(), AlCaHLTBitMon_QueryRunRegistry::string, cond::throwException(), and cond::persistency::Session::transaction().

Referenced by SiStripApvSimulationParametersBuilder::analyze(), DBWriter::analyze(), SiStripThresholdBuilder::analyze(), SiStripPedestalsBuilder::analyze(), SiStripApvGainBuilder::analyze(), SiStripNoisesBuilder::analyze(), SiStripSummaryBuilder::analyze(), EcalPFRecHitThresholdsMaker::analyze(), SiStripDetVOffFakeBuilder::analyze(), cms::SiPixelPerformanceSummaryBuilder::analyze(), SiPixelLorentzAngleDBLoader::analyze(), SiStripNoisesAndBadCompsChecker::analyze(), SiPixelLorentzAngleDB::analyze(), SiPixelVCalDB::analyze(), SiPixelDynamicInefficiencyDB::analyze(), WriteEcalMiscalibConstants::analyze(), WriteEcalMiscalibConstantsMC::analyze(), SiStripNoiseNormalizedWithApvGainBuilder::analyze(), SiStripApvGainBuilderFromTag::analyze(), SiPixelCalibConfigurationObjectMaker::analyze(), EcalTestDevDB::analyze(), cms::SiPixelCondObjBuilder::analyze(), cms::SiPixelCondObjOfflineBuilder::analyze(), cms::SiPixelCondObjForHLTBuilder::analyze(), BeamSpotOnlineFromOfflineConverter::analyze(), SiStripChannelGainFromDBMiscalibrator::analyze(), SiStripNoisesFromDBMiscalibrator::analyze(), SiStripApvGainFromFileBuilder::analyze(), XMLGeometryBuilder::beginJob(), PTrackerParametersDBBuilder::beginRun(), HcalParametersDBBuilder::beginRun(), CSCRecoIdealDBLoader::beginRun(), PHGCalParametersDBBuilder::beginRun(), ME0RecoIdealDBLoader::beginRun(), RPCRecoIdealDBLoader::beginRun(), DTRecoIdealDBLoader::beginRun(), GEMRecoIdealDBLoader::beginRun(), PGeometricDetBuilder::beginRun(), SiStripFedCablingBuilder::beginRun(), SiPixelGainCalibScaler::computeAndStorePalyoads(), ESDBCopy::copyToDB(), EcalTPGDBCopy::copyToDB(), EcalDBCopy::copyToDB(), CocoaDBMgr::DumpCocoaResults(), BeamSpotWrite2DB::endJob(), BeamProfile2DBWriter::endJob(), StoreESCondition::endJob(), BeamSpotOnlineRecordsWriter::endJob(), StoreEcalCondition::endJob(), SiStripFedCablingManipulator::endRun(), SiPixelGainCalibrationReadDQMFile::fillDatabase(), SiPixelGainCalibrationRejectNoisyAndDead::fillDatabase(), SiStripBadChannelBuilder::getNewObject(), SiPhase2BadStripChannelBuilder::getNewObject(), CaloGeometryDBWriter::write(), BeamFitter::write2DB(), CaloGeometryDBWriter::writeIndexed(), and BeamSpotOnlineShifter::writeToDB().

163  {
164  std::lock_guard<std::recursive_mutex> lock(m_mutex);
167  try {
168  this->initDB();
169  auto& myrecord = this->getRecord(recordName);
170  if (!myrecord.m_isNewTag) {
171  cond::throwException(myrecord.m_tag + " is not a new tag", "PoolDBOutputService::createNewIOV");
172  }
173  Hash payloadId = m_session.storePayload(payload);
174  createNewIOV(payloadId, cond::demangledName(typeid(payload)), firstSinceTime, myrecord);
175  if (m_autoCommit) {
177  }
178  } catch (const std::exception& er) {
179  cond::throwException(std::string(er.what()), "PoolDBOutputService::createNewIov");
180  }
181  scope.close();
182  }
Transaction & transaction()
Definition: Session.cc:52
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18
std::string Hash
Definition: Types.h:43
cond::persistency::Session m_session
Record & getRecord(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())
Definition: Session.h:186

◆ currentTime()

cond::Time_t PoolDBOutputService::currentTime ( ) const

Definition at line 262 of file PoolDBOutputService.cc.

References cms::cuda::assert(), and s_streamIndex.

Referenced by L1MuonOverlapParamsDBProducer::analyze(), L1MuonOverlapPhase1ParamsDBProducer::analyze(), LHCInfoPerFillWriter::analyze(), LHCInfoPerLSWriter::analyze(), DBWriter::analyze(), SiStripThresholdBuilder::analyze(), SiStripPedestalsBuilder::analyze(), SiStripApvGainBuilder::analyze(), SiStripNoisesBuilder::analyze(), SiStripSummaryBuilder::analyze(), WritePPSAlignmentConfiguration::analyze(), WritePPSAssociationCuts::analyze(), SiStripDetVOffFakeBuilder::analyze(), cms::SiPixelPerformanceSummaryBuilder::analyze(), SiStripNoisesAndBadCompsChecker::analyze(), SiPixelLorentzAngleDBLoader::analyze(), SiPixelVCalDB::analyze(), SiPixelLorentzAngleDB::analyze(), PPSTimingCalibrationLUTWriter::analyze(), PPSTimingCalibrationWriter::analyze(), BufferedBoostIODBWriter::analyze(), SiPixelDynamicInefficiencyDB::analyze(), WriteEcalMiscalibConstants::analyze(), WriteEcalMiscalibConstantsMC::analyze(), SiStripNoiseNormalizedWithApvGainBuilder::analyze(), SiStripApvGainBuilderFromTag::analyze(), SiPixelGenErrorDBObjectUploader::analyze(), SiPixelTemplateDBObjectUploader::analyze(), SiPixel2DTemplateDBObjectUploader::analyze(), SiPixelCalibConfigurationObjectMaker::analyze(), EcalSCDynamicDPhiParametersMaker::analyze(), EcalMustacheSCParametersMaker::analyze(), SiStripBadChannelPatcher::analyze(), BoostIODBWriter< DataType >::analyze(), FFTJetCorrectorDBWriter::analyze(), cms::SiPixelCondObjBuilder::analyze(), SiStripApvGainRescaler::analyze(), cms::SiPixelCondObjOfflineBuilder::analyze(), cms::SiPixelCondObjForHLTBuilder::analyze(), SiPhase2OuterTrackerLorentzAngleWriter::analyze(), SiStripGainPayloadCopyAndExclude::analyze(), BeamSpotOnlineFromOfflineConverter::analyze(), SiStripChannelGainFromDBMiscalibrator::analyze(), SiStripNoisesFromDBMiscalibrator::analyze(), SiStripApvGainFromFileBuilder::analyze(), SiStripFedCablingBuilder::beginRun(), PPSDiamondSampicTimingCalibrationPCLHarvester::calibDb(), SiPixelGainCalibScaler::computeAndStorePalyoads(), SiStripBadStripFromQualityDBWriter::dqmEndJob(), PPSTimingCalibrationPCLHarvester::dqmEndJob(), ECALpedestalPCLHarvester::dqmEndJob(), SiStripLorentzAnglePCLHarvester::dqmEndJob(), SiStripGainsPCLHarvester::dqmEndJob(), SiPixelLorentzAnglePCLHarvester::dqmEndJob(), SiPixelLorentzAnglePCLHarvesterMCS::dqmEndJob(), PPSAlignmentHarvester::dqmEndRun(), CocoaDBMgr::DumpCocoaResults(), SurveyDBUploader::endJob(), BeamSpotWrite2DB::endJob(), SiPixelQualityProbabilitiesTestWriter::endJob(), Mixing2DB::endJob(), SiPixelQualityProbabilitiesWriteFromASCII::endJob(), SiPixelFEDChannelContainerWriteFromASCII::endJob(), SiPixelFEDChannelContainerFromQualityConverter::endJob(), BeamSpotOnlineRecordsWriter::endJob(), FastSiPixelFEDChannelContainerFromQuality::endJob(), SiStripApvGainInspector::endJob(), DummyCondDBWriter< TObject, TObjectO, TRecord >::endRun(), SiStripFedCablingManipulator::endRun(), SiPixelGainCalibrationReadDQMFile::fillDatabase(), SiPixelGainCalibrationRejectNoisyAndDead::fillDatabase(), WriteCTPPSPixGainCalibrations::fillDB(), SiStripBadChannelBuilder::getNewObject(), SiPhase2BadStripChannelBuilder::getNewObject(), popcon::L1RPCHwConfigSourceHandler::getNewObjects(), popcon::RPCEMapSourceHandler::getNewObjects(), MisalignedTrackerESProducer::produce(), MuonAlignment::saveCSCSurveyToDB(), MuonAlignment::saveCSCtoDB(), MuonAlignment::saveDTSurveyToDB(), MuonAlignment::saveDTtoDB(), MuonAlignment::saveGEMtoDB(), TrackerAlignment::saveToDB(), ConditionDBWriter< SiStripApvGain >::setTime(), CaloGeometryDBWriter::write(), WriteESAlignments::write(), BeamFitter::write2DB(), SiStripHitEfficiencyHarvester::writeBadStripPayload(), GlobalTrackerMuonAlignment::writeGlPosRcd(), CaloGeometryDBWriter::writeIndexed(), AlignPCLThresholdsWriter< T >::writePayload(), DTCalibDBUtils::writeToDB(), and BeamSpotOnlineShifter::writeToDB().

262  {
263  assert(-1 != s_streamIndex);
265 }
static thread_local int s_streamIndex
std::vector< cond::Time_t > m_currentTimes
assert(be >=bs)

◆ doCommitTransaction()

void PoolDBOutputService::doCommitTransaction ( )
private

Definition at line 164 of file PoolDBOutputService.cc.

Referenced by appendOneIOV(), createOneIOV(), writeMany(), and writeOneIOV().

164  {
165  if (m_transactionActive) {
167  m_logger.logWarning() << "Waiting " << m_writeTransactionDelay << "s before commit the changes...";
168  ::sleep(m_writeTransactionDelay);
169  }
171  m_transactionActive = false;
172  }
173 }
EchoedLogStream< edm::LogWarning > logWarning()
Definition: Logger.cc:169
Transaction & transaction()
Definition: Session.cc:52
cond::persistency::Session m_session
cond::persistency::Logger m_logger

◆ doStartTransaction()

void PoolDBOutputService::doStartTransaction ( )
private

Definition at line 157 of file PoolDBOutputService.cc.

Referenced by appendOneIOV(), createOneIOV(), writeMany(), and writeOneIOV().

157  {
158  if (!m_transactionActive) {
159  m_session.transaction().start(false);
160  m_transactionActive = true;
161  }
162 }
void start(bool readOnly=true)
Definition: Session.cc:18
Transaction & transaction()
Definition: Session.cc:52
cond::persistency::Session m_session

◆ endOfTime()

cond::Time_t PoolDBOutputService::endOfTime ( ) const

Definition at line 258 of file PoolDBOutputService.cc.

References cond::TimeTypeSpecs::endValue, and cond::timeTypeSpecs.

Referenced by EcalDQMStatusWriter::analyze(), and CocoaDBMgr::DumpCocoaResults().

258 { return timeTypeSpecs[m_timetype].endValue; }
const TimeTypeSpecs timeTypeSpecs[]
Definition: Time.cc:16
Time_t endValue
Definition: Time.h:42

◆ eraseSinceTime()

void PoolDBOutputService::eraseSinceTime ( const std::string &  payloadId,
cond::Time_t  sinceTime,
const std::string &  recordName 
)

Definition at line 358 of file PoolDBOutputService.cc.

References a, cond::persistency::IOVEditor::erase(), cppFunctionSkipper::exception, cond::persistency::IOVEditor::flush(), CommonMethods::lock(), align_cfg::recordName, AlCaHLTBitMon_QueryRunRegistry::string, and cond::throwException().

Referenced by cond::service::OnlineDBOutputService::writeIOVForNextLumisection().

360  {
361  std::lock_guard<std::recursive_mutex> lock(m_mutex);
364  try {
365  bool dbexists = this->initDB();
366  if (!dbexists) {
367  cond::throwException(std::string("Target database does not exist."), "PoolDBOutputService::eraseSinceTime");
368  }
369  auto& myrecord = this->lookUpRecord(recordName);
370  if (myrecord.m_isNewTag) {
371  cond::throwException(std::string("Cannot delete from non-existing tag ") + myrecord.m_tag,
372  "PoolDBOutputService::appendSinceTime");
373  }
374  m_logger.logInfo() << "Updating existing tag " << myrecord.m_tag << ", removing iov with since " << sinceTime
375  << " pointing to payload id " << payloadId;
376  cond::persistency::IOVEditor editor = m_session.editIov(myrecord.m_tag);
377  editor.erase(sinceTime, payloadId);
379  editor.flush(a.usertext);
380  if (m_autoCommit) {
382  }
383  } catch (const std::exception& er) {
384  cond::throwException(std::string(er.what()), "PoolDBOutputService::eraseSinceTime");
385  }
386  scope.close();
387 }
const Record & lookUpRecord(const std::string &recordName)
Transaction & transaction()
Definition: Session.cc:52
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18
cond::persistency::Session m_session
void erase(cond::Time_t since, const cond::Hash &payloadHash)
Definition: IOVEditor.cc:174
cond::persistency::Logger m_logger
IOVEditor editIov(const std::string &tag)
Definition: Session.cc:130
double a
Definition: hdecay.h:121
EchoedLogStream< edm::LogInfo > logInfo()
Definition: Logger.cc:157
cond::UserLogInfo & lookUpUserLogInfo(const std::string &recordName)

◆ fillRecord()

void PoolDBOutputService::fillRecord ( edm::ParameterSet pset,
const std::string &  gTimeTypeStr 
)
private

Definition at line 22 of file PoolDBOutputService.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), cond::service::PoolDBOutputService::Record::m_idName, m_logheaders, cond::service::PoolDBOutputService::Record::m_onlyAppendUpdatePolicy, m_records, cond::service::PoolDBOutputService::Record::m_refreshTime, cond::service::PoolDBOutputService::Record::m_tag, cond::service::PoolDBOutputService::Record::m_timetype, AlCaHLTBitMon_QueryRunRegistry::string, and cond::time::timeTypeFromName().

22  {
23  Record thisrecord;
24 
25  thisrecord.m_idName = recordPset.getParameter<std::string>("record");
26  thisrecord.m_tag = recordPset.getParameter<std::string>("tag");
27 
28  thisrecord.m_timetype =
29  cond::time::timeTypeFromName(recordPset.getUntrackedParameter<std::string>("timetype", gTimeTypeStr));
30 
31  thisrecord.m_onlyAppendUpdatePolicy = recordPset.getUntrackedParameter<bool>("onlyAppendUpdatePolicy", false);
32 
33  thisrecord.m_refreshTime = recordPset.getUntrackedParameter<unsigned int>("refreshTime", 1);
34 
35  m_records.insert(std::make_pair(thisrecord.m_idName, thisrecord));
36 
37  cond::UserLogInfo userloginfo;
38  m_logheaders.insert(std::make_pair(thisrecord.m_idName, userloginfo));
39 }
std::map< std::string, cond::UserLogInfo > m_logheaders
TimeType timeTypeFromName(const std::string &name)
Definition: Time.cc:25
std::map< std::string, Record > m_records

◆ forceInit()

void PoolDBOutputService::forceInit ( )

Definition at line 243 of file PoolDBOutputService.cc.

References cppFunctionSkipper::exception, CommonMethods::lock(), AlCaHLTBitMon_QueryRunRegistry::string, and cond::throwException().

Referenced by popcon::PopCon::initialize(), l1t::DataWriterExt::readObject(), l1t::WriterProxyT< Record, Type >::save(), AlCaRecoTriggerBitsRcdUpdate::writeBitsToDB(), and l1t::DataWriterExt::writeKeyList().

243  {
244  std::lock_guard<std::recursive_mutex> lock(m_mutex);
247  try {
248  initDB();
249  if (m_autoCommit) {
251  }
252  } catch (const std::exception& er) {
253  cond::throwException(std::string(er.what()), "PoolDBOutputService::forceInit");
254  }
255  scope.close();
256 }
Transaction & transaction()
Definition: Session.cc:52
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18
cond::persistency::Session m_session

◆ getRecord()

cond::service::PoolDBOutputService::Record & PoolDBOutputService::getRecord ( const std::string &  recordName)
private

Definition at line 203 of file PoolDBOutputService.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, align_cfg::recordName, and cond::throwException().

Referenced by createOneIOV(), writeMany(), and writeOneIOV().

204  {
205  std::map<std::string, Record>::iterator it = m_records.find(recordName);
206  if (it == m_records.end()) {
207  cond::throwException("The record \"" + recordName + "\" has not been registered.",
208  "PoolDBOutputService::getRecord");
209  }
210  return it->second;
211 }
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18
std::map< std::string, Record > m_records

◆ getTagInfo()

bool PoolDBOutputService::getTagInfo ( const std::string &  recordName,
cond::TagInfo_t result 
)
private

Definition at line 443 of file PoolDBOutputService.cc.

References cond::persistency::IOVProxy::getLast(), AlCaHarvesting_cff::record, align_cfg::recordName, mps_fire::result, and runTheMatrix::ret.

Referenced by writeMany(), and writeOneIOV().

443  {
444  auto& record = lookUpRecord(recordName);
445  result.name = record.m_tag;
446  m_logger.logDebug() << "Fetching tag info for " << record.m_tag;
447  bool ret = false;
448  //use iovproxy to find out.
449  if (m_session.existsIov(record.m_tag)) {
451  result.lastInterval = iov.getLast();
452  ret = true;
453  }
454  return ret;
455 }
const Record & lookUpRecord(const std::string &recordName)
ret
prodAgent to be discontinued
cond::persistency::Session m_session
IOVProxy readIov(const std::string &tag)
Definition: Session.cc:63
cond::persistency::Logger m_logger
EchoedLogStream< edm::LogDebug_ > logDebug()
Definition: Logger.cc:161
bool existsIov(const std::string &tag)
Definition: Session.cc:77

◆ initDB()

bool PoolDBOutputService::initDB ( bool  readOnly = false)
private

Definition at line 185 of file PoolDBOutputService.cc.

Referenced by appendOneIOV(), createOneIOV(), writeMany(), and writeOneIOV().

185  {
186  if (!m_dbInitialised) {
187  if (!m_session.existsDatabase()) {
188  if (readOnly)
189  return false;
191  } else {
192  for (auto& iR : m_records) {
193  if (m_session.existsIov(iR.second.m_tag)) {
194  iR.second.m_isNewTag = false;
195  }
196  }
197  }
198  m_dbInitialised = true;
199  }
200  return m_dbInitialised;
201 }
cond::persistency::Session m_session
std::map< std::string, Record > m_records
bool existsIov(const std::string &tag)
Definition: Session.cc:77

◆ isNewTagRequest()

bool PoolDBOutputService::isNewTagRequest ( const std::string &  recordName)

Definition at line 136 of file PoolDBOutputService.cc.

References cppFunctionSkipper::exception, CommonMethods::lock(), align_cfg::recordName, AlCaHLTBitMon_QueryRunRegistry::string, and cond::throwException().

Referenced by DBWriter::analyze(), SiStripPedestalsBuilder::analyze(), SiStripThresholdBuilder::analyze(), SiStripNoisesBuilder::analyze(), SiStripSummaryBuilder::analyze(), SiStripApvGainBuilder::analyze(), SiStripDetVOffFakeBuilder::analyze(), cms::SiPixelPerformanceSummaryBuilder::analyze(), SiPixelLorentzAngleDBLoader::analyze(), SiStripNoisesAndBadCompsChecker::analyze(), SiPixelLorentzAngleDB::analyze(), SiPixelVCalDB::analyze(), SiPixelDynamicInefficiencyDB::analyze(), WriteEcalMiscalibConstants::analyze(), WriteEcalMiscalibConstantsMC::analyze(), SiStripNoiseNormalizedWithApvGainBuilder::analyze(), SiStripApvGainBuilderFromTag::analyze(), SiPixelGenErrorDBObjectUploader::analyze(), SiPixel2DTemplateDBObjectUploader::analyze(), SiPixelCalibConfigurationObjectMaker::analyze(), SiPixelTemplateDBObjectUploader::analyze(), EcalTestDevDB::analyze(), cms::SiPixelCondObjBuilder::analyze(), cms::SiPixelCondObjForHLTBuilder::analyze(), cms::SiPixelCondObjOfflineBuilder::analyze(), BeamSpotOnlineFromOfflineConverter::analyze(), SiStripChannelGainFromDBMiscalibrator::analyze(), SiStripNoisesFromDBMiscalibrator::analyze(), SiStripApvGainFromFileBuilder::analyze(), XMLGeometryBuilder::beginJob(), PTrackerParametersDBBuilder::beginRun(), HcalParametersDBBuilder::beginRun(), CSCRecoIdealDBLoader::beginRun(), ME0RecoIdealDBLoader::beginRun(), PHGCalParametersDBBuilder::beginRun(), RPCRecoIdealDBLoader::beginRun(), DTRecoIdealDBLoader::beginRun(), GEMRecoIdealDBLoader::beginRun(), PGeometricDetBuilder::beginRun(), SiStripFedCablingBuilder::beginRun(), SiPixelGainCalibScaler::computeAndStorePalyoads(), CocoaDBMgr::DumpCocoaResults(), BeamSpotWrite2DB::endJob(), StoreESCondition::endJob(), BeamSpotOnlineRecordsWriter::endJob(), StoreEcalCondition::endJob(), SiStripFedCablingManipulator::endRun(), AlcaBeamSpotHarvester::endRun(), SiPixelGainCalibrationReadDQMFile::fillDatabase(), SiPixelGainCalibrationRejectNoisyAndDead::fillDatabase(), SiStripBadChannelBuilder::getNewObject(), SiPhase2BadStripChannelBuilder::getNewObject(), EcalLaserCondTools::processIov(), ConditionDBWriter< SiStripApvGain >::storeOnDb(), l1t::DataWriter::updateIOV(), l1t::DataWriterExt::updateIOV(), CaloGeometryDBWriter::write(), BeamFitter::write2DB(), CaloGeometryDBWriter::writeIndexed(), writeMany(), writeOneIOV(), DTCalibDBUtils::writeToDB(), and BeamSpotOnlineShifter::writeToDB().

136  {
137  std::lock_guard<std::recursive_mutex> lock(m_mutex);
138  bool doCommit = false;
139  if (!m_transactionActive) {
140  m_session.transaction().start(true);
141  doCommit = true;
142  }
143  bool dbexists = false;
144  try {
145  dbexists = initDB(true);
146  } catch (const std::exception& er) {
147  cond::throwException(std::string(er.what()), "PoolDBOutputService::isNewTagRequest");
148  }
149  if (doCommit)
151  if (!dbexists)
152  return true;
153  auto& myrecord = this->lookUpRecord(recordName);
154  return myrecord.m_isNewTag;
155 }
const Record & lookUpRecord(const std::string &recordName)
void start(bool readOnly=true)
Definition: Session.cc:18
Transaction & transaction()
Definition: Session.cc:52
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18
cond::persistency::Session m_session

◆ lockRecords()

void PoolDBOutputService::lockRecords ( )

Definition at line 98 of file PoolDBOutputService.cc.

References CommonMethods::lock(), and cond::persistency::IOVEditor::lock().

Referenced by FakeBeamMonitor::dqmBeginRun(), and BeamMonitor::dqmBeginRun().

98  {
99  std::lock_guard<std::recursive_mutex> lock(m_mutex);
102  this->initDB();
103  for (auto& iR : m_records) {
104  if (iR.second.m_isNewTag == false) {
105  cond::persistency::IOVEditor editor = m_session.editIov(iR.second.m_tag);
106  editor.lock();
107  }
108  }
109  if (m_autoCommit) {
111  }
112  scope.close();
113 }
Transaction & transaction()
Definition: Session.cc:52
cond::persistency::Session m_session
std::map< std::string, Record > m_records
IOVEditor editIov(const std::string &tag)
Definition: Session.cc:130

◆ logger()

cond::persistency::Logger& cond::service::PoolDBOutputService::logger ( )
inline

◆ lookUpRecord()

const cond::service::PoolDBOutputService::Record & PoolDBOutputService::lookUpRecord ( const std::string &  recordName)

Definition at line 389 of file PoolDBOutputService.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, align_cfg::recordName, and cond::throwException().

Referenced by appendOneIOV(), and cond::service::OnlineDBOutputService::writeIOVForNextLumisection().

390  {
391  std::map<std::string, Record>::const_iterator it = m_records.find(recordName);
392  if (it == m_records.end()) {
393  cond::throwException("The record \"" + recordName + "\" has not been registered.",
394  "PoolDBOutputService::lookUpRecord");
395  }
396  return it->second;
397 }
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18
std::map< std::string, Record > m_records

◆ lookUpUserLogInfo()

cond::UserLogInfo & PoolDBOutputService::lookUpUserLogInfo ( const std::string &  recordName)
private

Definition at line 399 of file PoolDBOutputService.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and align_cfg::recordName.

Referenced by writeMany().

399  {
400  std::map<std::string, cond::UserLogInfo>::iterator it = m_logheaders.find(recordName);
401  if (it == m_logheaders.end())
402  throw cond::Exception("Log db was not set for record " + recordName +
403  " from PoolDBOutputService::lookUpUserLogInfo");
404  return it->second;
405 }
Base exception class for the object to relational access.
Definition: Exception.h:11
std::map< std::string, cond::UserLogInfo > m_logheaders

◆ newReadOnlySession()

cond::persistency::Session PoolDBOutputService::newReadOnlySession ( const std::string &  connectionString,
const std::string &  transactionId 
)

Definition at line 89 of file PoolDBOutputService.cc.

References l1RCTOmdsFedVectorProducer_cfi::connectionString, and runTheMatrix::ret.

Referenced by cond::service::OnlineDBOutputService::preLoadIov().

90  {
93  return ret;
94 }
ret
prodAgent to be discontinued
cond::persistency::ConnectionPool m_connection
Session createReadOnlySession(const std::string &connectionString, const std::string &transactionId)

◆ postEndJob()

void PoolDBOutputService::postEndJob ( )

◆ postModuleEvent()

void PoolDBOutputService::postModuleEvent ( edm::StreamContext const &  iContext,
edm::ModuleCallingContext const &   
)
private

Definition at line 224 of file PoolDBOutputService.cc.

References s_streamIndex.

225  {
226  s_streamIndex = -1;
227 }
static thread_local int s_streamIndex

◆ preEventProcessing()

void PoolDBOutputService::preEventProcessing ( edm::StreamContext const &  iContext)
private

Definition at line 215 of file PoolDBOutputService.cc.

References edm::StreamContext::streamID(), edm::StreamContext::timestamp(), edm::Timestamp::value(), and edm::StreamID::value().

215  {
216  m_currentTimes[iContext.streamID().value()] = iContext.timestamp().value();
217 }
std::vector< cond::Time_t > m_currentTimes

◆ preGlobalBeginLumi()

void PoolDBOutputService::preGlobalBeginLumi ( edm::GlobalContext const &  iContext)
private

Definition at line 235 of file PoolDBOutputService.cc.

References edm::GlobalContext::luminosityBlockID(), hcalRecHitTable_cff::time, and edm::LuminosityBlockID::value().

235  {
236  for (auto& time : m_currentTimes) {
237  time = iContext.luminosityBlockID().value();
238  }
239 }
std::vector< cond::Time_t > m_currentTimes

◆ preGlobalBeginRun()

void PoolDBOutputService::preGlobalBeginRun ( edm::GlobalContext const &  iContext)
private

Definition at line 229 of file PoolDBOutputService.cc.

References edm::GlobalContext::luminosityBlockID(), edm::LuminosityBlockID::run(), and hcalRecHitTable_cff::time.

229  {
230  for (auto& time : m_currentTimes) {
231  time = iContext.luminosityBlockID().run();
232  }
233 }
std::vector< cond::Time_t > m_currentTimes

◆ preModuleEvent()

void PoolDBOutputService::preModuleEvent ( edm::StreamContext const &  iContext,
edm::ModuleCallingContext const &   
)
private

Definition at line 219 of file PoolDBOutputService.cc.

References s_streamIndex, edm::StreamContext::streamID(), and edm::StreamID::value().

220  {
221  s_streamIndex = iContext.streamID().value();
222 }
static thread_local int s_streamIndex

◆ releaseLocks()

void PoolDBOutputService::releaseLocks ( )

Definition at line 115 of file PoolDBOutputService.cc.

References CommonMethods::lock(), and cond::persistency::IOVEditor::unlock().

Referenced by FakeBeamMonitor::dqmEndRun(), and BeamMonitor::dqmEndRun().

115  {
116  std::lock_guard<std::recursive_mutex> lock(m_mutex);
119  this->initDB();
120  for (auto& iR : m_records) {
121  if (iR.second.m_isNewTag == false) {
122  cond::persistency::IOVEditor editor = m_session.editIov(iR.second.m_tag);
123  editor.unlock();
124  }
125  }
126  if (m_autoCommit) {
128  }
129  scope.close();
130 }
Transaction & transaction()
Definition: Session.cc:52
cond::persistency::Session m_session
std::map< std::string, Record > m_records
IOVEditor editIov(const std::string &tag)
Definition: Session.cc:130

◆ session()

cond::persistency::Session PoolDBOutputService::session ( ) const

◆ setLogHeaderForRecord()

void PoolDBOutputService::setLogHeaderForRecord ( const std::string &  recordName,
const std::string &  provenance,
const std::string &  usertext 
)

Definition at line 434 of file PoolDBOutputService.cc.

References cond::UserLogInfo::provenance, align_cfg::recordName, and cond::UserLogInfo::usertext.

Referenced by popcon::PopCon::write().

436  {
437  cond::UserLogInfo& myloginfo = this->lookUpUserLogInfo(recordName);
438  myloginfo.provenance = dataprovenance;
439  myloginfo.usertext = usertext;
440 }
std::string provenance
Definition: Types.h:23
std::string usertext
Definition: Types.h:24
cond::UserLogInfo & lookUpUserLogInfo(const std::string &recordName)

◆ startTransaction()

void PoolDBOutputService::startTransaction ( )

Definition at line 175 of file PoolDBOutputService.cc.

References CommonMethods::lock().

Referenced by popcon::PopCon::initialize(), and AlCaRecoTriggerBitsRcdUpdate::writeBitsToDB().

175  {
176  std::lock_guard<std::recursive_mutex> lock(m_mutex);
178 }

◆ tag()

std::string PoolDBOutputService::tag ( const std::string &  recordName)

◆ tagInfo()

bool PoolDBOutputService::tagInfo ( const std::string &  recordName,
cond::TagInfo_t result 
)

Definition at line 458 of file PoolDBOutputService.cc.

References cppFunctionSkipper::exception, CommonMethods::lock(), align_cfg::recordName, mps_fire::result, runTheMatrix::ret, AlCaHLTBitMon_QueryRunRegistry::string, and cond::throwException().

Referenced by l1t::DataWriter::lastPayloadToken(), l1t::DataWriterExt::lastPayloadToken(), l1t::DataWriter::updateIOV(), l1t::DataWriterExt::updateIOV(), and AlCaRecoTriggerBitsRcdUpdate::writeBitsToDB().

458  {
459  std::lock_guard<std::recursive_mutex> lock(m_mutex);
460  bool ret = false;
461  bool doCommit = false;
462  if (!m_transactionActive) {
463  m_session.transaction().start(true);
464  doCommit = true;
465  }
466  bool dbexists = false;
468  try {
469  dbexists = initDB(true);
470  if (dbexists) {
472  }
473  } catch (const std::exception& er) {
474  cond::throwException(std::string(er.what()), "PoolDBOutputService::tagInfo");
475  }
476  if (doCommit)
478  scope.close();
479  return ret;
480 }
ret
prodAgent to be discontinued
void start(bool readOnly=true)
Definition: Session.cc:18
Transaction & transaction()
Definition: Session.cc:52
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18
cond::persistency::Session m_session
bool getTagInfo(const std::string &recordName, cond::TagInfo_t &result)

◆ writeMany()

template<typename T >
void cond::service::PoolDBOutputService::writeMany ( const std::map< Time_t, std::shared_ptr< T > > &  iovAndPayloads,
const std::string &  recordName 
)
inline

Definition at line 107 of file PoolDBOutputService.h.

References a, cond::persistency::Session::createIov(), doCommitTransaction(), doStartTransaction(), cond::persistency::Session::editIov(), cppFunctionSkipper::exception, cond::persistency::IOVEditor::flush(), getRecord(), getTagInfo(), initDB(), cond::persistency::IOVEditor::insert(), isNewTagRequest(), cond::TagInfo_t::lastInterval, CommonMethods::lock(), cond::persistency::Logger::logInfo(), lookUpUserLogInfo(), m_autoCommit, m_logger, m_mutex, m_session, cond::time::MAX_VAL(), jetsAK4_Puppi_cff::payload, HLT_2024v10_cff::payloadType, align_cfg::recordName, cond::persistency::IOVEditor::setDescription(), cond::Iov_t::since, cond::persistency::Session::storePayload(), AlCaHLTBitMon_QueryRunRegistry::string, cond::SYNCH_ANY, cond::throwException(), hcalRecHitTable_cff::time, to_string(), and cond::persistency::Session::transaction().

Referenced by popcon::PopCon::write().

107  {
108  if (iovAndPayloads.empty())
109  return;
110  std::lock_guard<std::recursive_mutex> lock(m_mutex);
113  try {
114  this->initDB();
115  auto& myrecord = this->getRecord(recordName);
116  m_logger.logInfo() << "Tag mapped to record " << recordName << ": " << myrecord.m_tag;
117  bool newTag = isNewTagRequest(recordName);
118  cond::Time_t lastSince = 0;
120  if (newTag) {
121  std::string payloadType = cond::demangledName(typeid(T));
122  editor = m_session.createIov(payloadType, myrecord.m_tag, myrecord.m_timetype, cond::SYNCH_ANY);
123  editor.setDescription("New Tag");
124  } else {
125  editor = m_session.editIov(myrecord.m_tag);
126  if (myrecord.m_onlyAppendUpdatePolicy) {
127  cond::TagInfo_t tInfo;
128  this->getTagInfo(myrecord.m_idName, tInfo);
129  lastSince = tInfo.lastInterval.since;
130  if (lastSince == cond::time::MAX_VAL)
131  lastSince = 0;
132  }
133  }
134  for (auto& iovEntry : iovAndPayloads) {
135  Time_t time = iovEntry.first;
136  auto payload = iovEntry.second;
137  if (myrecord.m_onlyAppendUpdatePolicy && !newTag) {
138  if (time <= lastSince) {
139  m_logger.logInfo() << "Won't append iov with since " << std::to_string(time)
140  << ", because is less or equal to last available since = " << lastSince;
141  continue;
142  }
143  }
144  auto payloadHash = m_session.storePayload(*payload);
145  editor.insert(time, payloadHash);
146  }
147  cond::UserLogInfo a = this->lookUpUserLogInfo(myrecord.m_idName);
148  editor.flush(a.usertext);
149  if (m_autoCommit) {
151  }
152  } catch (const std::exception& er) {
153  cond::throwException(std::string(er.what()), "PoolDBOutputService::writeMany");
154  }
155  scope.close();
156  return;
157  }
Iov_t lastInterval
Definition: Types.h:73
Time_t since
Definition: Types.h:53
IOVEditor createIov(const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::SYNCH_ANY)
Definition: Session.h:179
void setDescription(const std::string &description)
Definition: IOVEditor.cc:139
Transaction & transaction()
Definition: Session.cc:52
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18
static std::string to_string(const XMLCh *ch)
unsigned long long Time_t
Definition: Time.h:14
bool isNewTagRequest(const std::string &recordName)
cond::persistency::Session m_session
cond::persistency::Logger m_logger
IOVEditor editIov(const std::string &tag)
Definition: Session.cc:130
void insert(cond::Time_t since, const cond::Hash &payloadHash, bool checkType=false)
Definition: IOVEditor.cc:159
Record & getRecord(const std::string &recordName)
bool getTagInfo(const std::string &recordName, cond::TagInfo_t &result)
cond::Hash storePayload(const T &payload, const boost::posix_time::ptime &creationTime=boost::posix_time::microsec_clock::universal_time())
Definition: Session.h:186
double a
Definition: hdecay.h:121
EchoedLogStream< edm::LogInfo > logInfo()
Definition: Logger.cc:157
long double T
const Time_t MAX_VAL(std::numeric_limits< Time_t >::max())
cond::UserLogInfo & lookUpUserLogInfo(const std::string &recordName)

◆ writeOneIOV()

template<typename T >
Hash cond::service::PoolDBOutputService::writeOneIOV ( const T payload,
Time_t  time,
const std::string &  recordName 
)
inline

Definition at line 64 of file PoolDBOutputService.h.

References appendSinceTime(), createNewIOV(), doCommitTransaction(), doStartTransaction(), cppFunctionSkipper::exception, getRecord(), getTagInfo(), initDB(), isNewTagRequest(), cond::TagInfo_t::lastInterval, CommonMethods::lock(), cond::persistency::Logger::logInfo(), m_autoCommit, m_logger, m_mutex, m_session, cond::time::MAX_VAL(), jetsAK4_Puppi_cff::payload, HLT_2024v10_cff::payloadType, align_cfg::recordName, cond::Iov_t::since, cond::persistency::Session::storePayload(), AlCaHLTBitMon_QueryRunRegistry::string, cond::throwException(), hcalRecHitTable_cff::time, to_string(), and cond::persistency::Session::transaction().

Referenced by EcalDQMStatusWriter::analyze(), L1KeyListWriter::analyze(), L1KeyWriter::analyze(), L1TMuonOverlapParamsWriter::analyze(), L1MuonOverlapParamsDBProducer::analyze(), L1MuonOverlapPhase1ParamsDBProducer::analyze(), LHCInfoPerFillWriter::analyze(), LHCInfoPerLSWriter::analyze(), L1TCaloStage2ParamsWriter::analyze(), L1TGlobalPrescalesVetosWriter::analyze(), L1TMuonEndCapForestWriter::analyze(), L1TMuonGlobalParamsWriter::analyze(), SurveyInputTrackerFromDB::analyze(), L1TMuonEndCapParamsWriter::analyze(), WritePPSAlignmentConfiguration::analyze(), L1TMuonBarrelParamsWriter::analyze(), L1TMuonOverlapFwVersionTester::analyze(), WritePPSAssociationCuts::analyze(), GBRForestWriter::analyze(), PPSGeometryBuilder::analyze(), PPSTimingCalibrationWriter::analyze(), PPSTimingCalibrationLUTWriter::analyze(), BufferedBoostIODBWriter::analyze(), WriteCTPPSPixelAnalysisMask::analyze(), ProduceDropBoxMetadata::analyze(), CTPPSRPAlignmentInfoAnalyzer::analyze(), WriteCTPPSPixelDAQMapping::analyze(), SiPixelGenErrorDBObjectUploader::analyze(), SiPixel2DTemplateDBObjectUploader::analyze(), SiPixelTemplateDBObjectUploader::analyze(), WriteCTPPSTotemDAQMappingMask::analyze(), WriteCTPPSBeamParameters::analyze(), EcalMustacheSCParametersMaker::analyze(), EcalSCDynamicDPhiParametersMaker::analyze(), SiStripBadChannelPatcher::analyze(), BoostIODBWriter< DataType >::analyze(), FFTJetCorrectorDBWriter::analyze(), SiStripApvGainRescaler::analyze(), SiPhase2OuterTrackerLorentzAngleWriter::analyze(), TrackerSystematicMisalignments::analyze(), TrackerGeometryCompare::analyze(), SiStripGainPayloadCopyAndExclude::analyze(), MCMisalignmentScaler::analyze(), DTCCablingMapTestProducer::beginJob(), PPSDiamondSampicTimingCalibrationPCLHarvester::calibDb(), DTUserKeyedConfigHandler::chkConfigList(), DTKeyedConfigHandler::chkConfigList(), SiPixelStatusHarvester::constructTag(), EcalDBCopy::copyToDB(), SiStripBadStripFromQualityDBWriter::dqmEndJob(), PPSTimingCalibrationPCLHarvester::dqmEndJob(), ECALpedestalPCLHarvester::dqmEndJob(), SiStripLorentzAnglePCLHarvester::dqmEndJob(), SiStripGainsPCLHarvester::dqmEndJob(), SiPixelLorentzAnglePCLHarvester::dqmEndJob(), SiPixelLorentzAnglePCLHarvesterMCS::dqmEndJob(), SiPixelStatusHarvester::dqmEndRun(), PPSAlignmentHarvester::dqmEndRun(), CorrPCCProducer::dqmEndRunProduce(), SurveyDBUploader::endJob(), SiPixelQualityProbabilitiesTestWriter::endJob(), SiPixelQualityProbabilitiesWriteFromASCII::endJob(), Mixing2DB::endJob(), SiPixelFEDChannelContainerWriteFromASCII::endJob(), DTKeyedConfigDBInit::endJob(), SiPixelFEDChannelContainerFromQualityConverter::endJob(), FastSiPixelFEDChannelContainerFromQuality::endJob(), SiStripApvGainInspector::endJob(), DTCCablingMapProducer::endJob(), SiStripLorentzAngleCalibration::endOfJob(), SiPixelLorentzAngleCalibration::endOfJob(), SiStripBackplaneCalibration::endOfJob(), DummyCondDBWriter< TObject, TObjectO, TRecord >::endRun(), AlcaBeamSpotHarvester::endRun(), cond::BTransitionAnalyzer< EcalADCToGeVConstant, EcalADCToGeVConstantRcd >::endRun(), HLTPrescaleRecorder::endRun(), LaserAlignment::endRunProduce(), WriteCTPPSPixGainCalibrations::fillDB(), EcalLaserCondTools::from_hdf_to_db(), EcalLaserCondTools::processIov(), MisalignedTrackerESProducer::produce(), MuonAlignment::saveCSCSurveyToDB(), MuonAlignment::saveCSCtoDB(), MuonAlignment::saveDTSurveyToDB(), MuonAlignment::saveDTtoDB(), MuonAlignment::saveGEMtoDB(), TrackerAlignment::saveToDB(), MuonMisalignedProducer::saveToDB(), ConditionDBWriter< SiStripApvGain >::storeOnDb(), WriteESAlignments::write(), SiStripHitEfficiencyHarvester::writeBadStripPayload(), AlignmentProducerBase::writeDB(), GlobalTrackerMuonAlignment::writeGlPosRcd(), AlignPCLThresholdsWriter< T >::writePayload(), DTCalibDBUtils::writeToDB(), and CreateIdealTkAlRecords::writeToDB().

64  {
65  std::lock_guard<std::recursive_mutex> lock(m_mutex);
68  Hash thePayloadHash("");
69  try {
70  this->initDB();
71  auto& myrecord = this->getRecord(recordName);
72  m_logger.logInfo() << "Tag mapped to record " << recordName << ": " << myrecord.m_tag;
73  bool newTag = isNewTagRequest(recordName);
74  if (myrecord.m_onlyAppendUpdatePolicy && !newTag) {
75  cond::TagInfo_t tInfo;
76  this->getTagInfo(myrecord.m_idName, tInfo);
77  cond::Time_t lastSince = tInfo.lastInterval.since;
78  if (lastSince == cond::time::MAX_VAL)
79  lastSince = 0;
80  if (time <= lastSince) {
81  m_logger.logInfo() << "Won't append iov with since " << std::to_string(time)
82  << ", because is less or equal to last available since = " << lastSince;
83  if (m_autoCommit)
85  scope.close();
86  return thePayloadHash;
87  }
88  }
89  thePayloadHash = m_session.storePayload(payload);
90  std::string payloadType = cond::demangledName(typeid(payload));
91  if (newTag) {
92  createNewIOV(thePayloadHash, payloadType, time, myrecord);
93  } else {
94  appendSinceTime(thePayloadHash, time, myrecord);
95  }
96  if (m_autoCommit) {
98  }
99  } catch (const std::exception& er) {
100  cond::throwException(std::string(er.what()), "PoolDBOutputService::writeOne");
101  }
102  scope.close();
103  return thePayloadHash;
104  }
Iov_t lastInterval
Definition: Types.h:73
Time_t since
Definition: Types.h:53
Transaction & transaction()
Definition: Session.cc:52
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18
static std::string to_string(const XMLCh *ch)
unsigned long long Time_t
Definition: Time.h:14
bool isNewTagRequest(const std::string &recordName)
std::string Hash
Definition: Types.h:43
cond::persistency::Session m_session
cond::persistency::Logger m_logger
Record & getRecord(const std::string &recordName)
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)
bool getTagInfo(const std::string &recordName, cond::TagInfo_t &result)
cond::Hash storePayload(const T &payload, const boost::posix_time::ptime &creationTime=boost::posix_time::microsec_clock::universal_time())
Definition: Session.h:186
EchoedLogStream< edm::LogInfo > logInfo()
Definition: Logger.cc:157
const Time_t MAX_VAL(std::numeric_limits< Time_t >::max())

Member Data Documentation

◆ kSharedResource

const std::string PoolDBOutputService::kSharedResource = "PoolDBOutputService"
static

◆ m_autoCommit

bool cond::service::PoolDBOutputService::m_autoCommit
private

Definition at line 306 of file PoolDBOutputService.h.

Referenced by appendOneIOV(), createOneIOV(), writeMany(), and writeOneIOV().

◆ m_connection

cond::persistency::ConnectionPool cond::service::PoolDBOutputService::m_connection
private

Definition at line 303 of file PoolDBOutputService.h.

◆ m_currentTimes

std::vector<cond::Time_t> cond::service::PoolDBOutputService::m_currentTimes
private

Definition at line 301 of file PoolDBOutputService.h.

◆ m_dbInitialised

bool cond::service::PoolDBOutputService::m_dbInitialised
private

Definition at line 308 of file PoolDBOutputService.h.

◆ m_logger

cond::persistency::Logger cond::service::PoolDBOutputService::m_logger
private

Definition at line 298 of file PoolDBOutputService.h.

Referenced by logger(), writeMany(), and writeOneIOV().

◆ m_logheaders

std::map<std::string, cond::UserLogInfo> cond::service::PoolDBOutputService::m_logheaders
private

Definition at line 311 of file PoolDBOutputService.h.

Referenced by fillRecord().

◆ m_mutex

std::recursive_mutex cond::service::PoolDBOutputService::m_mutex
private

Definition at line 299 of file PoolDBOutputService.h.

Referenced by appendOneIOV(), createOneIOV(), writeMany(), and writeOneIOV().

◆ m_records

std::map<std::string, Record> cond::service::PoolDBOutputService::m_records
private

Definition at line 310 of file PoolDBOutputService.h.

Referenced by fillRecord().

◆ m_session

cond::persistency::Session cond::service::PoolDBOutputService::m_session
private

Definition at line 304 of file PoolDBOutputService.h.

Referenced by appendOneIOV(), createOneIOV(), writeMany(), and writeOneIOV().

◆ m_timetype

cond::TimeType cond::service::PoolDBOutputService::m_timetype
private

Definition at line 300 of file PoolDBOutputService.h.

◆ m_transactionActive

bool cond::service::PoolDBOutputService::m_transactionActive
private

Definition at line 305 of file PoolDBOutputService.h.

◆ m_writeTransactionDelay

unsigned int cond::service::PoolDBOutputService::m_writeTransactionDelay = 0
private

Definition at line 307 of file PoolDBOutputService.h.