CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | 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

bool appendSinceTime (const std::string &payloadId, cond::Time_t sinceTime, const std::string &recordName)
 
template<typename T >
void appendSinceTime (const T *payloadObj, 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 createNewIOV (const T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t, 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 ()
 
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 >
Hash writeOne (const T *payload, Time_t time, const std::string &recordName)
 
virtual ~PoolDBOutputService ()
 

Private Member Functions

bool appendSinceTime (const std::string &payloadId, cond::Time_t sinceTime, 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)
 
bool getTagInfo (const std::string &recordName, cond::TagInfo_t &result)
 
void initDB ()
 
RecordlookUpRecord (const std::string &recordName)
 
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 37 of file PoolDBOutputService.cc.

38  : m_logger(iConfig.getUntrackedParameter<std::string>("jobName", "DBOutputService")),
40  m_session(),
41  m_transactionActive(false),
42  m_dbInitialised(false),
43  m_records(),
44  m_logheaders() {
45  std::string timetypestr = iConfig.getUntrackedParameter<std::string>("timetype", "runnumber");
47  m_autoCommit = iConfig.getUntrackedParameter<bool>("autoCommit", false);
48  m_writeTransactionDelay = iConfig.getUntrackedParameter<unsigned int>("writeTransactionDelay", 0);
49  edm::ParameterSet connectionPset = iConfig.getParameter<edm::ParameterSet>("DBParameters");
50  m_connection.setParameters(connectionPset);
55  bool saveLogsOnDb = iConfig.getUntrackedParameter<bool>("saveLogsOnDB", false);
56  if (saveLogsOnDb)
58  // implicit start
60  typedef std::vector<edm::ParameterSet> Parameters;
61  Parameters toPut = iConfig.getParameter<Parameters>("toPut");
62  for (Parameters::iterator itToPut = toPut.begin(); itToPut != toPut.end(); ++itToPut)
63  fillRecord(*itToPut, timetypestr);
64 
66  iAR.watchPreallocate(
67  [this](edm::service::SystemBounds const& iBounds) { m_currentTimes.resize(iBounds.maxNumberOfStreams()); });
68  if (m_timetype == cond::timestamp) { //timestamp
72  } else if (m_timetype == cond::runnumber) { //runnumber
73  //NOTE: this assumes only one run is being processed at a time.
74  // This is true for 7_1_X but plan are to allow multiple in flight at a time
75  s_streamIndex = 0;
77  } else if (m_timetype == cond::lumiid) {
78  //NOTE: this assumes only one lumi is being processed at a time.
79  // This is true for 7_1_X but plan are to allow multiple in flight at a time
80  s_streamIndex = 0;
82  }
83 }

◆ ~PoolDBOutputService()

PoolDBOutputService::~PoolDBOutputService ( )
virtual

Definition at line 199 of file PoolDBOutputService.cc.

199 {}

Member Function Documentation

◆ appendSinceTime() [1/3]

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

Definition at line 265 of file PoolDBOutputService.cc.

267  {
268  std::lock_guard<std::recursive_mutex> lock(m_mutex);
269  Record& myrecord = this->lookUpRecord(recordName);
270  if (myrecord.m_isNewTag) {
271  cond::throwException(std::string("Cannot append to non-existing tag ") + myrecord.m_tag,
272  "PoolDBOutputService::appendSinceTime");
273  }
274  bool ret = false;
277  try {
278  ret = appendSinceTime(payloadId, time, myrecord);
279  } catch (const std::exception& er) {
280  cond::throwException(std::string(er.what()), "PoolDBOutputService::appendSinceTime");
281  }
282  scope.close();
283  return ret;
284 }

References cppFunctionSkipper::exception, CommonMethods::lock(), cond::service::PoolDBOutputService::Record::m_isNewTag, cond::service::PoolDBOutputService::Record::m_tag, align_cfg::recordName, runTheMatrix::ret, AlCaHLTBitMon_QueryRunRegistry::string, cond::throwException(), and protons_cff::time.

◆ appendSinceTime() [2/3]

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

Definition at line 286 of file PoolDBOutputService.cc.

288  {
289  m_logger.logInfo() << "Updating existing tag " << myrecord.m_tag << ", adding iov with since " << time;
291  try {
292  cond::persistency::IOVEditor editor = m_session.editIov(myrecord.m_tag);
293  payloadType = editor.payloadType();
294  editor.insert(time, payloadId);
295  cond::UserLogInfo a = this->lookUpUserLogInfo(myrecord.m_idName);
296  editor.flush(a.usertext);
297  } catch (const std::exception& er) {
298  cond::throwException(std::string(er.what()), "PoolDBOutputService::appendSinceTime");
299  }
300  return true;
301 }

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

◆ appendSinceTime() [3/3]

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

Definition at line 141 of file PoolDBOutputService.h.

141  {
142  if (!payloadObj)
143  throwException("Provided payload pointer is invalid.", "PoolDBOutputService::appendSinceTime");
144  std::lock_guard<std::recursive_mutex> lock(m_mutex);
145  Record& myrecord = this->lookUpRecord(recordName);
146  if (myrecord.m_isNewTag) {
147  cond::throwException(std::string("Cannot append to non-existing tag ") + myrecord.m_tag,
148  "PoolDBOutputService::appendSinceTime");
149  }
152  try {
153  appendSinceTime(m_session.storePayload(*payloadObj), sinceTime, myrecord);
154  } catch (const std::exception& er) {
155  cond::throwException(std::string(er.what()), "PoolDBOutputService::appendSinceTime");
156  }
157  scope.close();
158  }

References doStartTransaction(), cppFunctionSkipper::exception, CommonMethods::lock(), lookUpRecord(), cond::service::PoolDBOutputService::Record::m_isNewTag, m_mutex, m_session, cond::service::PoolDBOutputService::Record::m_tag, cond::persistency::Session::storePayload(), AlCaHLTBitMon_QueryRunRegistry::string, cond::throwException(), and cond::persistency::Session::transaction().

Referenced by DBWriter::analyze(), SiStripNoisesBuilder::analyze(), SiStripApvGainBuilder::analyze(), SiStripPedestalsBuilder::analyze(), SiStripSummaryBuilder::analyze(), SiStripThresholdBuilder::analyze(), SiStripDetVOffFakeBuilder::analyze(), WriteEcalMiscalibConstants::analyze(), WriteEcalMiscalibConstantsMC::analyze(), SiStripNoiseNormalizedWithApvGainBuilder::analyze(), SiStripApvGainBuilderFromTag::analyze(), EcalTestDevDB::analyze(), SiStripFedCablingBuilder::beginRun(), CocoaDBMgr::DumpCocoaResults(), BeamSpotWrite2DB::endJob(), StoreESCondition::endJob(), BeamSpotOnlineHLTRcdWriter::endJob(), BeamSpotOnlineLegacyRcdWriter::endJob(), StoreEcalCondition::endJob(), SiStripFedCablingManipulator::endRun(), HLTPrescaleRecorder::endRun(), SiStripBadChannelBuilder::getNewObject(), l1t::DataWriterExt::updateIOV(), l1t::DataWriter::updateIOV(), CaloGeometryDBWriter::write(), BeamFitter::write2DB(), AlCaRecoTriggerBitsRcdUpdate::writeBitsToDB(), CaloGeometryDBWriter::writeIndexed(), and writeOne().

◆ beginOfTime()

cond::Time_t PoolDBOutputService::beginOfTime ( ) const

Definition at line 215 of file PoolDBOutputService.cc.

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

Referenced by DBWriter::analyze(), L1KeyListWriter::analyze(), L1KeyWriter::analyze(), L1TMuonOverlapParamsWriter::analyze(), SiStripNoisesBuilder::analyze(), L1TCaloParamsUpdater::analyze(), SiStripApvGainBuilder::analyze(), SiStripPedestalsBuilder::analyze(), SiStripSummaryBuilder::analyze(), SiStripThresholdBuilder::analyze(), EcalPFRecHitThresholdsMaker::analyze(), L1TCaloStage2ParamsWriter::analyze(), L1TGlobalPrescalesVetosWriter::analyze(), L1TMuonGlobalParamsWriter::analyze(), SiStripDetVOffFakeBuilder::analyze(), L1MenuWriter::analyze(), L1TMuonEndCapParamsWriter::analyze(), L1TMuonEndCapForestWriter::analyze(), SurveyInputTrackerFromDB::analyze(), L1TMuonBarrelParamsWriter::analyze(), GBRForestWriter::analyze(), WriteEcalMiscalibConstantsMC::analyze(), WriteEcalMiscalibConstants::analyze(), TrackerSystematicMisalignments::analyze(), PPSGeometryBuilder::analyze(), SiStripNoiseNormalizedWithApvGainBuilder::analyze(), SiStripApvGainBuilderFromTag::analyze(), EcalTestDevDB::analyze(), TrackerGeometryCompare::analyze(), XMLGeometryBuilder::beginJob(), PTrackerAdditionalParametersPerDetDBBuilder::beginRun(), PTrackerParametersDBBuilder::beginRun(), HcalParametersDBBuilder::beginRun(), SiStripFedCablingBuilder::beginRun(), PHGCalParametersDBBuilder::beginRun(), RPCRecoIdealDBLoader::beginRun(), CSCRecoIdealDBLoader::beginRun(), ME0RecoIdealDBLoader::beginRun(), DTRecoIdealDBLoader::beginRun(), GEMRecoIdealDBLoader::beginRun(), PGeometricDetBuilder::beginRun(), EcalTPGDBCopy::copyToDB(), EcalDBCopy::copyToDB(), ESDBCopy::copyToDB(), SiStripBadStripFromQualityDBWriter::dqmEndJob(), CocoaDBMgr::DumpCocoaResults(), BeamSpotWrite2DB::endJob(), StoreESCondition::endJob(), BeamProfile2DB::endJob(), BeamSpotOnlineLegacyRcdWriter::endJob(), BeamSpotOnlineHLTRcdWriter::endJob(), StoreEcalCondition::endJob(), SiStripFedCablingManipulator::endRun(), DummyCondDBWriter< TObject, TObjectO, TRecord >::endRun(), HLTPrescaleRecorder::endRun(), LaserAlignment::endRunProduce(), SiStripBadChannelBuilder::getNewObject(), EcalLaserCondTools::processIov(), MuonMisalignedProducer::saveToDB(), ConditionDBWriter< SiStripApvGain >::storeOnDb(), l1t::DataWriter::updateIOV(), l1t::DataWriterExt::updateIOV(), CaloGeometryDBWriter::write(), BeamFitter::write2DB(), CaloGeometryDBWriter::writeIndexed(), and DTCalibDBUtils::writeToDB().

◆ closeIOV()

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

Definition at line 346 of file PoolDBOutputService.cc.

346  {
347  std::lock_guard<std::recursive_mutex> lock(m_mutex);
348  Record& myrecord = lookUpRecord(recordName);
349  if (myrecord.m_isNewTag) {
350  cond::throwException(std::string("Cannot close non-existing tag ") + myrecord.m_tag,
351  "PoolDBOutputService::closeIOV");
352  }
353  m_logger.logInfo() << "Updating existing tag " << myrecord.m_tag << ", closing with end of validity " << lastTill;
356  try {
357  cond::persistency::IOVEditor editor = m_session.editIov(myrecord.m_tag);
358  editor.setEndOfValidity(lastTill);
359  editor.flush("Tag closed.");
360  } catch (const std::exception& er) {
361  cond::throwException(std::string(er.what()), "PoolDBOutputService::closeIOV");
362  }
363  scope.close();
364 }

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

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

◆ commitTransaction()

void PoolDBOutputService::commitTransaction ( )

Definition at line 152 of file PoolDBOutputService.cc.

152  {
153  std::lock_guard<std::recursive_mutex> lock(m_mutex);
155 }

References CommonMethods::lock().

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

◆ createNewIOV() [1/3]

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

Definition at line 222 of file PoolDBOutputService.cc.

224  {
225  std::lock_guard<std::recursive_mutex> lock(m_mutex);
226  Record& myrecord = this->lookUpRecord(recordName);
227  if (!myrecord.m_isNewTag) {
228  cond::throwException(myrecord.m_tag + " is not a new tag", "PoolDBOutputService::createNewIOV");
229  }
230  m_logger.logInfo() << "Creating new tag " << myrecord.m_tag << ", adding iov with since " << firstSinceTime
231  << " pointing to payload id " << firstPayloadId;
234  try {
235  this->initDB();
237  m_session.createIovForPayload(firstPayloadId, myrecord.m_tag, myrecord.m_timetype, cond::SYNCH_ANY);
238  editor.setDescription("New Tag");
239  editor.insert(firstSinceTime, firstPayloadId);
240  cond::UserLogInfo a = this->lookUpUserLogInfo(myrecord.m_idName);
241  editor.flush(a.usertext);
242  myrecord.m_isNewTag = false;
243  } catch (const std::exception& er) {
244  cond::throwException(std::string(er.what()), "PoolDBOutputService::createNewIov");
245  }
246  scope.close();
247 }

References a, cppFunctionSkipper::exception, cond::persistency::IOVEditor::flush(), cond::persistency::IOVEditor::insert(), CommonMethods::lock(), cond::service::PoolDBOutputService::Record::m_idName, cond::service::PoolDBOutputService::Record::m_isNewTag, cond::service::PoolDBOutputService::Record::m_tag, cond::service::PoolDBOutputService::Record::m_timetype, align_cfg::recordName, cond::persistency::IOVEditor::setDescription(), AlCaHLTBitMon_QueryRunRegistry::string, cond::SYNCH_ANY, and cond::throwException().

◆ createNewIOV() [2/3]

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

Definition at line 249 of file PoolDBOutputService.cc.

252  {
253  m_logger.logInfo() << "Creating new tag " << myrecord.m_tag << " for payload type " << payloadType
254  << ", adding iov with since " << firstSinceTime;
255  // FIX ME: synchronization type and description have to be passed as the other parameters?
257  m_session.createIov(payloadType, myrecord.m_tag, myrecord.m_timetype, cond::SYNCH_ANY);
258  editor.setDescription("New Tag");
259  editor.insert(firstSinceTime, firstPayloadId);
260  cond::UserLogInfo a = this->lookUpUserLogInfo(myrecord.m_idName);
261  editor.flush(a.usertext);
262  myrecord.m_isNewTag = false;
263 }

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_FULL_cff::payloadType, cond::persistency::IOVEditor::setDescription(), and cond::SYNCH_ANY.

◆ createNewIOV() [3/3]

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

Definition at line 116 of file PoolDBOutputService.h.

119  {
120  if (!firstPayloadObj)
121  throwException("Provided payload pointer is invalid.", "PoolDBOutputService::createNewIOV");
122  std::lock_guard<std::recursive_mutex> lock(m_mutex);
123  Record& myrecord = this->lookUpRecord(recordName);
124  if (!myrecord.m_isNewTag) {
125  cond::throwException(myrecord.m_tag + " is not a new tag", "PoolDBOutputService::createNewIOV");
126  }
129  try {
130  this->initDB();
131  Hash payloadId = m_session.storePayload(*firstPayloadObj);
132  createNewIOV(payloadId, cond::demangledName(typeid(T)), firstSinceTime, myrecord);
133  } catch (const std::exception& er) {
134  cond::throwException(std::string(er.what()), "PoolDBOutputService::createNewIov");
135  }
136  scope.close();
137  }

References doStartTransaction(), cppFunctionSkipper::exception, initDB(), CommonMethods::lock(), lookUpRecord(), cond::service::PoolDBOutputService::Record::m_isNewTag, m_mutex, m_session, cond::service::PoolDBOutputService::Record::m_tag, cond::persistency::Session::storePayload(), AlCaHLTBitMon_QueryRunRegistry::string, cond::throwException(), and cond::persistency::Session::transaction().

Referenced by SiStripApvSimulationParametersBuilder::analyze(), DBWriter::analyze(), SiStripNoisesBuilder::analyze(), SiStripApvGainBuilder::analyze(), SiStripPedestalsBuilder::analyze(), SiStripSummaryBuilder::analyze(), SiStripThresholdBuilder::analyze(), EcalPFRecHitThresholdsMaker::analyze(), SiStripDetVOffFakeBuilder::analyze(), WriteEcalMiscalibConstants::analyze(), WriteEcalMiscalibConstantsMC::analyze(), SiStripNoiseNormalizedWithApvGainBuilder::analyze(), SiStripApvGainBuilderFromTag::analyze(), EcalTestDevDB::analyze(), XMLGeometryBuilder::beginJob(), PTrackerAdditionalParametersPerDetDBBuilder::beginRun(), PTrackerParametersDBBuilder::beginRun(), HcalParametersDBBuilder::beginRun(), SiStripFedCablingBuilder::beginRun(), ME0RecoIdealDBLoader::beginRun(), CSCRecoIdealDBLoader::beginRun(), PHGCalParametersDBBuilder::beginRun(), RPCRecoIdealDBLoader::beginRun(), DTRecoIdealDBLoader::beginRun(), GEMRecoIdealDBLoader::beginRun(), PGeometricDetBuilder::beginRun(), ESDBCopy::copyToDB(), EcalTPGDBCopy::copyToDB(), EcalDBCopy::copyToDB(), CocoaDBMgr::DumpCocoaResults(), BeamSpotWrite2DB::endJob(), StoreESCondition::endJob(), BeamProfile2DB::endJob(), BeamSpotOnlineHLTRcdWriter::endJob(), BeamSpotOnlineLegacyRcdWriter::endJob(), StoreEcalCondition::endJob(), SiStripFedCablingManipulator::endRun(), HLTPrescaleRecorder::endRun(), SiStripBadChannelBuilder::getNewObject(), l1t::DataWriterExt::updateIOV(), l1t::DataWriter::updateIOV(), CaloGeometryDBWriter::write(), BeamFitter::write2DB(), AlCaRecoTriggerBitsRcdUpdate::writeBitsToDB(), CaloGeometryDBWriter::writeIndexed(), and writeOne().

◆ currentTime()

cond::Time_t PoolDBOutputService::currentTime ( ) const

Definition at line 217 of file PoolDBOutputService.cc.

217  {
218  assert(-1 != s_streamIndex);
220 }

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

Referenced by DBWriter::analyze(), SiStripNoisesBuilder::analyze(), L1MuonOverlapParamsDBProducer::analyze(), SiStripApvGainBuilder::analyze(), SiStripPedestalsBuilder::analyze(), SiStripSummaryBuilder::analyze(), SiStripThresholdBuilder::analyze(), SiStripDetVOffFakeBuilder::analyze(), WritePPSAlignmentConfig::analyze(), WriteEcalMiscalibConstants::analyze(), WriteEcalMiscalibConstantsMC::analyze(), BufferedBoostIODBWriter::analyze(), SiStripNoiseNormalizedWithApvGainBuilder::analyze(), SiStripApvGainBuilderFromTag::analyze(), EcalSCDynamicDPhiParametersMaker::analyze(), EcalMustacheSCParametersMaker::analyze(), AlignPCLThresholdsWriter::analyze(), FFTJetCorrectorDBWriter::analyze(), BoostIODBWriter< DataType >::analyze(), SiStripApvGainRescaler::analyze(), SiPhase2OuterTrackerLorentzAngleWriter::analyze(), SiStripChannelGainFromDBMiscalibrator::analyze(), SiStripNoisesFromDBMiscalibrator::analyze(), SiStripFedCablingBuilder::beginRun(), SiStripBadStripFromQualityDBWriter::dqmEndJob(), ECALpedestalPCLHarvester::dqmEndJob(), PPSTimingCalibrationPCLHarvester::dqmEndJob(), SiStripGainsPCLHarvester::dqmEndJob(), CocoaDBMgr::DumpCocoaResults(), SurveyDBUploader::endJob(), BeamSpotWrite2DB::endJob(), Mixing2DB::endJob(), BeamSpotOnlineLegacyRcdWriter::endJob(), BeamSpotOnlineHLTRcdWriter::endJob(), SiStripFedCablingManipulator::endRun(), DummyCondDBWriter< TObject, TObjectO, TRecord >::endRun(), WriteCTPPSPixGainCalibrations::fillDB(), SiStripBadChannelBuilder::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(), GlobalTrackerMuonAlignment::writeGlPosRcd(), CaloGeometryDBWriter::writeIndexed(), and DTCalibDBUtils::writeToDB().

◆ doCommitTransaction()

void PoolDBOutputService::doCommitTransaction ( )
private

Definition at line 140 of file PoolDBOutputService.cc.

140  {
141  if (m_transactionActive) {
143  m_transactionActive = false;
144  }
145 }

Referenced by writeOne().

◆ doStartTransaction()

void PoolDBOutputService::doStartTransaction ( )
private

Definition at line 133 of file PoolDBOutputService.cc.

133  {
134  if (!m_transactionActive) {
135  m_session.transaction().start(false);
136  m_transactionActive = true;
137  }
138 }

Referenced by appendSinceTime(), createNewIOV(), and writeOne().

◆ endOfTime()

cond::Time_t PoolDBOutputService::endOfTime ( ) const

Definition at line 213 of file PoolDBOutputService.cc.

213 { return timeTypeSpecs[m_timetype].endValue; }

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

Referenced by DBWriter::analyze(), EcalDQMStatusWriter::analyze(), SiStripNoisesBuilder::analyze(), SiStripApvGainBuilder::analyze(), SiStripSummaryBuilder::analyze(), SiStripThresholdBuilder::analyze(), SiStripPedestalsBuilder::analyze(), EcalPFRecHitThresholdsMaker::analyze(), SiStripDetVOffFakeBuilder::analyze(), WriteEcalMiscalibConstantsMC::analyze(), WriteEcalMiscalibConstants::analyze(), SiStripNoiseNormalizedWithApvGainBuilder::analyze(), SiStripApvGainBuilderFromTag::analyze(), EcalTestDevDB::analyze(), XMLGeometryBuilder::beginJob(), PTrackerAdditionalParametersPerDetDBBuilder::beginRun(), PTrackerParametersDBBuilder::beginRun(), HcalParametersDBBuilder::beginRun(), SiStripFedCablingBuilder::beginRun(), CSCRecoIdealDBLoader::beginRun(), ME0RecoIdealDBLoader::beginRun(), PHGCalParametersDBBuilder::beginRun(), RPCRecoIdealDBLoader::beginRun(), DTRecoIdealDBLoader::beginRun(), GEMRecoIdealDBLoader::beginRun(), PGeometricDetBuilder::beginRun(), EcalTPGDBCopy::copyToDB(), EcalDBCopy::copyToDB(), ESDBCopy::copyToDB(), CocoaDBMgr::DumpCocoaResults(), BeamSpotWrite2DB::endJob(), StoreESCondition::endJob(), BeamProfile2DB::endJob(), BeamSpotOnlineHLTRcdWriter::endJob(), BeamSpotOnlineLegacyRcdWriter::endJob(), StoreEcalCondition::endJob(), SiStripFedCablingManipulator::endRun(), HLTPrescaleRecorder::endRun(), SiStripBadChannelBuilder::getNewObject(), CaloGeometryDBWriter::write(), BeamFitter::write2DB(), AlCaRecoTriggerBitsRcdUpdate::writeBitsToDB(), and CaloGeometryDBWriter::writeIndexed().

◆ eraseSinceTime()

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

Definition at line 303 of file PoolDBOutputService.cc.

305  {
306  std::lock_guard<std::recursive_mutex> lock(m_mutex);
307  Record& myrecord = this->lookUpRecord(recordName);
308  if (myrecord.m_isNewTag) {
309  cond::throwException(std::string("Cannot delete from non-existing tag ") + myrecord.m_tag,
310  "PoolDBOutputService::appendSinceTime");
311  }
312  m_logger.logInfo() << "Updating existing tag " << myrecord.m_tag << ", removing iov with since " << sinceTime
313  << " pointing to payload id " << payloadId;
316  try {
317  cond::persistency::IOVEditor editor = m_session.editIov(myrecord.m_tag);
318  editor.erase(sinceTime, payloadId);
320  editor.flush(a.usertext);
321 
322  } catch (const std::exception& er) {
323  cond::throwException(std::string(er.what()), "PoolDBOutputService::eraseSinceTime");
324  }
325  scope.close();
326 }

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

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

◆ fillRecord()

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

Definition at line 20 of file PoolDBOutputService.cc.

20  {
21  Record thisrecord;
22 
23  thisrecord.m_idName = recordPset.getParameter<std::string>("record");
24  thisrecord.m_tag = recordPset.getParameter<std::string>("tag");
25 
26  thisrecord.m_timetype =
27  cond::time::timeTypeFromName(recordPset.getUntrackedParameter<std::string>("timetype", gTimeTypeStr));
28 
29  thisrecord.m_onlyAppendUpdatePolicy = recordPset.getUntrackedParameter<bool>("onlyAppendUpdatePolicy", false);
30 
31  m_records.insert(std::make_pair(thisrecord.m_idName, thisrecord));
32 
33  cond::UserLogInfo userloginfo;
34  m_logheaders.insert(std::make_pair(thisrecord.m_idName, userloginfo));
35 }

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_tag, cond::service::PoolDBOutputService::Record::m_timetype, AlCaHLTBitMon_QueryRunRegistry::string, and cond::time::timeTypeFromName().

◆ forceInit()

void PoolDBOutputService::forceInit ( )

Definition at line 201 of file PoolDBOutputService.cc.

201  {
202  std::lock_guard<std::recursive_mutex> lock(m_mutex);
205  try {
206  initDB();
207  } catch (const std::exception& er) {
208  cond::throwException(std::string(er.what()), "PoolDBOutputService::forceInit");
209  }
210  scope.close();
211 }

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

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

◆ getTagInfo()

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

Definition at line 375 of file PoolDBOutputService.cc.

375  {
377  result.name = record.m_tag;
378  m_logger.logDebug() << "Fetching tag info for " << record.m_tag;
380  bool ret = false;
382  try {
383  //use iovproxy to find out.
384  if (m_session.existsIov(record.m_tag)) {
386  result.lastInterval = iov.getLast();
387  ret = true;
388  }
389  } catch (const std::exception& er) {
390  cond::throwException(std::string(er.what()), "PoolDBOutputService::tagInfo");
391  }
392  scope.close();
393  return ret;
394 }

References cppFunctionSkipper::exception, cond::persistency::IOVProxy::getLast(), AlCaHarvesting_cff::record, align_cfg::recordName, mps_fire::result, runTheMatrix::ret, AlCaHLTBitMon_QueryRunRegistry::string, and cond::throwException().

Referenced by writeOne().

◆ initDB()

void PoolDBOutputService::initDB ( )
private

Definition at line 157 of file PoolDBOutputService.cc.

157  {
158  if (!m_dbInitialised) {
159  if (!m_session.existsDatabase())
161  else {
162  for (auto& iR : m_records) {
163  if (m_session.existsIov(iR.second.m_tag))
164  iR.second.m_isNewTag = false;
165  }
166  }
167  m_dbInitialised = true;
168  }
169 }

Referenced by createNewIOV(), and writeOne().

◆ isNewTagRequest()

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

Definition at line 128 of file PoolDBOutputService.cc.

128  {
129  Record& myrecord = this->lookUpRecord(recordName);
130  return myrecord.m_isNewTag;
131 }

References cond::service::PoolDBOutputService::Record::m_isNewTag, and align_cfg::recordName.

Referenced by DBWriter::analyze(), SiStripNoisesBuilder::analyze(), SiStripPedestalsBuilder::analyze(), SiStripSummaryBuilder::analyze(), SiStripThresholdBuilder::analyze(), SiStripApvGainBuilder::analyze(), SiStripDetVOffFakeBuilder::analyze(), WriteEcalMiscalibConstants::analyze(), WriteEcalMiscalibConstantsMC::analyze(), SiStripNoiseNormalizedWithApvGainBuilder::analyze(), SiStripApvGainBuilderFromTag::analyze(), EcalTestDevDB::analyze(), XMLGeometryBuilder::beginJob(), PTrackerAdditionalParametersPerDetDBBuilder::beginRun(), PTrackerParametersDBBuilder::beginRun(), HcalParametersDBBuilder::beginRun(), SiStripFedCablingBuilder::beginRun(), CSCRecoIdealDBLoader::beginRun(), ME0RecoIdealDBLoader::beginRun(), PHGCalParametersDBBuilder::beginRun(), RPCRecoIdealDBLoader::beginRun(), DTRecoIdealDBLoader::beginRun(), GEMRecoIdealDBLoader::beginRun(), PGeometricDetBuilder::beginRun(), CocoaDBMgr::DumpCocoaResults(), BeamSpotWrite2DB::endJob(), StoreESCondition::endJob(), BeamSpotOnlineHLTRcdWriter::endJob(), BeamSpotOnlineLegacyRcdWriter::endJob(), StoreEcalCondition::endJob(), SiStripFedCablingManipulator::endRun(), AlcaBeamSpotHarvester::endRun(), HLTPrescaleRecorder::endRun(), SiStripBadChannelBuilder::getNewObject(), EcalLaserCondTools::processIov(), ConditionDBWriter< SiStripApvGain >::storeOnDb(), l1t::DataWriter::updateIOV(), l1t::DataWriterExt::updateIOV(), CaloGeometryDBWriter::write(), BeamFitter::write2DB(), AlCaRecoTriggerBitsRcdUpdate::writeBitsToDB(), CaloGeometryDBWriter::writeIndexed(), writeOne(), and DTCalibDBUtils::writeToDB().

◆ lockRecords()

void PoolDBOutputService::lockRecords ( )

Definition at line 94 of file PoolDBOutputService.cc.

94  {
95  std::lock_guard<std::recursive_mutex> lock(m_mutex);
98  this->initDB();
99  for (auto& iR : m_records) {
100  if (iR.second.m_isNewTag == false) {
101  cond::persistency::IOVEditor editor = m_session.editIov(iR.second.m_tag);
102  editor.lock();
103  }
104  }
106  scope.close();
107 }

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

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

◆ logger()

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

◆ lookUpRecord()

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

Definition at line 328 of file PoolDBOutputService.cc.

329  {
330  std::map<std::string, Record>::iterator it = m_records.find(recordName);
331  if (it == m_records.end()) {
332  cond::throwException("The record \"" + recordName + "\" has not been registered.",
333  "PoolDBOutputService::lookUpRecord");
334  }
335  return it->second;
336 }

References align_cfg::recordName, and cond::throwException().

Referenced by appendSinceTime(), createNewIOV(), and writeOne().

◆ lookUpUserLogInfo()

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

Definition at line 338 of file PoolDBOutputService.cc.

338  {
339  std::map<std::string, cond::UserLogInfo>::iterator it = m_logheaders.find(recordName);
340  if (it == m_logheaders.end())
341  throw cond::Exception("Log db was not set for record " + recordName +
342  " from PoolDBOutputService::lookUpUserLogInfo");
343  return it->second;
344 }

References align_cfg::recordName.

◆ newReadOnlySession()

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

◆ postEndJob()

void PoolDBOutputService::postEndJob ( )

Definition at line 171 of file PoolDBOutputService.cc.

171 { commitTransaction(); }

◆ postModuleEvent()

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

Definition at line 182 of file PoolDBOutputService.cc.

183  {
184  s_streamIndex = -1;
185 }

References s_streamIndex.

◆ preEventProcessing()

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

Definition at line 173 of file PoolDBOutputService.cc.

173  {
174  m_currentTimes[iContext.streamID().value()] = iContext.timestamp().value();
175 }

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

◆ preGlobalBeginLumi()

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

Definition at line 193 of file PoolDBOutputService.cc.

193  {
194  for (auto& time : m_currentTimes) {
195  time = iContext.luminosityBlockID().value();
196  }
197 }

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

◆ preGlobalBeginRun()

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

Definition at line 187 of file PoolDBOutputService.cc.

187  {
188  for (auto& time : m_currentTimes) {
189  time = iContext.luminosityBlockID().run();
190  }
191 }

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

◆ preModuleEvent()

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

Definition at line 177 of file PoolDBOutputService.cc.

178  {
179  s_streamIndex = iContext.streamID().value();
180 }

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

◆ releaseLocks()

void PoolDBOutputService::releaseLocks ( )

Definition at line 109 of file PoolDBOutputService.cc.

109  {
110  std::lock_guard<std::recursive_mutex> lock(m_mutex);
113  this->initDB();
114  for (auto& iR : m_records) {
115  if (iR.second.m_isNewTag == false) {
116  cond::persistency::IOVEditor editor = m_session.editIov(iR.second.m_tag);
117  editor.unlock();
118  }
119  }
121  scope.close();
122 }

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

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

◆ 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 366 of file PoolDBOutputService.cc.

368  {
369  cond::UserLogInfo& myloginfo = this->lookUpUserLogInfo(recordName);
370  myloginfo.provenance = dataprovenance;
371  myloginfo.usertext = usertext;
372 }

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

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

◆ startTransaction()

void PoolDBOutputService::startTransaction ( )

Definition at line 147 of file PoolDBOutputService.cc.

147  {
148  std::lock_guard<std::recursive_mutex> lock(m_mutex);
150 }

References CommonMethods::lock().

◆ tag()

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

◆ tagInfo()

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

◆ writeOne()

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

Definition at line 63 of file PoolDBOutputService.h.

63  {
64  if (!payload)
65  throwException("Provided payload pointer is invalid.", "PoolDBOutputService::writeOne");
66  std::lock_guard<std::recursive_mutex> lock(m_mutex);
69  Hash thePayloadHash("");
70  try {
71  this->initDB();
72  Record& myrecord = this->lookUpRecord(recordName);
73  m_logger.logInfo() << "Tag mapped to record " << recordName << ": " << myrecord.m_tag;
74  bool newTag = isNewTagRequest(recordName);
75  if (myrecord.m_onlyAppendUpdatePolicy && !newTag) {
76  cond::TagInfo_t tInfo;
77  this->getTagInfo(myrecord.m_idName, tInfo);
78  cond::Time_t lastSince = tInfo.lastInterval.since;
79  if (lastSince == cond::time::MAX_VAL)
80  lastSince = 0;
81  if (time <= lastSince) {
82  m_logger.logInfo() << "Won't append iov with since " << std::to_string(time)
83  << ", because is less or equal to last available since = " << lastSince;
84  if (m_autoCommit)
86  scope.close();
87  return thePayloadHash;
88  }
89  }
90  thePayloadHash = m_session.storePayload(*payload);
91  std::string payloadType = cond::demangledName(typeid(T));
92  if (newTag) {
93  createNewIOV(thePayloadHash, payloadType, time, myrecord);
94  } else {
95  appendSinceTime(thePayloadHash, time, myrecord);
96  }
97  if (m_autoCommit) {
99  m_logger.logWarning() << "Waiting " << m_writeTransactionDelay << "s before commit the changes...";
100  ::sleep(m_writeTransactionDelay);
101  }
103  }
104  } catch (const std::exception& er) {
105  cond::throwException(std::string(er.what()), "PoolDBOutputService::writeOne");
106  }
107  scope.close();
108  return thePayloadHash;
109  }

References appendSinceTime(), createNewIOV(), doCommitTransaction(), doStartTransaction(), cppFunctionSkipper::exception, getTagInfo(), initDB(), isNewTagRequest(), cond::TagInfo_t::lastInterval, CommonMethods::lock(), cond::persistency::Logger::logInfo(), cond::persistency::Logger::logWarning(), lookUpRecord(), m_autoCommit, cond::service::PoolDBOutputService::Record::m_idName, m_logger, m_mutex, cond::service::PoolDBOutputService::Record::m_onlyAppendUpdatePolicy, m_session, cond::service::PoolDBOutputService::Record::m_tag, m_writeTransactionDelay, cond::time::MAX_VAL(), jets_cff::payload, HLT_FULL_cff::payloadType, align_cfg::recordName, cond::Iov_t::since, cond::persistency::Session::storePayload(), AlCaHLTBitMon_QueryRunRegistry::string, cond::throwException(), protons_cff::time, and cond::persistency::Session::transaction().

Referenced by EcalDQMStatusWriter::analyze(), L1MuonOverlapParamsDBProducer::analyze(), L1TCaloParamsUpdater::analyze(), SurveyInputTrackerFromDB::analyze(), WritePPSAlignmentConfig::analyze(), GBRForestWriter::analyze(), TrackerSystematicMisalignments::analyze(), BufferedBoostIODBWriter::analyze(), PPSGeometryBuilder::analyze(), WriteCTPPSBeamParameters::analyze(), EcalMustacheSCParametersMaker::analyze(), EcalSCDynamicDPhiParametersMaker::analyze(), WriteCTPPSPixelAnalysisMask::analyze(), CTPPSRPAlignmentInfoAnalyzer::analyze(), WriteCTPPSPixelDAQMapping::analyze(), AlignPCLThresholdsWriter::analyze(), FFTJetCorrectorDBWriter::analyze(), BoostIODBWriter< DataType >::analyze(), TrackerGeometryCompare::analyze(), SiStripApvGainRescaler::analyze(), SiPhase2OuterTrackerLorentzAngleWriter::analyze(), SiStripChannelGainFromDBMiscalibrator::analyze(), SiStripNoisesFromDBMiscalibrator::analyze(), MCMisalignmentScaler::analyze(), DTCCablingMapTestProducer::beginJob(), DTUserKeyedConfigHandler::chkConfigList(), DTKeyedConfigHandler::chkConfigList(), SiPixelStatusHarvester::constructTag(), EcalDBCopy::copyToDB(), SiStripBadStripFromQualityDBWriter::dqmEndJob(), ECALpedestalPCLHarvester::dqmEndJob(), PPSTimingCalibrationPCLHarvester::dqmEndJob(), SiStripGainsPCLHarvester::dqmEndJob(), SiPixelStatusHarvester::dqmEndRun(), CorrPCCProducer::dqmEndRunProduce(), SurveyDBUploader::endJob(), Mixing2DB::endJob(), DTKeyedConfigDBInit::endJob(), DTCCablingMapProducer::endJob(), SiStripLorentzAngleCalibration::endOfJob(), SiPixelLorentzAngleCalibration::endOfJob(), SiStripBackplaneCalibration::endOfJob(), DummyCondDBWriter< TObject, TObjectO, TRecord >::endRun(), AlcaBeamSpotHarvester::endRun(), cond::BTransitionAnalyzer< EcalADCToGeVConstant, EcalADCToGeVConstantRcd >::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(), AlignmentProducerBase::writeDB(), GlobalTrackerMuonAlignment::writeGlPosRcd(), popcon::PopCon::writeOne(), DTCalibDBUtils::writeToDB(), and CreateIdealTkAlRecords::writeToDB().

Member Data Documentation

◆ m_autoCommit

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

Definition at line 252 of file PoolDBOutputService.h.

Referenced by writeOne().

◆ m_connection

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

Definition at line 249 of file PoolDBOutputService.h.

◆ m_currentTimes

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

Definition at line 247 of file PoolDBOutputService.h.

◆ m_dbInitialised

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

Definition at line 254 of file PoolDBOutputService.h.

◆ m_logger

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

Definition at line 244 of file PoolDBOutputService.h.

Referenced by logger(), and writeOne().

◆ m_logheaders

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

Definition at line 257 of file PoolDBOutputService.h.

Referenced by fillRecord().

◆ m_mutex

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

Definition at line 245 of file PoolDBOutputService.h.

Referenced by appendSinceTime(), createNewIOV(), and writeOne().

◆ m_records

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

Definition at line 256 of file PoolDBOutputService.h.

Referenced by fillRecord().

◆ m_session

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

Definition at line 250 of file PoolDBOutputService.h.

Referenced by appendSinceTime(), createNewIOV(), and writeOne().

◆ m_timetype

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

Definition at line 246 of file PoolDBOutputService.h.

◆ m_transactionActive

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

Definition at line 251 of file PoolDBOutputService.h.

◆ m_writeTransactionDelay

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

Definition at line 253 of file PoolDBOutputService.h.

Referenced by writeOne().

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:543
cond::persistency::TransactionScope
Definition: Session.h:231
cond::service::PoolDBOutputService::lookUpRecord
Record & lookUpRecord(const std::string &recordName)
Definition: PoolDBOutputService.cc:328
cond::persistency::IOVEditor::insert
void insert(cond::Time_t since, const cond::Hash &payloadHash, bool checkType=false)
Definition: IOVEditor.cc:159
cond::lumiid
Definition: Time.h:19
cond::service::PoolDBOutputService::initDB
void initDB()
Definition: PoolDBOutputService.cc:157
cond::TimeTypeSpecs::beginValue
Time_t beginValue
Definition: Time.h:41
cond::service::PoolDBOutputService::m_logheaders
std::map< std::string, cond::UserLogInfo > m_logheaders
Definition: PoolDBOutputService.h:257
cond::persistency::IOVProxy::getLast
cond::Iov_t getLast()
Definition: IOVProxy.cc:396
cond::Hash
std::string Hash
Definition: Types.h:43
cond::persistency::Session::existsIov
bool existsIov(const std::string &tag)
Definition: Session.cc:77
s_streamIndex
static thread_local int s_streamIndex
Definition: PoolDBOutputService.cc:18
cond::persistency::Logger::setDbDestination
void setDbDestination(const std::string &connectionString)
Definition: Logger.cc:66
cond::service::PoolDBOutputService::m_timetype
cond::TimeType m_timetype
Definition: PoolDBOutputService.h:246
align_cfg.recordName
recordName
Definition: align_cfg.py:66
cond::service::PoolDBOutputService::preModuleEvent
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: PoolDBOutputService.cc:177
cond::persistency::IOVEditor
Definition: IOVEditor.h:28
cond::service::PoolDBOutputService::preGlobalBeginLumi
void preGlobalBeginLumi(edm::GlobalContext const &)
Definition: PoolDBOutputService.cc:193
cond::service::PoolDBOutputService::appendSinceTime
void appendSinceTime(const T *payloadObj, cond::Time_t sinceTime, const std::string &recordName)
Definition: PoolDBOutputService.h:141
cms::cuda::assert
assert(be >=bs)
protons_cff.time
time
Definition: protons_cff.py:35
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
cond::service::PoolDBOutputService::m_records
std::map< std::string, Record > m_records
Definition: PoolDBOutputService.h:256
cond::persistency::Logger::logInfo
EchoedLogStream< edm::LogInfo > logInfo()
Definition: Logger.cc:157
cond::service::PoolDBOutputService::m_autoCommit
bool m_autoCommit
Definition: PoolDBOutputService.h:252
cond::persistency::ConnectionPool::createSession
Session createSession(const std::string &connectionString, bool writeCapable=false)
Definition: ConnectionPool.cc:174
cond::persistency::ConnectionPool::setLogDestination
void setLogDestination(Logger &logger)
Definition: ConnectionPool.cc:192
cond::persistency::Session::createDatabase
void createDatabase()
Definition: Session.cc:61
cond::service::PoolDBOutputService::m_session
cond::persistency::Session m_session
Definition: PoolDBOutputService.h:250
cond::timestamp
Definition: Time.h:19
cond::service::PoolDBOutputService::lookUpUserLogInfo
cond::UserLogInfo & lookUpUserLogInfo(const std::string &recordName)
Definition: PoolDBOutputService.cc:338
cond::timeTypeSpecs
const TimeTypeSpecs timeTypeSpecs[]
Definition: Time.cc:16
edm::ActivityRegistry::watchPostEndJob
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
Definition: ActivityRegistry.h:170
cond::service::PoolDBOutputService::createNewIOV
void createNewIOV(const T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t, const std::string &recordName)
Definition: PoolDBOutputService.h:116
cond::service::PoolDBOutputService::preEventProcessing
void preEventProcessing(edm::StreamContext const &)
Definition: PoolDBOutputService.cc:173
edm::ActivityRegistry::watchPreEvent
void watchPreEvent(PreEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:474
cond::service::PoolDBOutputService::commitTransaction
void commitTransaction()
Definition: PoolDBOutputService.cc:152
jets_cff.payload
payload
Definition: jets_cff.py:32
cond::service::PoolDBOutputService::postEndJob
void postEndJob()
Definition: PoolDBOutputService.cc:171
cond::service::PoolDBOutputService::doStartTransaction
void doStartTransaction()
Definition: PoolDBOutputService.cc:133
cond::service::PoolDBOutputService::postModuleEvent
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: PoolDBOutputService.cc:182
cond::service::PoolDBOutputService::m_connection
cond::persistency::ConnectionPool m_connection
Definition: PoolDBOutputService.h:249
cond::persistency::Logger::logDebug
EchoedLogStream< edm::LogDebug_ > logDebug()
Definition: Logger.cc:161
cond::persistency::Session::readIov
IOVProxy readIov(const std::string &tag)
Definition: Session.cc:63
cond::service::PoolDBOutputService::fillRecord
void fillRecord(edm::ParameterSet &pset, const std::string &gTimeTypeStr)
Definition: PoolDBOutputService.cc:20
cond::persistency::IOVEditor::setDescription
void setDescription(const std::string &description)
Definition: IOVEditor.cc:139
cond::persistency::IOVProxy
Definition: IOVProxy.h:92
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
cond::service::PoolDBOutputService::m_dbInitialised
bool m_dbInitialised
Definition: PoolDBOutputService.h:254
cond::persistency::Session::editIov
IOVEditor editIov(const std::string &tag)
Definition: Session.cc:130
edm::service::SystemBounds
Definition: SystemBounds.h:29
cond::persistency::Logger::logWarning
EchoedLogStream< edm::LogWarning > logWarning()
Definition: Logger.cc:169
cond::service::PoolDBOutputService::doCommitTransaction
void doCommitTransaction()
Definition: PoolDBOutputService.cc:140
edm::ParameterSet
Definition: ParameterSet.h:47
a
double a
Definition: hdecay.h:119
cond::UserLogInfo::usertext
std::string usertext
Definition: Types.h:24
cond::SYNCH_ANY
Definition: Types.h:28
CommonMethods.lock
def lock()
Definition: CommonMethods.py:81
cond::runnumber
Definition: Time.h:19
cond::persistency::Session
Definition: Session.h:63
cond::Iov_t::since
Time_t since
Definition: Types.h:53
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
cond::service::PoolDBOutputService::getTagInfo
bool getTagInfo(const std::string &recordName, cond::TagInfo_t &result)
Definition: PoolDBOutputService.cc:375
cond::persistency::Transaction::commit
void commit()
Definition: Session.cc:23
cond::service::PoolDBOutputService::m_writeTransactionDelay
unsigned int m_writeTransactionDelay
Definition: PoolDBOutputService.h:253
cond::time::MAX_VAL
const Time_t MAX_VAL(std::numeric_limits< Time_t >::max())
cond::persistency::Exception
Base exception class for the object to relational access.
Definition: Exception.h:11
cond::TimeTypeSpecs::endValue
Time_t endValue
Definition: Time.h:42
edm::service::SystemBounds::maxNumberOfStreams
unsigned int maxNumberOfStreams() const
Definition: SystemBounds.h:35
cond::persistency::ConnectionPool::setParameters
void setParameters(const edm::ParameterSet &connectionPset)
Definition: ConnectionPool.cc:43
AlCaHarvesting_cff.record
record
Definition: AlCaHarvesting_cff.py:42
cond::persistency::Session::createIovForPayload
IOVEditor createIovForPayload(const Hash &payloadHash, const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::SYNCH_ANY)
Definition: Session.cc:114
cond::persistency::ConnectionPool::configure
void configure()
Definition: ConnectionPool.cc:129
cond::persistency::IOVEditor::payloadType
std::string payloadType() const
Definition: IOVEditor.cc:113
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cond::service::PoolDBOutputService::m_currentTimes
std::vector< cond::Time_t > m_currentTimes
Definition: PoolDBOutputService.h:247
cond::service::PoolDBOutputService::m_logger
cond::persistency::Logger m_logger
Definition: PoolDBOutputService.h:244
edm::ActivityRegistry::watchPreallocate
void watchPreallocate(Preallocate::slot_type const &iSlot)
Definition: ActivityRegistry.h:144
cond::TagInfo_t::lastInterval
Iov_t lastInterval
Definition: Types.h:73
cond::persistency::Session::storePayload
cond::Hash storePayload(const T &payload, const boost::posix_time::ptime &creationTime=boost::posix_time::microsec_clock::universal_time())
Definition: Session.h:186
cond::persistency::Session::transaction
Transaction & transaction()
Definition: Session.cc:52
cond::persistency::Transaction::start
void start(bool readOnly=true)
Definition: Session.cc:18
HLT_FULL_cff.payloadType
payloadType
Definition: HLT_FULL_cff.py:9457
edm::ActivityRegistry::watchPreGlobalBeginLumi
void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:407
cond::service::PoolDBOutputService::Record::m_tag
std::string m_tag
Definition: PoolDBOutputService.h:203
edm::ActivityRegistry::watchPostModuleEvent
void watchPostModuleEvent(PostModuleEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:799
T
long double T
Definition: Basic3DVectorLD.h:48
Record
cond::persistency::Session::existsDatabase
bool existsDatabase()
Definition: Session.cc:55
cond::persistency::IOVEditor::setEndOfValidity
void setEndOfValidity(cond::Time_t validity)
Definition: IOVEditor.cc:129
cond::UserLogInfo
Definition: Types.h:22
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition: PoolDBOutputService.cc:128
cond::time::timeTypeFromName
TimeType timeTypeFromName(const std::string &name)
Definition: Time.cc:25
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
cond::persistency::Session::createIov
IOVEditor createIov(const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::SYNCH_ANY)
Definition: Session.h:179
cond::persistency::IOVEditor::erase
void erase(cond::Time_t since, const cond::Hash &payloadHash)
Definition: IOVEditor.cc:174
convertXMLtoSQLite_cfg.toPut
toPut
Definition: convertXMLtoSQLite_cfg.py:41
mps_fire.result
result
Definition: mps_fire.py:311
edm::ActivityRegistry::watchPreGlobalBeginRun
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:333
cond::service::PoolDBOutputService::preGlobalBeginRun
void preGlobalBeginRun(edm::GlobalContext const &)
Definition: PoolDBOutputService.cc:187
cond::persistency::ConnectionPool::createReadOnlySession
Session createReadOnlySession(const std::string &connectionString, const std::string &transactionId)
Definition: ConnectionPool.cc:178
cond::TagInfo_t
Definition: Types.h:69
l1RCTOmdsFedVectorProducer_cfi.connectionString
connectionString
Definition: l1RCTOmdsFedVectorProducer_cfi.py:4
cond::persistency::IOVEditor::flush
bool flush()
Definition: IOVEditor.cc:315
Parameters
vector< ParameterSet > Parameters
Definition: HLTMuonPlotter.cc:25
cond::service::PoolDBOutputService::m_transactionActive
bool m_transactionActive
Definition: PoolDBOutputService.h:251
cond::persistency::IOVEditor::lock
void lock()
Definition: IOVEditor.cc:325
cond::service::PoolDBOutputService::m_mutex
std::recursive_mutex m_mutex
Definition: PoolDBOutputService.h:245
cond::UserLogInfo::provenance
std::string provenance
Definition: Types.h:23
cond::persistency::IOVEditor::unlock
void unlock()
Definition: IOVEditor.cc:348
edm::ActivityRegistry::watchPreModuleEvent
void watchPreModuleEvent(PreModuleEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:793
cond::throwException
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18