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)
 
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 ()
 
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 
50  edm::ParameterSet connectionPset = iConfig.getParameter<edm::ParameterSet>("DBParameters");
51  m_connection.setParameters(connectionPset);
56  bool saveLogsOnDb = iConfig.getUntrackedParameter<bool>("saveLogsOnDB", false);
57  if (saveLogsOnDb)
59  // implicit start
61 
62  typedef std::vector<edm::ParameterSet> Parameters;
63  Parameters toPut = iConfig.getParameter<Parameters>("toPut");
64  for (Parameters::iterator itToPut = toPut.begin(); itToPut != toPut.end(); ++itToPut)
65  fillRecord(*itToPut, timetypestr);
66 
68  iAR.watchPreallocate(
69  [this](edm::service::SystemBounds const& iBounds) { m_currentTimes.resize(iBounds.maxNumberOfStreams()); });
70  if (m_timetype == cond::timestamp) { //timestamp
74  } else if (m_timetype == cond::runnumber) { //runnumber
75  //NOTE: this assumes only one run is being processed at a time.
76  // This is true for 7_1_X but plan are to allow multiple in flight at a time
77  s_streamIndex = 0;
79  } else if (m_timetype == cond::lumiid) {
80  //NOTE: this assumes only one lumi is being processed at a time.
81  // This is true for 7_1_X but plan are to allow multiple in flight at a time
82  s_streamIndex = 0;
84  }
85 }

◆ ~PoolDBOutputService()

PoolDBOutputService::~PoolDBOutputService ( )
virtual

Definition at line 171 of file PoolDBOutputService.cc.

171 {}

Member Function Documentation

◆ appendSinceTime() [1/3]

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

Definition at line 237 of file PoolDBOutputService.cc.

239  {
240  std::lock_guard<std::recursive_mutex> lock(m_mutex);
241  Record& myrecord = this->lookUpRecord(recordName);
242  if (myrecord.m_isNewTag) {
243  cond::throwException(std::string("Cannot append to non-existing tag ") + myrecord.m_tag,
244  "PoolDBOutputService::appendSinceTime");
245  }
246  bool ret = false;
249  try {
250  ret = appendSinceTime(payloadId, time, myrecord);
251  } catch (const std::exception& er) {
252  cond::throwException(std::string(er.what()), "PoolDBOutputService::appendSinceTime");
253  }
254  scope.close();
255  return ret;
256 }

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 ntuplemaker::time.

◆ appendSinceTime() [2/3]

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

Definition at line 258 of file PoolDBOutputService.cc.

260  {
261  m_logger.logInfo() << "Updating existing tag " << myrecord.m_tag << ", adding iov with since " << time;
263  try {
264  cond::persistency::IOVEditor editor = m_session.editIov(myrecord.m_tag);
265  payloadType = editor.payloadType();
266  editor.insert(time, payloadId);
267  cond::UserLogInfo a = this->lookUpUserLogInfo(myrecord.m_idName);
268  editor.flush(a.usertext);
269  } catch (const std::exception& er) {
270  cond::throwException(std::string(er.what()), "PoolDBOutputService::appendSinceTime");
271  }
272  return true;
273 }

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_2018_cff::payloadType, AlCaHLTBitMon_QueryRunRegistry::string, cond::throwException(), and ntuplemaker::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 135 of file PoolDBOutputService.h.

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

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 SiStripApvSimulationParametersBuilder::analyze(), DBWriter::analyze(), SiStripDetVOffFakeBuilder::analyze(), SiStripNoisesBuilder::analyze(), SiStripApvGainBuilder::analyze(), SiStripPedestalsBuilder::analyze(), SiStripSummaryBuilder::analyze(), SiStripThresholdBuilder::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 187 of file PoolDBOutputService.cc.

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

Referenced by SiStripApvSimulationParametersBuilder::analyze(), DBWriter::analyze(), L1TMuonOverlapParamsWriter::analyze(), L1KeyListWriter::analyze(), L1KeyWriter::analyze(), SiStripDetVOffFakeBuilder::analyze(), SiStripNoisesBuilder::analyze(), L1TCaloParamsUpdater::analyze(), SiStripApvGainBuilder::analyze(), SiStripPedestalsBuilder::analyze(), SiStripSummaryBuilder::analyze(), SiStripThresholdBuilder::analyze(), L1TMuonGlobalParamsWriter::analyze(), EcalPFRecHitThresholdsMaker::analyze(), L1TCaloStage2ParamsWriter::analyze(), L1TGlobalPrescalesVetosWriter::analyze(), L1TMuonBarrelParamsWriter::analyze(), L1TMuonEndCapParamsWriter::analyze(), L1MenuWriter::analyze(), L1TMuonEndCapForestWriter::analyze(), SurveyInputTrackerFromDB::analyze(), GBRForestWriter::analyze(), WriteEcalMiscalibConstantsMC::analyze(), WriteEcalMiscalibConstants::analyze(), TrackerSystematicMisalignments::analyze(), SiStripNoiseNormalizedWithApvGainBuilder::analyze(), SiStripApvGainBuilderFromTag::analyze(), EcalTestDevDB::analyze(), PPSGeometryBuilder::analyze(), TrackerGeometryCompare::analyze(), XMLGeometryBuilder::beginJob(), SiStripFedCablingBuilder::beginRun(), PTrackerParametersDBBuilder::beginRun(), GEMRecoIdealDBLoader::beginRun(), ME0RecoIdealDBLoader::beginRun(), GeometricTimingDetLoader::beginRun(), GeometricDetLoader::beginRun(), DTRecoIdealDBLoader::beginRun(), CSCRecoIdealDBLoader::beginRun(), PGeometricDetExtraBuilder::beginRun(), RPCRecoIdealDBLoader::beginRun(), PGeometricDetBuilder::beginRun(), HcalParametersDBBuilder::beginRun(), PHGCalParametersDBBuilder::beginRun(), EcalTPGDBCopy::copyToDB(), EcalDBCopy::copyToDB(), ESDBCopy::copyToDB(), 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(), MisalignedMuonESProducer::saveToDB(), ConditionDBWriter< SiStripApvGain >::storeOnDb(), l1t::DataWriterExt::updateIOV(), l1t::DataWriter::updateIOV(), CaloGeometryDBWriter::write(), BeamFitter::write2DB(), CaloGeometryDBWriter::writeIndexed(), and DTCalibDBUtils::writeToDB().

◆ closeIOV()

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

Definition at line 318 of file PoolDBOutputService.cc.

318  {
319  std::lock_guard<std::recursive_mutex> lock(m_mutex);
320  Record& myrecord = lookUpRecord(recordName);
321  if (myrecord.m_isNewTag) {
322  cond::throwException(std::string("Cannot close non-existing tag ") + myrecord.m_tag,
323  "PoolDBOutputService::closeIOV");
324  }
325  m_logger.logInfo() << "Updating existing tag " << myrecord.m_tag << ", closing with end of validity " << lastTill;
328  try {
329  cond::persistency::IOVEditor editor = m_session.editIov(myrecord.m_tag);
330  editor.setEndOfValidity(lastTill);
331  editor.flush("Tag closed.");
332  } catch (const std::exception& er) {
333  cond::throwException(std::string(er.what()), "PoolDBOutputService::closeIOV");
334  }
335  scope.close();
336 }

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

124  {
125  std::lock_guard<std::recursive_mutex> lock(m_mutex);
127 }

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

196  {
197  std::lock_guard<std::recursive_mutex> lock(m_mutex);
198  Record& myrecord = this->lookUpRecord(recordName);
199  if (!myrecord.m_isNewTag) {
200  cond::throwException(myrecord.m_tag + " is not a new tag", "PoolDBOutputService::createNewIOV");
201  }
202  m_logger.logInfo() << "Creating new tag " << myrecord.m_tag << ", adding iov with since " << firstSinceTime
203  << " pointing to payload id " << firstPayloadId;
206  try {
207  this->initDB();
209  m_session.createIovForPayload(firstPayloadId, myrecord.m_tag, myrecord.m_timetype, cond::SYNCH_ANY);
210  editor.setDescription("New Tag");
211  editor.insert(firstSinceTime, firstPayloadId);
212  cond::UserLogInfo a = this->lookUpUserLogInfo(myrecord.m_idName);
213  editor.flush(a.usertext);
214  myrecord.m_isNewTag = false;
215  } catch (const std::exception& er) {
216  cond::throwException(std::string(er.what()), "PoolDBOutputService::createNewIov");
217  }
218  scope.close();
219 }

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

224  {
225  m_logger.logInfo() << "Creating new tag " << myrecord.m_tag << " for payload type " << payloadType
226  << ", adding iov with since " << firstSinceTime;
227  // FIX ME: synchronization type and description have to be passed as the other parameters?
229  m_session.createIov(payloadType, myrecord.m_tag, myrecord.m_timetype, cond::SYNCH_ANY);
230  editor.setDescription("New Tag");
231  editor.insert(firstSinceTime, firstPayloadId);
232  cond::UserLogInfo a = this->lookUpUserLogInfo(myrecord.m_idName);
233  editor.flush(a.usertext);
234  myrecord.m_isNewTag = false;
235 }

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_2018_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 110 of file PoolDBOutputService.h.

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

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(), SiStripDetVOffFakeBuilder::analyze(), SiStripApvGainBuilder::analyze(), SiStripPedestalsBuilder::analyze(), SiStripSummaryBuilder::analyze(), SiStripThresholdBuilder::analyze(), EcalPFRecHitThresholdsMaker::analyze(), WriteEcalMiscalibConstants::analyze(), WriteEcalMiscalibConstantsMC::analyze(), SiStripNoiseNormalizedWithApvGainBuilder::analyze(), SiStripApvGainBuilderFromTag::analyze(), EcalTestDevDB::analyze(), XMLGeometryBuilder::beginJob(), SiStripFedCablingBuilder::beginRun(), PTrackerParametersDBBuilder::beginRun(), GEMRecoIdealDBLoader::beginRun(), ME0RecoIdealDBLoader::beginRun(), DTRecoIdealDBLoader::beginRun(), GeometricTimingDetLoader::beginRun(), GeometricDetLoader::beginRun(), CSCRecoIdealDBLoader::beginRun(), PGeometricDetBuilder::beginRun(), PGeometricDetExtraBuilder::beginRun(), RPCRecoIdealDBLoader::beginRun(), HcalParametersDBBuilder::beginRun(), PHGCalParametersDBBuilder::beginRun(), ESDBCopy::copyToDB(), EcalTPGDBCopy::copyToDB(), EcalDBCopy::copyToDB(), CocoaDBMgr::DumpCocoaResults(), BeamSpotWrite2DB::endJob(), BeamProfile2DB::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().

◆ currentTime()

cond::Time_t PoolDBOutputService::currentTime ( ) const

Definition at line 189 of file PoolDBOutputService.cc.

189  {
190  assert(-1 != s_streamIndex);
192 }

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

Referenced by SiStripApvSimulationParametersBuilder::analyze(), DBWriter::analyze(), SiStripNoisesBuilder::analyze(), SiStripDetVOffFakeBuilder::analyze(), L1MuonOverlapParamsDBProducer::analyze(), SiStripPedestalsBuilder::analyze(), SiStripSummaryBuilder::analyze(), SiStripThresholdBuilder::analyze(), SiStripApvGainBuilder::analyze(), WriteEcalMiscalibConstantsMC::analyze(), WriteEcalMiscalibConstants::analyze(), BufferedBoostIODBWriter::analyze(), SiStripNoiseNormalizedWithApvGainBuilder::analyze(), SiStripApvGainBuilderFromTag::analyze(), AlignPCLThresholdsWriter::analyze(), FFTJetCorrectorDBWriter::analyze(), BoostIODBWriter< DataType >::analyze(), SiStripApvGainRescaler::analyze(), SiStripChannelGainFromDBMiscalibrator::analyze(), SiStripNoisesFromDBMiscalibrator::analyze(), SiStripFedCablingBuilder::beginRun(), ECALpedestalPCLHarvester::dqmEndJob(), SiStripGainsPCLHarvester::dqmEndJob(), CocoaDBMgr::DumpCocoaResults(), BeamSpotWrite2DB::endJob(), SurveyDBUploader::endJob(), Mixing2DB::endJob(), BeamSpotOnlineHLTRcdWriter::endJob(), BeamSpotOnlineLegacyRcdWriter::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(), 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 112 of file PoolDBOutputService.cc.

112  {
113  if (m_transactionActive) {
115  m_transactionActive = false;
116  }
117 }

Referenced by writeOne().

◆ doStartTransaction()

void PoolDBOutputService::doStartTransaction ( )
private

Definition at line 105 of file PoolDBOutputService.cc.

105  {
106  if (!m_transactionActive) {
107  m_session.transaction().start(false);
108  m_transactionActive = true;
109  }
110 }

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

◆ endOfTime()

cond::Time_t PoolDBOutputService::endOfTime ( ) const

Definition at line 185 of file PoolDBOutputService.cc.

185 { return timeTypeSpecs[m_timetype].endValue; }

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

Referenced by SiStripApvSimulationParametersBuilder::analyze(), EcalDQMStatusWriter::analyze(), DBWriter::analyze(), SiStripNoisesBuilder::analyze(), SiStripDetVOffFakeBuilder::analyze(), SiStripSummaryBuilder::analyze(), SiStripPedestalsBuilder::analyze(), SiStripThresholdBuilder::analyze(), SiStripApvGainBuilder::analyze(), EcalPFRecHitThresholdsMaker::analyze(), WriteEcalMiscalibConstantsMC::analyze(), WriteEcalMiscalibConstants::analyze(), SiStripNoiseNormalizedWithApvGainBuilder::analyze(), SiStripApvGainBuilderFromTag::analyze(), EcalTestDevDB::analyze(), XMLGeometryBuilder::beginJob(), SiStripFedCablingBuilder::beginRun(), PTrackerParametersDBBuilder::beginRun(), GEMRecoIdealDBLoader::beginRun(), ME0RecoIdealDBLoader::beginRun(), DTRecoIdealDBLoader::beginRun(), GeometricTimingDetLoader::beginRun(), GeometricDetLoader::beginRun(), CSCRecoIdealDBLoader::beginRun(), PGeometricDetBuilder::beginRun(), PGeometricDetExtraBuilder::beginRun(), RPCRecoIdealDBLoader::beginRun(), HcalParametersDBBuilder::beginRun(), PHGCalParametersDBBuilder::beginRun(), EcalTPGDBCopy::copyToDB(), EcalDBCopy::copyToDB(), ESDBCopy::copyToDB(), CocoaDBMgr::DumpCocoaResults(), BeamSpotWrite2DB::endJob(), BeamProfile2DB::endJob(), StoreESCondition::endJob(), BeamSpotOnlineLegacyRcdWriter::endJob(), BeamSpotOnlineHLTRcdWriter::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 275 of file PoolDBOutputService.cc.

277  {
278  std::lock_guard<std::recursive_mutex> lock(m_mutex);
279  Record& myrecord = this->lookUpRecord(recordName);
280  if (myrecord.m_isNewTag) {
281  cond::throwException(std::string("Cannot delete from non-existing tag ") + myrecord.m_tag,
282  "PoolDBOutputService::appendSinceTime");
283  }
284  m_logger.logInfo() << "Updating existing tag " << myrecord.m_tag << ", removing iov with since " << sinceTime
285  << " pointing to payload id " << payloadId;
288  try {
289  cond::persistency::IOVEditor editor = m_session.editIov(myrecord.m_tag);
290  editor.erase(sinceTime, payloadId);
292  editor.flush(a.usertext);
293 
294  } catch (const std::exception& er) {
295  cond::throwException(std::string(er.what()), "PoolDBOutputService::eraseSinceTime");
296  }
297  scope.close();
298 }

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

173  {
174  std::lock_guard<std::recursive_mutex> lock(m_mutex);
177  try {
178  initDB();
179  } catch (const std::exception& er) {
180  cond::throwException(std::string(er.what()), "PoolDBOutputService::forceInit");
181  }
182  scope.close();
183 }

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

347  {
349  result.name = record.m_tag;
350  m_logger.logDebug() << "Fetching tag info for " << record.m_tag;
352  bool ret = false;
354  try {
355  //use iovproxy to find out.
356  if (m_session.existsIov(record.m_tag)) {
358  result.lastInterval = iov.getLast();
359  ret = true;
360  }
361  } catch (const std::exception& er) {
362  cond::throwException(std::string(er.what()), "PoolDBOutputService::tagInfo");
363  }
364  scope.close();
365  return ret;
366 }

References cppFunctionSkipper::exception, cond::persistency::IOVProxy::getLast(), GlobalPosition_Frontier_DevDB_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 129 of file PoolDBOutputService.cc.

129  {
130  if (!m_dbInitialised) {
131  if (!m_session.existsDatabase())
133  else {
134  for (auto& iR : m_records) {
135  if (m_session.existsIov(iR.second.m_tag))
136  iR.second.m_isNewTag = false;
137  }
138  }
139  m_dbInitialised = true;
140  }
141 }

Referenced by createNewIOV(), and writeOne().

◆ isNewTagRequest()

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

Definition at line 100 of file PoolDBOutputService.cc.

100  {
101  Record& myrecord = this->lookUpRecord(recordName);
102  return myrecord.m_isNewTag;
103 }

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

Referenced by SiStripApvSimulationParametersBuilder::analyze(), DBWriter::analyze(), SiStripNoisesBuilder::analyze(), SiStripDetVOffFakeBuilder::analyze(), SiStripApvGainBuilder::analyze(), SiStripPedestalsBuilder::analyze(), SiStripSummaryBuilder::analyze(), SiStripThresholdBuilder::analyze(), WriteEcalMiscalibConstants::analyze(), WriteEcalMiscalibConstantsMC::analyze(), SiStripNoiseNormalizedWithApvGainBuilder::analyze(), SiStripApvGainBuilderFromTag::analyze(), EcalTestDevDB::analyze(), XMLGeometryBuilder::beginJob(), SiStripFedCablingBuilder::beginRun(), PTrackerParametersDBBuilder::beginRun(), GEMRecoIdealDBLoader::beginRun(), ME0RecoIdealDBLoader::beginRun(), DTRecoIdealDBLoader::beginRun(), GeometricTimingDetLoader::beginRun(), GeometricDetLoader::beginRun(), CSCRecoIdealDBLoader::beginRun(), PGeometricDetBuilder::beginRun(), PGeometricDetExtraBuilder::beginRun(), RPCRecoIdealDBLoader::beginRun(), HcalParametersDBBuilder::beginRun(), PHGCalParametersDBBuilder::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::DataWriterExt::updateIOV(), l1t::DataWriter::updateIOV(), CaloGeometryDBWriter::write(), BeamFitter::write2DB(), AlCaRecoTriggerBitsRcdUpdate::writeBitsToDB(), CaloGeometryDBWriter::writeIndexed(), writeOne(), and DTCalibDBUtils::writeToDB().

◆ logger()

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

◆ lookUpRecord()

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

Definition at line 300 of file PoolDBOutputService.cc.

301  {
302  std::map<std::string, Record>::iterator it = m_records.find(recordName);
303  if (it == m_records.end()) {
304  cond::throwException("The record \"" + recordName + "\" has not been registered.",
305  "PoolDBOutputService::lookUpRecord");
306  }
307  return it->second;
308 }

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

310  {
311  std::map<std::string, cond::UserLogInfo>::iterator it = m_logheaders.find(recordName);
312  if (it == m_logheaders.end())
313  throw cond::Exception("Log db was not set for record " + recordName +
314  " from PoolDBOutputService::lookUpUserLogInfo");
315  return it->second;
316 }

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

143 { commitTransaction(); }

◆ postModuleEvent()

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

Definition at line 154 of file PoolDBOutputService.cc.

155  {
156  s_streamIndex = -1;
157 }

References s_streamIndex.

◆ preEventProcessing()

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

Definition at line 145 of file PoolDBOutputService.cc.

145  {
146  m_currentTimes[iContext.streamID().value()] = iContext.timestamp().value();
147 }

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

165  {
166  for (auto& time : m_currentTimes) {
167  time = iContext.luminosityBlockID().value();
168  }
169 }

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

◆ preGlobalBeginRun()

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

Definition at line 159 of file PoolDBOutputService.cc.

159  {
160  for (auto& time : m_currentTimes) {
161  time = iContext.luminosityBlockID().run();
162  }
163 }

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

◆ preModuleEvent()

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

Definition at line 149 of file PoolDBOutputService.cc.

150  {
151  s_streamIndex = iContext.streamID().value();
152 }

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

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

340  {
341  cond::UserLogInfo& myloginfo = this->lookUpUserLogInfo(recordName);
342  myloginfo.provenance = dataprovenance;
343  myloginfo.usertext = usertext;
344 }

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

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

◆ startTransaction()

void PoolDBOutputService::startTransaction ( )

Definition at line 119 of file PoolDBOutputService.cc.

119  {
120  std::lock_guard<std::recursive_mutex> lock(m_mutex);
122 }

References CommonMethods::lock().

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

◆ 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 57 of file PoolDBOutputService.h.

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

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_2018_cff::payloadType, align_cfg::recordName, cond::Iov_t::since, cond::persistency::Session::storePayload(), AlCaHLTBitMon_QueryRunRegistry::string, cond::throwException(), ntuplemaker::time, and cond::persistency::Session::transaction().

Referenced by EcalDQMStatusWriter::analyze(), L1MuonOverlapParamsDBProducer::analyze(), L1TCaloParamsUpdater::analyze(), SurveyInputTrackerFromDB::analyze(), GBRForestWriter::analyze(), BufferedBoostIODBWriter::analyze(), TrackerSystematicMisalignments::analyze(), WriteCTPPSBeamParameters::analyze(), CTPPSRPAlignmentInfoAnalyzer::analyze(), WriteCTPPSPixelAnalysisMask::analyze(), WriteCTPPSPixelDAQMapping::analyze(), AlignPCLThresholdsWriter::analyze(), BoostIODBWriter< DataType >::analyze(), PPSGeometryBuilder::analyze(), FFTJetCorrectorDBWriter::analyze(), SiStripApvGainRescaler::analyze(), SiStripChannelGainFromDBMiscalibrator::analyze(), SiStripNoisesFromDBMiscalibrator::analyze(), TrackerGeometryCompare::analyze(), MCMisalignmentScaler::analyze(), DTCCablingMapTestProducer::beginJob(), DTUserKeyedConfigHandler::chkConfigList(), DTKeyedConfigHandler::chkConfigList(), SiPixelStatusHarvester::constructTag(), EcalDBCopy::copyToDB(), ECALpedestalPCLHarvester::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::processIov(), MisalignedTrackerESProducer::produce(), MuonAlignment::saveCSCSurveyToDB(), MuonAlignment::saveCSCtoDB(), MuonAlignment::saveDTSurveyToDB(), MuonAlignment::saveDTtoDB(), TrackerAlignment::saveToDB(), MisalignedMuonESProducer::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 246 of file PoolDBOutputService.h.

Referenced by writeOne().

◆ m_connection

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

Definition at line 243 of file PoolDBOutputService.h.

◆ m_currentTimes

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

Definition at line 241 of file PoolDBOutputService.h.

◆ m_dbInitialised

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

Definition at line 248 of file PoolDBOutputService.h.

◆ m_logger

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

Definition at line 238 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 251 of file PoolDBOutputService.h.

Referenced by fillRecord().

◆ m_mutex

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

Definition at line 239 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 250 of file PoolDBOutputService.h.

Referenced by fillRecord().

◆ m_session

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

Definition at line 244 of file PoolDBOutputService.h.

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

◆ m_timetype

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

Definition at line 240 of file PoolDBOutputService.h.

◆ m_transactionActive

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

Definition at line 245 of file PoolDBOutputService.h.

◆ m_writeTransactionDelay

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

Definition at line 247 of file PoolDBOutputService.h.

Referenced by writeOne().

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:355
cond::persistency::TransactionScope
Definition: Session.h:231
cond::service::PoolDBOutputService::lookUpRecord
Record & lookUpRecord(const std::string &recordName)
Definition: PoolDBOutputService.cc:300
cond::persistency::IOVEditor::insert
void insert(cond::Time_t since, const cond::Hash &payloadHash, bool checkType=false)
Definition: IOVEditor.cc:139
cond::lumiid
Definition: Time.h:19
cond::service::PoolDBOutputService::initDB
void initDB()
Definition: PoolDBOutputService.cc:129
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:251
cond::persistency::IOVProxy::getLast
cond::Iov_t getLast()
Definition: IOVProxy.cc:386
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::service::PoolDBOutputService::m_timetype
cond::TimeType m_timetype
Definition: PoolDBOutputService.h:240
align_cfg.recordName
recordName
Definition: align_cfg.py:66
cond::service::PoolDBOutputService::preModuleEvent
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: PoolDBOutputService.cc:149
cond::persistency::IOVEditor
Definition: IOVEditor.h:28
cond::service::PoolDBOutputService::preGlobalBeginLumi
void preGlobalBeginLumi(edm::GlobalContext const &)
Definition: PoolDBOutputService.cc:165
GlobalPosition_Frontier_DevDB_cff.record
record
Definition: GlobalPosition_Frontier_DevDB_cff.py:10
cond::service::PoolDBOutputService::appendSinceTime
void appendSinceTime(const T *payloadObj, cond::Time_t sinceTime, const std::string &recordName)
Definition: PoolDBOutputService.h:135
cms::cuda::assert
assert(be >=bs)
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:250
cond::persistency::Logger::logInfo
EchoedLogStream< edm::LogInfo > logInfo()
Definition: Logger.cc:153
cond::service::PoolDBOutputService::m_autoCommit
bool m_autoCommit
Definition: PoolDBOutputService.h:246
cond::persistency::ConnectionPool::createSession
Session createSession(const std::string &connectionString, bool writeCapable=false)
Definition: ConnectionPool.cc:158
cond::persistency::ConnectionPool::setLogDestination
void setLogDestination(Logger &logger)
Definition: ConnectionPool.cc:174
cond::persistency::Session::createDatabase
void createDatabase()
Definition: Session.cc:61
cond::service::PoolDBOutputService::m_session
cond::persistency::Session m_session
Definition: PoolDBOutputService.h:244
cond::timestamp
Definition: Time.h:19
cond::service::PoolDBOutputService::lookUpUserLogInfo
cond::UserLogInfo & lookUpUserLogInfo(const std::string &recordName)
Definition: PoolDBOutputService.cc:310
cond::timeTypeSpecs
const TimeTypeSpecs timeTypeSpecs[]
Definition: Time.cc:16
edm::ActivityRegistry::watchPostEndJob
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
Definition: ActivityRegistry.h:168
cond::service::PoolDBOutputService::createNewIOV
void createNewIOV(const T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t, const std::string &recordName)
Definition: PoolDBOutputService.h:110
cond::service::PoolDBOutputService::preEventProcessing
void preEventProcessing(edm::StreamContext const &)
Definition: PoolDBOutputService.cc:145
edm::ActivityRegistry::watchPreEvent
void watchPreEvent(PreEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:400
cond::service::PoolDBOutputService::commitTransaction
void commitTransaction()
Definition: PoolDBOutputService.cc:124
jets_cff.payload
payload
Definition: jets_cff.py:34
cond::service::PoolDBOutputService::postEndJob
void postEndJob()
Definition: PoolDBOutputService.cc:143
cond::service::PoolDBOutputService::doStartTransaction
void doStartTransaction()
Definition: PoolDBOutputService.cc:105
cond::service::PoolDBOutputService::postModuleEvent
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
Definition: PoolDBOutputService.cc:154
cond::service::PoolDBOutputService::m_connection
cond::persistency::ConnectionPool m_connection
Definition: PoolDBOutputService.h:243
cond::persistency::Logger::logDebug
EchoedLogStream< edm::LogDebug_ > logDebug()
Definition: Logger.cc:157
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:114
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
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:248
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:165
cond::service::PoolDBOutputService::doCommitTransaction
void doCommitTransaction()
Definition: PoolDBOutputService.cc:112
edm::ParameterSet
Definition: ParameterSet.h:36
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:82
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:347
cond::persistency::Transaction::commit
void commit()
Definition: Session.cc:23
cond::service::PoolDBOutputService::m_writeTransactionDelay
unsigned int m_writeTransactionDelay
Definition: PoolDBOutputService.h:247
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
HLT_2018_cff.payloadType
payloadType
Definition: HLT_2018_cff.py:8133
cond::persistency::ConnectionPool::setParameters
void setParameters(const edm::ParameterSet &connectionPset)
Definition: ConnectionPool.cc:39
DBConfiguration_cff.toPut
toPut
Definition: DBConfiguration_cff.py:25
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:125
cond::persistency::IOVEditor::payloadType
std::string payloadType() const
Definition: IOVEditor.cc:88
cond::service::PoolDBOutputService::m_currentTimes
std::vector< cond::Time_t > m_currentTimes
Definition: PoolDBOutputService.h:241
cond::service::PoolDBOutputService::m_logger
cond::persistency::Logger m_logger
Definition: PoolDBOutputService.h:238
edm::ActivityRegistry::watchPreallocate
void watchPreallocate(Preallocate::slot_type const &iSlot)
Definition: ActivityRegistry.h:142
cond::TagInfo_t::lastInterval
Iov_t lastInterval
Definition: Types.h:73
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
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
edm::ActivityRegistry::watchPreGlobalBeginLumi
void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const &iSlot)
Definition: ActivityRegistry.h:333
cond::service::PoolDBOutputService::Record::m_tag
std::string m_tag
Definition: PoolDBOutputService.h:197
edm::ActivityRegistry::watchPostModuleEvent
void watchPostModuleEvent(PostModuleEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:677
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:104
cond::persistency::Logger::setDbDestination
void setDbDestination(const std::string &connectionString, ConnectionPool &connectionPool)
Definition: Logger.cc:58
cond::UserLogInfo
Definition: Types.h:22
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition: PoolDBOutputService.cc:100
cond::time::timeTypeFromName
TimeType timeTypeFromName(const std::string &name)
Definition: Time.cc:25
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:154
mps_fire.result
result
Definition: mps_fire.py:303
edm::ActivityRegistry::watchPreGlobalBeginRun
void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const &iSlot)
Definition: ActivityRegistry.h:273
cond::service::PoolDBOutputService::preGlobalBeginRun
void preGlobalBeginRun(edm::GlobalContext const &)
Definition: PoolDBOutputService.cc:159
cond::persistency::ConnectionPool::createReadOnlySession
Session createReadOnlySession(const std::string &connectionString, const std::string &transactionId)
Definition: ConnectionPool.cc:162
cond::TagInfo_t
Definition: Types.h:69
ntuplemaker.time
time
Definition: ntuplemaker.py:310
l1RCTOmdsFedVectorProducer_cfi.connectionString
connectionString
Definition: l1RCTOmdsFedVectorProducer_cfi.py:4
cond::persistency::IOVEditor::flush
bool flush()
Definition: IOVEditor.cc:295
Parameters
vector< ParameterSet > Parameters
Definition: HLTMuonPlotter.cc:25
cond::service::PoolDBOutputService::m_transactionActive
bool m_transactionActive
Definition: PoolDBOutputService.h:245
cond::service::PoolDBOutputService::m_mutex
std::recursive_mutex m_mutex
Definition: PoolDBOutputService.h:239
cond::UserLogInfo::provenance
std::string provenance
Definition: Types.h:23
edm::ActivityRegistry::watchPreModuleEvent
void watchPreModuleEvent(PreModuleEvent::slot_type const &iSlot)
Definition: ActivityRegistry.h:671
cond::throwException
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18