CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
CondDBESSource Class Reference

#include <CondDBESSource.h>

Inheritance diagram for CondDBESSource:
edm::eventsetup::DataProxyProvider edm::EventSetupRecordIntervalFinder PoolDBESSource

Classes

struct  Stats
 

Public Types

using DataKey = edm::eventsetup::DataKey
 
using EventSetupRecordKey = edm::eventsetup::EventSetupRecordKey
 
typedef std::multimap< std::string, ProxyPProxyMap
 
typedef std::shared_ptr< cond::DataProxyWrapperBaseProxyP
 
enum  RefreshPolicy {
  NOREFRESH, REFRESH_ALWAYS, REFRESH_OPEN_IOVS, REFRESH_EACH_RUN,
  RECONNECT_EACH_RUN
}
 

Public Member Functions

 CondDBESSource (const edm::ParameterSet &)
 
 ~CondDBESSource () override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
virtual void updateLookup (ESRecordsToProxyIndices const &)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
bool concurrentFinder () const
 
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
 EventSetupRecordIntervalFinder (const EventSetupRecordIntervalFinder &)=delete
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
bool nonconcurrentAndIOVNeedsUpdate (const eventsetup::EventSetupRecordKey &key, const IOVSyncValue &syncValue) const
 
const EventSetupRecordIntervalFinderoperator= (const EventSetupRecordIntervalFinder &)=delete
 
void resetInterval (const eventsetup::EventSetupRecordKey &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Protected Member Functions

void initConcurrentIOVs (const EventSetupRecordKey &key, unsigned int nConcurrentIOVs) override
 
bool isConcurrentFinder () const override
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
void setIntervalFor (const EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Private Types

typedef std::map< std::string, cond::GTEntry_tTagCollection
 

Private Member Functions

void fillList (const std::string &pfn, std::vector< std::string > &pfnList, const unsigned int listSize, const std::string &type)
 
void fillTagCollectionFromDB (const std::vector< std::string > &connectionStringList, const std::vector< std::string > &prefixList, const std::vector< std::string > &postfixList, const std::vector< std::string > &roottagList, std::map< std::string, cond::GTEntry_t > &replacement, cond::GTMetadata_t &gtMetadata)
 
void fillTagCollectionFromGT (const std::string &connectionString, const std::string &prefix, const std::string &postfix, const std::string &roottag, std::set< cond::GTEntry_t > &tagcoll, cond::GTMetadata_t &gtMetadata)
 

Private Attributes

cond::persistency::ConnectionPool m_connection
 
std::string m_connectionString
 
bool m_doDump
 
std::string m_frontierKey
 
unsigned int m_lastLumi
 
std::map< std::string, cond::Time_tm_lastRecordRuns
 
unsigned int m_lastRun
 
std::mutex m_mutex
 
RefreshPolicy m_policy
 
ProxyMap m_proxies
 
edm::SerialTaskQueue m_queue
 
std::map< std::string, cond::Time_tm_refreshTimeForRecord
 
std::map< std::string, std::pair< cond::persistency::Session, std::string > > m_sessionPool
 
std::map< std::string, std::pair< cond::persistency::Session, std::string > > m_sessionPoolForLumiConditions
 
Stats m_stats
 
TagCollection m_tagCollection
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >>
 

Detailed Description

Definition at line 87 of file CondDBESSource.h.

Member Typedef Documentation

◆ DataKey

Definition at line 89 of file CondDBESSource.h.

◆ EventSetupRecordKey

Definition at line 90 of file CondDBESSource.h.

◆ ProxyMap

typedef std::multimap<std::string, ProxyP> CondDBESSource::ProxyMap

Definition at line 92 of file CondDBESSource.h.

◆ ProxyP

Definition at line 91 of file CondDBESSource.h.

◆ TagCollection

typedef std::map<std::string, cond::GTEntry_t> CondDBESSource::TagCollection
private

Definition at line 118 of file CondDBESSource.h.

Member Enumeration Documentation

◆ RefreshPolicy

Enumerator
NOREFRESH 
REFRESH_ALWAYS 
REFRESH_OPEN_IOVS 
REFRESH_EACH_RUN 
RECONNECT_EACH_RUN 

Definition at line 94 of file CondDBESSource.h.

Constructor & Destructor Documentation

◆ CondDBESSource()

CondDBESSource::CondDBESSource ( const edm::ParameterSet iConfig)
explicit

required by eventsetup

Definition at line 98 of file CondDBESSource.cc.

99  : m_connection(),
100  m_connectionString(""),
101  m_frontierKey(""),
102  m_lastRun(0), // for the stat
103  m_lastLumi(0), // for the stat
105  m_doDump(iConfig.getUntrackedParameter<bool>("DumpStat", false)) {
106  if (iConfig.getUntrackedParameter<bool>("RefreshAlways", false)) {
108  }
109  if (iConfig.getUntrackedParameter<bool>("RefreshOpenIOVs", false)) {
111  }
112  if (iConfig.getUntrackedParameter<bool>("RefreshEachRun", false)) {
114  }
115  if (iConfig.getUntrackedParameter<bool>("ReconnectEachRun", false)) {
117  }
118 
119  Stats s = {0, 0, 0, 0, 0, 0, 0, 0};
120  m_stats = s;
121 
122  /*parameter set parsing
123  */
125  if (iConfig.exists("globaltag")) {
126  globaltag = iConfig.getParameter<std::string>("globaltag");
127  // the global tag _requires_ a connection string
128  m_connectionString = iConfig.getParameter<std::string>("connect");
129 
130  if (!globaltag.empty()) {
132  if (siteLocalConfig.isAvailable()) {
133  if (siteLocalConfig->useLocalConnectString()) {
134  std::string const& localConnectPrefix = siteLocalConfig->localConnectPrefix();
135  std::string const& localConnectSuffix = siteLocalConfig->localConnectSuffix();
136  m_connectionString = localConnectPrefix + globaltag + localConnectSuffix;
137  }
138  }
139  }
140  } else if (iConfig.exists("connect")) // default connection string
141  m_connectionString = iConfig.getParameter<std::string>("connect");
142 
143  // frontier key
144  if (iConfig.exists("frontierKey")) {
145  m_frontierKey = iConfig.getParameter<std::string>("frontierKey");
146  }
147 
148  // snapshot
149  boost::posix_time::ptime snapshotTime;
150  if (iConfig.exists("snapshotTime")) {
151  std::string snapshotTimeString = iConfig.getParameter<std::string>("snapshotTime");
152  if (!snapshotTimeString.empty())
153  snapshotTime = boost::posix_time::time_from_string(snapshotTimeString);
154  }
155 
156  // connection configuration
157  if (iConfig.exists("DBParameters")) {
158  edm::ParameterSet connectionPset = iConfig.getParameter<edm::ParameterSet>("DBParameters");
159  m_connection.setParameters(connectionPset);
160  }
162 
163  // load specific record/tag info - it will overwrite the global tag ( if any )
164  std::map<std::string, cond::GTEntry_t> replacements;
165  std::map<std::string, boost::posix_time::ptime> specialSnapshots;
166  if (iConfig.exists("toGet")) {
167  typedef std::vector<edm::ParameterSet> Parameters;
168  Parameters toGet = iConfig.getParameter<Parameters>("toGet");
169  for (Parameters::iterator itToGet = toGet.begin(); itToGet != toGet.end(); ++itToGet) {
170  std::string recordname = itToGet->getParameter<std::string>("record");
171  if (recordname.empty())
172  throw cond::Exception("ESSource: The record name has not been provided in a \"toGet\" entry.");
173  std::string labelname = itToGet->getUntrackedParameter<std::string>("label", "");
174  std::string pfn("");
175  if (m_connectionString.empty() || itToGet->exists("connect"))
176  pfn = itToGet->getParameter<std::string>("connect");
177  std::string tag("");
178  std::string fqTag("");
179  if (itToGet->exists("tag")) {
180  tag = itToGet->getParameter<std::string>("tag");
182  }
183  boost::posix_time::ptime tagSnapshotTime =
184  boost::posix_time::time_from_string(std::string(cond::time::MAX_TIMESTAMP));
185  if (itToGet->exists("snapshotTime"))
186  tagSnapshotTime = boost::posix_time::time_from_string(itToGet->getParameter<std::string>("snapshotTime"));
187  if (itToGet->exists("refreshTime")) {
188  cond::Time_t refreshTime = itToGet->getParameter<unsigned long long>("refreshTime");
189  m_refreshTimeForRecord.insert(std::make_pair(recordname, refreshTime));
190  }
191 
192  std::string recordLabelKey = joinRecordAndLabel(recordname, labelname);
193  replacements.insert(
194  std::make_pair(recordLabelKey, cond::GTEntry_t(std::make_tuple(recordname, labelname, fqTag))));
195  specialSnapshots.insert(std::make_pair(recordLabelKey, tagSnapshotTime));
196  }
197  }
198 
199  // get the global tag, merge with "replacement" store in "tagCollection"
200  std::vector<std::string> globaltagList;
201  std::vector<std::string> connectList;
202  std::vector<std::string> pfnPrefixList;
203  std::vector<std::string> pfnPostfixList;
204  if (!globaltag.empty()) {
205  std::string pfnPrefix(iConfig.getUntrackedParameter<std::string>("pfnPrefix", ""));
206  std::string pfnPostfix(iConfig.getUntrackedParameter<std::string>("pfnPostfix", ""));
207  boost::split(globaltagList, globaltag, boost::is_any_of("|"), boost::token_compress_off);
208  fillList(m_connectionString, connectList, globaltagList.size(), "connection");
209  fillList(pfnPrefix, pfnPrefixList, globaltagList.size(), "pfnPrefix");
210  fillList(pfnPostfix, pfnPostfixList, globaltagList.size(), "pfnPostfix");
211  }
212 
213  cond::GTMetadata_t gtMetadata;
214  fillTagCollectionFromDB(connectList, pfnPrefixList, pfnPostfixList, globaltagList, replacements, gtMetadata);
215  // if no job specific setting has been found, use the GT timestamp
216  if (snapshotTime.is_not_a_date_time())
217  snapshotTime = gtMetadata.snapshotTime;
218 
219  TagCollection::iterator it;
220  TagCollection::iterator itBeg = m_tagCollection.begin();
221  TagCollection::iterator itEnd = m_tagCollection.end();
222 
223  std::map<std::string, cond::persistency::Session> sessions;
224 
225  /* load DataProxy Plugin (it is strongly typed due to EventSetup ideosyncrasis)
226  * construct proxy
227  * contrary to EventSetup the "object-name" is not used as identifier: multiple entries in a record are
228  * dinstinguished only by their label...
229  * done in two step: first create ProxyWrapper loading ALL required dictionaries
230  * this will allow to initialize POOL in one go for each "database"
231  * The real initialization of the Data-Proxies is done in the second loop
232  */
233  std::vector<std::unique_ptr<cond::DataProxyWrapperBase>> proxyWrappers(m_tagCollection.size());
234  size_t ipb = 0;
235  for (it = itBeg; it != itEnd; ++it) {
236  proxyWrappers[ipb++] = std::unique_ptr<cond::DataProxyWrapperBase>{
237  cond::ProxyFactory::get()->create(buildName(it->second.recordName()))};
238  }
239 
240  // now all required libraries have been loaded
241  // init sessions and DataProxies
242  ipb = 0;
243  for (it = itBeg; it != itEnd; ++it) {
245  std::string tag = it->second.tagName();
246  std::pair<std::string, std::string> tagParams = cond::persistency::parseTag(it->second.tagName());
247  if (!tagParams.second.empty()) {
248  connStr = tagParams.second;
249  tag = tagParams.first;
250  }
251  std::map<std::string, cond::persistency::Session>::iterator p = sessions.find(connStr);
253  if (p == sessions.end()) {
255  std::tuple<std::string, std::string, std::string> connPars =
257  std::string dbService = std::get<1>(connPars);
258  std::string dbAccount = std::get<2>(connPars);
259  if ((dbService == "cms_orcon_prod" || dbService == "cms_orcon_adg") && dbAccount != "CMS_CONDITIONS")
260  edm::LogWarning("CondDBESSource")
261  << "[WARNING] You are reading tag \"" << tag << "\" from V1 account \"" << connStr
262  << "\". The concerned Conditions might be out of date." << std::endl;
263  //open db get tag info (i.e. the IOV token...)
264  nsess = m_connection.createReadOnlySession(connStr, "");
265  sessions.insert(std::make_pair(connStr, nsess));
266  } else
267  nsess = (*p).second;
268 
269  // ownership...
270  ProxyP proxy(std::move(proxyWrappers[ipb++]));
271  // instert in the map
272  m_proxies.insert(std::make_pair(it->second.recordName(), proxy));
273  // initialize
274  boost::posix_time::ptime tagSnapshotTime = snapshotTime;
275  auto tagSnapshotIter = specialSnapshots.find(it->first);
276  if (tagSnapshotIter != specialSnapshots.end())
277  tagSnapshotTime = tagSnapshotIter->second;
278  // finally, if the snapshot is set to infinity, reset the snapshot to null, to take the full iov set...
279  if (tagSnapshotTime == boost::posix_time::time_from_string(std::string(cond::time::MAX_TIMESTAMP)))
280  tagSnapshotTime = boost::posix_time::ptime();
281 
282  proxy->lateInit(nsess, tag, tagSnapshotTime, it->second.recordLabel(), connStr, &m_queue, &m_mutex);
283  }
284 
285  // one loaded expose all other tags to the Proxy!
286  CondGetterFromESSource visitor(m_proxies);
287  ProxyMap::iterator b = m_proxies.begin();
288  ProxyMap::iterator e = m_proxies.end();
289  for (; b != e; b++) {
290  (*b).second->proxy(0)->loadMore(visitor);
291 
294  if (recordKey.type() != EventSetupRecordKey::TypeTag()) {
295  findingRecordWithKey(recordKey);
296  usingRecordWithKey(recordKey);
297  }
298  }
299 
300  m_stats.nData = m_proxies.size();
301 }

References b, cond::persistency::ConnectionPool::configure(), cond::persistency::convertoToOracleConnection(), cond::persistency::ConnectionPool::createReadOnlySession(), MillePedeFileConverter_cfg::e, edm::ParameterSet::exists(), fillList(), fillTagCollectionFromDB(), edm::EventSetupRecordIntervalFinder::findingRecordWithKey(), edm::eventsetup::heterocontainer::HCTypeTag::findType(), cond::persistency::fullyQualifiedTag(), get, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), download_sqlite_cfg::globaltag, if(), m_connection, m_connectionString, m_frontierKey, m_mutex, m_policy, m_proxies, m_queue, m_refreshTimeForRecord, m_stats, m_tagCollection, cond::time::MAX_TIMESTAMP, eostools::move(), CondDBESSource::Stats::nData, AlCaHLTBitMon_ParallelJobs::p, cond::persistency::parseConnectionString(), cond::persistency::parseTag(), loadRecoTauTagMVAsFromPrepDB_cfi::pfnPostfix, loadRecoTauTagMVAsFromPrepDB_cfi::pfnPrefix, RECONNECT_EACH_RUN, REFRESH_ALWAYS, REFRESH_EACH_RUN, REFRESH_OPEN_IOVS, onlinebeammonitor_dqm_sourceclient-live_cfg::refreshTime, alignCSCRings::s, cond::persistency::ConnectionPool::setParameters(), L1TCSCTPG_cff::siteLocalConfig, loadRecoTauTagMVAsFromPrepDB_cfi::snapshotTime, cond::GTMetadata_t::snapshotTime, submitPVValidationJobs::split(), AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, DBConfiguration_cff::toGet, edm::eventsetup::EventSetupRecordKey::type(), and edm::eventsetup::DataProxyProvider::usingRecordWithKey().

◆ ~CondDBESSource()

CondDBESSource::~CondDBESSource ( )
override

Definition at line 321 of file CondDBESSource.cc.

321  {
322  //dump info FIXME: find a more suitable place...
323  if (m_doDump) {
324  std::cout << "CondDBESSource Statistics" << std::endl
325  << "DataProxy " << m_stats.nData << " setInterval " << m_stats.nSet << " Runs " << m_stats.nRun
326  << " Lumis " << m_stats.nLumi << " Refresh " << m_stats.nRefresh << " Actual Refresh "
327  << m_stats.nActualRefresh << " Reconnect " << m_stats.nReconnect << " Actual Reconnect "
329  std::cout << std::endl;
330 
331  ProxyMap::iterator b = m_proxies.begin();
332  ProxyMap::iterator e = m_proxies.end();
333  for (; b != e; b++) {
334  dumpInfo(std::cout, (*b).first, *(*b).second);
335  std::cout << "\n" << std::endl;
336  }
337 
338  // FIXME
339  // We shall eventually close transaction and session...
340  }
341 }

References b, gather_cfg::cout, MillePedeFileConverter_cfg::e, m_doDump, m_proxies, m_stats, CondDBESSource::Stats::nActualReconnect, CondDBESSource::Stats::nActualRefresh, CondDBESSource::Stats::nData, CondDBESSource::Stats::nLumi, CondDBESSource::Stats::nReconnect, CondDBESSource::Stats::nRefresh, CondDBESSource::Stats::nRun, and CondDBESSource::Stats::nSet.

Member Function Documentation

◆ fillList()

void CondDBESSource::fillList ( const std::string &  pfn,
std::vector< std::string > &  pfnList,
const unsigned int  listSize,
const std::string &  type 
)
private

Definition at line 303 of file CondDBESSource.cc.

306  {
307  boost::split(listToFill, stringList, boost::is_any_of("|"), boost::token_compress_off);
308  // If it is one clone it for each GT
309  if (listToFill.size() == 1) {
310  for (unsigned int i = 1; i < listSize; ++i) {
311  listToFill.push_back(stringList);
312  }
313  }
314  // else if they don't match the number of GTs throw an exception
315  else if (listSize != listToFill.size()) {
316  throw cond::Exception(
317  std::string("ESSource: number of global tag components does not match number of " + type + " strings"));
318  }
319 }

References mps_fire::i, submitPVValidationJobs::split(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by CondDBESSource().

◆ fillTagCollectionFromDB()

void CondDBESSource::fillTagCollectionFromDB ( const std::vector< std::string > &  connectionStringList,
const std::vector< std::string > &  prefixList,
const std::vector< std::string > &  postfixList,
const std::vector< std::string > &  roottagList,
std::map< std::string, cond::GTEntry_t > &  replacement,
cond::GTMetadata_t gtMetadata 
)
private

Definition at line 645 of file CondDBESSource.cc.

650  {
651  std::set<cond::GTEntry_t> tagcoll;
652 
653  auto connectionString = connectionStringList.begin();
654  auto prefix = prefixList.begin();
655  auto postfix = postfixList.begin();
656  for (auto roottag = roottagList.begin(); roottag != roottagList.end();
657  ++roottag, ++connectionString, ++prefix, ++postfix) {
658  fillTagCollectionFromGT(*connectionString, *prefix, *postfix, *roottag, tagcoll, gtMetadata);
659  }
660 
661  std::set<cond::GTEntry_t>::iterator tagCollIter;
662  std::set<cond::GTEntry_t>::iterator tagCollBegin = tagcoll.begin();
663  std::set<cond::GTEntry_t>::iterator tagCollEnd = tagcoll.end();
664 
665  // FIXME the logic is a bit perverse: can be surely linearized (at least simplified!) ....
666  for (tagCollIter = tagCollBegin; tagCollIter != tagCollEnd; ++tagCollIter) {
667  std::string recordLabelKey = joinRecordAndLabel(tagCollIter->recordName(), tagCollIter->recordLabel());
668  std::map<std::string, cond::GTEntry_t>::iterator fid = replacement.find(recordLabelKey);
669  if (fid != replacement.end()) {
670  if (!fid->second.tagName().empty()) {
671  cond::GTEntry_t tagMetadata(
672  std::make_tuple(tagCollIter->recordName(), tagCollIter->recordLabel(), fid->second.tagName()));
673  m_tagCollection.insert(std::make_pair(recordLabelKey, tagMetadata));
674  edm::LogInfo("CondDBESSource") << "Replacing tag \"" << tagCollIter->tagName() << "\" for record \""
675  << tagMetadata.recordName() << "\" and label \"" << tagMetadata.recordLabel()
676  << "\" with tag " << tagMetadata.tagName()
677  << "\"; from CondDBESSource::fillTagCollectionFromDB";
678  } else {
679  m_tagCollection.insert(std::make_pair(recordLabelKey, *tagCollIter));
680  }
681  replacement.erase(fid);
682  } else {
683  m_tagCollection.insert(std::make_pair(recordLabelKey, *tagCollIter));
684  }
685  }
686  std::map<std::string, cond::GTEntry_t>::iterator replacementIter;
687  std::map<std::string, cond::GTEntry_t>::iterator replacementBegin = replacement.begin();
688  std::map<std::string, cond::GTEntry_t>::iterator replacementEnd = replacement.end();
689  for (replacementIter = replacementBegin; replacementIter != replacementEnd; ++replacementIter) {
690  if (replacementIter->second.tagName().empty()) {
691  std::stringstream msg;
692  msg << "ESSource: no tag provided for record " << replacementIter->second.recordName();
693  if (!replacementIter->second.recordLabel().empty())
694  msg << " and label " << replacementIter->second.recordLabel();
695  throw cond::Exception(msg.str());
696  }
697  m_tagCollection.insert(*replacementIter);
698  }
699 }

References l1RCTOmdsFedVectorProducer_cfi::connectionString, fillTagCollectionFromGT(), m_tagCollection, mps_check::msg, hcallasereventfilter2012_cfi::prefix, cond::GTEntry_t::recordLabel(), cond::GTEntry_t::recordName(), AlCaHLTBitMon_QueryRunRegistry::string, and cond::GTEntry_t::tagName().

Referenced by CondDBESSource().

◆ fillTagCollectionFromGT()

void CondDBESSource::fillTagCollectionFromGT ( const std::string &  connectionString,
const std::string &  prefix,
const std::string &  postfix,
const std::string &  roottag,
std::set< cond::GTEntry_t > &  tagcoll,
cond::GTMetadata_t gtMetadata 
)
private

Definition at line 611 of file CondDBESSource.cc.

616  {
617  if (!roottag.empty()) {
618  if (connectionString.empty())
619  throw cond::Exception(std::string("ESSource: requested global tag ") + roottag +
620  std::string(" but not connection string given"));
621  std::tuple<std::string, std::string, std::string> connPars =
623  if (std::get<2>(connPars) == "CMS_COND_31X_GLOBALTAG") {
624  edm::LogWarning("CondDBESSource")
625  << "[WARNING] You are reading Global Tag \"" << roottag
626  << "\" from V1 account \"CMS_COND_31X_GLOBALTAG\". The concerned Conditions might be out of date."
627  << std::endl;
628  } else if (roottag.rfind("::All") != std::string::npos && std::get<2>(connPars) == "CMS_CONDITIONS") {
629  edm::LogWarning("CondDBESSource") << "[WARNING] You are trying to read Global Tag \"" << roottag
630  << "\" - postfix \"::All\" should not be used for V2." << std::endl;
631  }
633  session.transaction().start(true);
634  cond::persistency::GTProxy gtp = session.readGlobalTag(roottag, prefix, postfix);
635  gtMetadata.snapshotTime = gtp.snapshotTime();
636  for (const auto& gte : gtp) {
637  tagcoll.insert(gte);
638  }
639  session.transaction().commit();
640  }
641 }

References cond::persistency::Transaction::commit(), l1RCTOmdsFedVectorProducer_cfi::connectionString, cond::persistency::ConnectionPool::createSession(), m_connection, cond::persistency::parseConnectionString(), hcallasereventfilter2012_cfi::prefix, cond::persistency::Session::readGlobalTag(), cond::persistency::GTProxy::snapshotTime(), cond::GTMetadata_t::snapshotTime, cond::persistency::Transaction::start(), AlCaHLTBitMon_QueryRunRegistry::string, and cond::persistency::Session::transaction().

Referenced by fillTagCollectionFromDB().

◆ initConcurrentIOVs()

void CondDBESSource::initConcurrentIOVs ( const EventSetupRecordKey key,
unsigned int  nConcurrentIOVs 
)
overrideprotectedvirtual

Reimplemented from edm::eventsetup::DataProxyProvider.

Definition at line 599 of file CondDBESSource.cc.

599  {
600  std::string recordname = key.name();
601  ProxyMap::const_iterator b = m_proxies.lower_bound(recordname);
602  ProxyMap::const_iterator e = m_proxies.upper_bound(recordname);
603  for (ProxyMap::const_iterator p = b; p != e; ++p) {
604  if (p->second) {
605  p->second->initConcurrentIOVs(nConcurrentIOVs);
606  }
607  }
608 }

References b, MillePedeFileConverter_cfg::e, crabWrapper::key, m_proxies, AlCaHLTBitMon_ParallelJobs::p, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ isConcurrentFinder()

bool CondDBESSource::isConcurrentFinder ( ) const
inlineoverrideprotectedvirtual

Reimplemented from edm::EventSetupRecordIntervalFinder.

Definition at line 106 of file CondDBESSource.h.

106 { return true; }

◆ registerProxies()

edm::eventsetup::DataProxyProvider::KeyedProxiesVector CondDBESSource::registerProxies ( const EventSetupRecordKey iRecordKey,
unsigned int  iovIndex 
)
overrideprotectedvirtual

Implements edm::eventsetup::DataProxyProvider.

Definition at line 575 of file CondDBESSource.cc.

576  {
577  KeyedProxiesVector keyedProxiesVector;
578 
579  std::string recordname = iRecordKey.name();
580 
581  ProxyMap::const_iterator b = m_proxies.lower_bound(recordname);
582  ProxyMap::const_iterator e = m_proxies.upper_bound(recordname);
583  if (b == e) {
584  edm::LogInfo("CondDBESSource") << "No DataProxy (Pluging) found for record \"" << recordname
585  << "\"; from CondDBESSource::registerProxies";
586  return keyedProxiesVector;
587  }
588 
589  for (ProxyMap::const_iterator p = b; p != e; ++p) {
590  if (nullptr != (*p).second.get()) {
591  edm::eventsetup::TypeTag type = (*p).second->type();
592  DataKey key(type, edm::eventsetup::IdTags((*p).second->label().c_str()));
593  keyedProxiesVector.emplace_back(key, (*p).second->edmProxy(iovIndex));
594  }
595  }
596  return keyedProxiesVector;
597 }

References b, MillePedeFileConverter_cfg::e, crabWrapper::key, m_proxies, edm::eventsetup::EventSetupRecordKey::name(), AlCaHLTBitMon_ParallelJobs::p, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ setIntervalFor()

void CondDBESSource::setIntervalFor ( const EventSetupRecordKey iKey,
const edm::IOVSyncValue iTime,
edm::ValidityInterval oInterval 
)
overrideprotectedvirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 347 of file CondDBESSource.cc.

349  {
350  std::string recordname = iKey.name();
351 
352  edm::LogInfo("CondDBESSource") << "Getting data for record \"" << recordname << "\" to be consumed by "
353  << iTime.eventID() << ", timestamp: " << iTime.time().value()
354  << "; from CondDBESSource::setIntervalFor";
355 
356  std::lock_guard<std::mutex> guard(m_mutex);
357  m_stats.nSet++;
358  //{
359  // not really required, keep here for the time being
360  if (iTime.eventID().run() != m_lastRun) {
361  m_lastRun = iTime.eventID().run();
362  m_stats.nRun++;
363  }
364  if (iTime.luminosityBlockNumber() != m_lastLumi) {
366  m_stats.nLumi++;
367  }
368  //}
369  cond::Time_t lastTime = m_lastRun;
370  cond::Time_t defaultIovSize = cond::time::MAX_VAL;
371  cond::Time_t minDiffTime = 1;
372  bool refreshThisRecord = false;
373  if (m_policy != REFRESH_ALWAYS) {
374  auto iR = m_refreshTimeForRecord.find(recordname);
375  refreshThisRecord = (iR != m_refreshTimeForRecord.end());
376  if (refreshThisRecord) {
378  defaultIovSize = iR->second;
379  minDiffTime = defaultIovSize;
380  }
381  }
382  bool doRefresh = false;
383  if (m_policy == REFRESH_EACH_RUN || m_policy == RECONNECT_EACH_RUN || refreshThisRecord) {
384  // find out the last run number for the proxy of the specified record
385  std::map<std::string, cond::Time_t>::iterator iRec = m_lastRecordRuns.find(recordname);
386  if (iRec != m_lastRecordRuns.end()) {
387  cond::Time_t lastRecordRun = iRec->second;
388  cond::Time_t diffTime = lastTime - lastRecordRun;
389  if (lastRecordRun > lastTime)
390  diffTime = lastRecordRun - lastTime;
391  if (diffTime >= minDiffTime) {
392  // a refresh is required!
393  doRefresh = true;
394  iRec->second = lastTime;
395  edm::LogInfo("CondDBESSource") << "Preparing refresh for record \"" << recordname
396  << "\" since there has been a transition from run/lumi " << lastRecordRun
397  << " to run/lumi " << lastTime << "; from CondDBESSource::setIntervalFor";
398  }
399  } else {
400  doRefresh = true;
401  m_lastRecordRuns.insert(std::make_pair(recordname, lastTime));
402  edm::LogInfo("CondDBESSource") << "Preparing refresh for record \"" << recordname << "\" for " << iTime.eventID()
403  << ", timestamp: " << iTime.time().value()
404  << "; from CondDBESSource::setIntervalFor";
405  }
406  if (!doRefresh)
407  edm::LogInfo("CondDBESSource") << "Though enabled, refresh not needed for record \"" << recordname << "\" for "
408  << iTime.eventID() << ", timestamp: " << iTime.time().value()
409  << "; from CondDBESSource::setIntervalFor";
410  } else if (m_policy == REFRESH_ALWAYS || m_policy == REFRESH_OPEN_IOVS) {
411  doRefresh = true;
412  edm::LogInfo("CondDBESSource") << "Forcing refresh for record \"" << recordname << "\" for " << iTime.eventID()
413  << ", timestamp: " << iTime.time().value()
414  << "; from CondDBESSource::setIntervalFor";
415  }
416 
418 
419  // compute the smallest interval (assume all objects have the same timetype....)
420  cond::ValidityInterval recordValidity(1, cond::TIMELIMIT);
421  cond::TimeType timetype = cond::TimeType::invalid;
422  bool userTime = true;
423 
424  //FIXME use equal_range
425  ProxyMap::const_iterator pmBegin = m_proxies.lower_bound(recordname);
426  ProxyMap::const_iterator pmEnd = m_proxies.upper_bound(recordname);
427  if (pmBegin == pmEnd) {
428  edm::LogInfo("CondDBESSource") << "No DataProxy (Pluging) found for record \"" << recordname
429  << "\"; from CondDBESSource::setIntervalFor";
430  return;
431  }
432 
433  for (ProxyMap::const_iterator pmIter = pmBegin; pmIter != pmEnd; ++pmIter) {
434  edm::LogInfo("CondDBESSource") << "Processing record \"" << recordname << "\" and label \""
435  << pmIter->second->label() << "\" for " << iTime.eventID()
436  << ", timestamp: " << iTime.time().value()
437  << "; from CondDBESSource::setIntervalFor";
438 
439  timetype = (*pmIter).second->timeType();
440 
442  userTime = (0 == abtime);
443 
444  if (userTime)
445  return; // oInterval invalid to avoid that make is called...
446 
447  if (doRefresh) {
448  std::string recKey = joinRecordAndLabel(recordname, pmIter->second->label());
449  TagCollection::const_iterator tcIter = m_tagCollection.find(recKey);
450  if (tcIter == m_tagCollection.end()) {
451  edm::LogInfo("CondDBESSource") << "No Tag found for record \"" << recordname << "\" and label \""
452  << pmIter->second->label() << "\"; from CondDBESSource::setIntervalFor";
453  return;
454  }
455 
456  // first reconnect if required
457  if (m_policy == RECONNECT_EACH_RUN || refreshThisRecord) {
458  edm::LogInfo("CondDBESSource")
459  << "Checking if the session must be closed and re-opened for getting correct conditions"
460  << "; from CondDBESSource::setIntervalFor";
461  std::stringstream transId;
462  transId << lastTime;
463  if (!m_frontierKey.empty()) {
464  transId << "_" << m_frontierKey;
465  }
467  std::pair<std::string, std::string> tagParams = cond::persistency::parseTag(tcIter->second.tagName());
468  if (!tagParams.second.empty())
469  connStr = tagParams.second;
470  std::map<std::string, std::pair<cond::persistency::Session, std::string>>* sessionPool = &m_sessionPool;
471  if (refreshThisRecord) {
472  sessionPool = &m_sessionPoolForLumiConditions;
473  }
474  auto iSess = sessionPool->find(connStr);
475  bool reopen = false;
476  if (iSess != sessionPool->end()) {
477  if (iSess->second.second != transId.str()) {
478  // the available session is open for a different run: reopen
479  reopen = true;
480  iSess->second.second = transId.str();
481  }
482  } else {
483  // no available session: probably first run analysed...
484  iSess =
485  sessionPool->insert(std::make_pair(connStr, std::make_pair(cond::persistency::Session(), transId.str())))
486  .first;
487  reopen = true;
488  }
489  if (reopen) {
490  iSess->second.first = m_connection.createReadOnlySession(connStr, transId.str());
491  edm::LogInfo("CondDBESSource") << "Re-opening the session with connection string " << connStr
492  << " and new transaction Id " << transId.str()
493  << "; from CondDBESSource::setIntervalFor";
494  }
495 
496  edm::LogInfo("CondDBESSource") << "Reconnecting to \"" << connStr << "\" for getting new payload for record \""
497  << recordname << "\" and label \"" << pmIter->second->label()
498  << "\" from IOV tag \"" << tcIter->second.tagName() << "\" to be consumed by "
499  << iTime.eventID() << ", timestamp: " << iTime.time().value()
500  << "; from CondDBESSource::setIntervalFor";
501  pmIter->second->session() = iSess->second.first;
502  pmIter->second->reload();
503  //if( isSizeIncreased )
504  //edm::LogInfo( "CondDBESSource" ) << "After reconnecting, an increased size of the IOV sequence labeled by tag \"" << tcIter->second.tag
505  // << "\" was found; from CondDBESSource::setIntervalFor";
506  //m_stats.nActualReconnect += isSizeIncreased;
508  } else {
509  edm::LogInfo("CondDBESSource") << "Refreshing IOV sequence labeled by tag \"" << tcIter->second.tagName()
510  << "\" for getting new payload for record \"" << recordname << "\" and label \""
511  << pmIter->second->label() << "\" to be consumed by " << iTime.eventID()
512  << ", timestamp: " << iTime.time().value()
513  << "; from CondDBESSource::setIntervalFor";
514  pmIter->second->reload();
515  //if( isSizeIncreased )
516  // edm::LogInfo( "CondDBESSource" ) << "After refreshing, an increased size of the IOV sequence labeled by tag \"" << tcIter->second.tag
517  // << "\" was found; from CondDBESSource::setIntervalFor";
518  //m_stats.nActualRefresh += isSizeIncreased;
519  m_stats.nRefresh++;
520  }
521  }
522 
523  /*
524  // make oInterval valid For Ever
525  {
526  oInterval = edm::ValidityInterval(cond::toIOVSyncValue(recordValidity.first, cond::runnumber, true),
527  cond::toIOVSyncValue(recordValidity.second, cond::runnumber, false));
528  return;
529  }
530  */
531 
532  //query the IOVSequence
533  cond::ValidityInterval validity = (*pmIter).second->setIntervalFor(abtime, defaultIovSize);
534 
535  edm::LogInfo("CondDBESSource") << "Validity coming from IOV sequence for record \"" << recordname
536  << "\" and label \"" << pmIter->second->label() << "\": (" << validity.first << ", "
537  << validity.second << ") for time (type: " << cond::timeTypeNames(timetype) << ") "
538  << abtime << "; from CondDBESSource::setIntervalFor";
539 
540  recordValidity.first = std::max(recordValidity.first, validity.first);
541  recordValidity.second = std::min(recordValidity.second, validity.second);
542  }
543 
544  if (m_policy == REFRESH_OPEN_IOVS) {
545  doRefresh = (recordValidity.second == cond::timeTypeSpecs[timetype].endValue);
546  edm::LogInfo("CondDBESSource") << "Validity for record \"" << recordname
547  << "\" and the corresponding label(s) coming from Condition DB: ("
548  << recordValidity.first << ", " << recordValidity.first
549  << ") as the last IOV element in the IOV sequence is infinity"
550  << "; from CondDBESSource::setIntervalFor";
551  }
552 
553  // to force refresh we set end-value to the minimum such an IOV can extend to: current run or lumiblock
554 
555  if ((!userTime) && recordValidity.second != 0) {
556  edm::IOVSyncValue start = cond::time::toIOVSyncValue(recordValidity.first, timetype, true);
558  : cond::time::toIOVSyncValue(recordValidity.second, timetype, false);
559 
562  }
563  oInterval = edm::ValidityInterval(start, stop);
564  }
565 
566  edm::LogInfo("CondDBESSource") << "Setting validity for record \"" << recordname
567  << "\" and corresponding label(s): starting at " << oInterval.first().eventID()
568  << ", timestamp: " << oInterval.first().time().value() << ", ending at "
569  << oInterval.last().eventID() << ", timestamp: " << oInterval.last().time().value()
570  << ", for " << iTime.eventID() << ", timestamp: " << iTime.time().value()
571  << "; from CondDBESSource::setIntervalFor";
572 }

References edm::IOVSyncValue::beginOfTime(), cond::persistency::ConnectionPool::createReadOnlySession(), cond::TimeTypeSpecs::endValue, edm::IOVSyncValue::eventID(), edm::ValidityInterval::first(), first, cond::time::fromIOVSyncValue(), if(), edm::ValidityInterval::invalidInterval(), edm::IOVSyncValue::invalidIOVSyncValue(), edm::ValidityInterval::last(), cond::time::limitedIOVSyncValue(), edm::IOVSyncValue::luminosityBlockNumber(), cond::time::lumiTime(), m_connection, m_connectionString, m_frontierKey, m_lastLumi, m_lastRecordRuns, m_lastRun, m_mutex, m_policy, m_proxies, m_refreshTimeForRecord, m_sessionPool, m_sessionPoolForLumiConditions, m_stats, m_tagCollection, genParticles_cff::map, SiStripPI::max, cond::time::MAX_VAL(), min(), edm::eventsetup::EventSetupRecordKey::name(), CondDBESSource::Stats::nLumi, CondDBESSource::Stats::nReconnect, CondDBESSource::Stats::nRefresh, CondDBESSource::Stats::nRun, CondDBESSource::Stats::nSet, cond::persistency::parseTag(), RECONNECT_EACH_RUN, REFRESH_ALWAYS, REFRESH_EACH_RUN, REFRESH_OPEN_IOVS, edm::EventID::run(), AlCaHLTBitMon_QueryRunRegistry::string, edm::IOVSyncValue::time(), cond::TIMELIMIT(), DBConfiguration_cff::timetype, cond::timeTypeNames(), cond::timeTypeSpecs, cond::time::toIOVSyncValue(), and edm::Timestamp::value().

Member Data Documentation

◆ m_connection

cond::persistency::ConnectionPool CondDBESSource::m_connection
private

Definition at line 111 of file CondDBESSource.h.

Referenced by CondDBESSource(), fillTagCollectionFromGT(), and setIntervalFor().

◆ m_connectionString

std::string CondDBESSource::m_connectionString
private

Definition at line 112 of file CondDBESSource.h.

Referenced by CondDBESSource(), and setIntervalFor().

◆ m_doDump

bool CondDBESSource::m_doDump
private

Definition at line 146 of file CondDBESSource.h.

Referenced by ~CondDBESSource().

◆ m_frontierKey

std::string CondDBESSource::m_frontierKey
private

Definition at line 113 of file CondDBESSource.h.

Referenced by CondDBESSource(), and setIntervalFor().

◆ m_lastLumi

unsigned int CondDBESSource::m_lastLumi
private

Definition at line 143 of file CondDBESSource.h.

Referenced by setIntervalFor().

◆ m_lastRecordRuns

std::map<std::string, cond::Time_t> CondDBESSource::m_lastRecordRuns
private

Definition at line 124 of file CondDBESSource.h.

Referenced by setIntervalFor().

◆ m_lastRun

unsigned int CondDBESSource::m_lastRun
private

Definition at line 142 of file CondDBESSource.h.

Referenced by setIntervalFor().

◆ m_mutex

std::mutex CondDBESSource::m_mutex
private

Definition at line 127 of file CondDBESSource.h.

Referenced by CondDBESSource(), and setIntervalFor().

◆ m_policy

RefreshPolicy CondDBESSource::m_policy
private

Definition at line 144 of file CondDBESSource.h.

Referenced by CondDBESSource(), and setIntervalFor().

◆ m_proxies

ProxyMap CondDBESSource::m_proxies
private

◆ m_queue

edm::SerialTaskQueue CondDBESSource::m_queue
private

Definition at line 126 of file CondDBESSource.h.

Referenced by CondDBESSource().

◆ m_refreshTimeForRecord

std::map<std::string, cond::Time_t> CondDBESSource::m_refreshTimeForRecord
private

Definition at line 121 of file CondDBESSource.h.

Referenced by CondDBESSource(), and setIntervalFor().

◆ m_sessionPool

std::map<std::string, std::pair<cond::persistency::Session, std::string> > CondDBESSource::m_sessionPool
private

Definition at line 122 of file CondDBESSource.h.

Referenced by setIntervalFor().

◆ m_sessionPoolForLumiConditions

std::map<std::string, std::pair<cond::persistency::Session, std::string> > CondDBESSource::m_sessionPoolForLumiConditions
private

Definition at line 123 of file CondDBESSource.h.

Referenced by setIntervalFor().

◆ m_stats

Stats CondDBESSource::m_stats
private

Definition at line 140 of file CondDBESSource.h.

Referenced by CondDBESSource(), setIntervalFor(), and ~CondDBESSource().

◆ m_tagCollection

TagCollection CondDBESSource::m_tagCollection
private

Definition at line 120 of file CondDBESSource.h.

Referenced by CondDBESSource(), fillTagCollectionFromDB(), and setIntervalFor().

DBConfiguration_cff.toGet
toGet
Definition: DBConfiguration_cff.py:10
edm::eventsetup::heterocontainer::HCTypeTag::findType
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:121
CondDBESSource::REFRESH_EACH_RUN
Definition: CondDBESSource.h:94
CondDBESSource::fillList
void fillList(const std::string &pfn, std::vector< std::string > &pfnList, const unsigned int listSize, const std::string &type)
Definition: CondDBESSource.cc:303
mps_fire.i
i
Definition: mps_fire.py:428
CondDBESSource::m_connection
cond::persistency::ConnectionPool m_connection
Definition: CondDBESSource.h:111
start
Definition: start.py:1
CondDBESSource::Stats::nActualReconnect
int nActualReconnect
Definition: CondDBESSource.h:137
cond::TimeType
TimeType
Definition: Time.h:19
funct::false
false
Definition: Factorize.h:29
CondDBESSource::Stats::nRun
int nRun
Definition: CondDBESSource.h:132
cond::GTMetadata_t
Definition: Types.h:101
cond::persistency::GTProxy
Definition: GTProxy.h:32
DataKey
min
T min(T a, T b)
Definition: MathUtil.h:58
edm::IOVSyncValue::invalidIOVSyncValue
static const IOVSyncValue & invalidIOVSyncValue()
Definition: IOVSyncValue.cc:78
cond::persistency::parseConnectionString
std::tuple< std::string, std::string, std::string > parseConnectionString(const std::string &connectionString)
Definition: Utils.h:96
cond::time::toIOVSyncValue
edm::IOVSyncValue toIOVSyncValue(cond::Time_t time, TimeType timetype, bool startOrStop)
Definition: Time.cc:67
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
gather_cfg.cout
cout
Definition: gather_cfg.py:144
CondDBESSource::m_lastRun
unsigned int m_lastRun
Definition: CondDBESSource.h:142
edm::ValidityInterval::last
const IOVSyncValue & last() const
Definition: ValidityInterval.h:38
if
if(0==first)
Definition: CAHitNtupletGeneratorKernelsImpl.h:48
loadRecoTauTagMVAsFromPrepDB_cfi.snapshotTime
snapshotTime
Definition: loadRecoTauTagMVAsFromPrepDB_cfi.py:10
CondDBESSource::m_connectionString
std::string m_connectionString
Definition: CondDBESSource.h:112
protons_cff.time
time
Definition: protons_cff.py:39
edm::ValidityInterval::first
const IOVSyncValue & first() const
Definition: ValidityInterval.h:37
EventSetupRecordKey
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
CondDBESSource::m_proxies
ProxyMap m_proxies
Definition: CondDBESSource.h:116
CondDBESSource::REFRESH_ALWAYS
Definition: CondDBESSource.h:94
cond::persistency::fullyQualifiedTag
std::string fullyQualifiedTag(const std::string &tag, const std::string &connectionString)
Definition: GTProxy.cc:8
mps_check.msg
tuple msg
Definition: mps_check.py:285
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
CondDBESSource::NOREFRESH
Definition: CondDBESSource.h:94
edm::Timestamp::value
TimeValue_t value() const
Definition: Timestamp.h:45
cond::persistency::Session::readGlobalTag
GTProxy readGlobalTag(const std::string &name)
Definition: Session.cc:163
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::IOVSyncValue::luminosityBlockNumber
LuminosityBlockNumber_t luminosityBlockNumber() const
Definition: IOVSyncValue.h:41
cond::time::MAX_TIMESTAMP
static constexpr const char *const MAX_TIMESTAMP
Definition: Time.h:26
cond::persistency::ConnectionPool::createSession
Session createSession(const std::string &connectionString, bool writeCapable=false)
Definition: ConnectionPool.cc:172
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
CondDBESSource::m_doDump
bool m_doDump
Definition: CondDBESSource.h:146
CondDBESSource::m_sessionPoolForLumiConditions
std::map< std::string, std::pair< cond::persistency::Session, std::string > > m_sessionPoolForLumiConditions
Definition: CondDBESSource.h:123
CondDBESSource::REFRESH_OPEN_IOVS
Definition: CondDBESSource.h:94
CondDBESSource::m_lastLumi
unsigned int m_lastLumi
Definition: CondDBESSource.h:143
cond::persistency::convertoToOracleConnection
std::string convertoToOracleConnection(const std::string &input)
Definition: Utils.h:121
CondDBESSource::fillTagCollectionFromDB
void fillTagCollectionFromDB(const std::vector< std::string > &connectionStringList, const std::vector< std::string > &prefixList, const std::vector< std::string > &postfixList, const std::vector< std::string > &roottagList, std::map< std::string, cond::GTEntry_t > &replacement, cond::GTMetadata_t &gtMetadata)
Definition: CondDBESSource.cc:645
alignCSCRings.s
s
Definition: alignCSCRings.py:92
CondDBESSource::m_tagCollection
TagCollection m_tagCollection
Definition: CondDBESSource.h:120
cond::timeTypeSpecs
const TimeTypeSpecs timeTypeSpecs[]
Definition: Time.cc:16
CondDBESSource::Stats::nActualRefresh
int nActualRefresh
Definition: CondDBESSource.h:135
cond::time::fromIOVSyncValue
Time_t fromIOVSyncValue(edm::IOVSyncValue const &time, TimeType timetype)
Definition: Time.cc:85
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
CondDBESSource::m_stats
Stats m_stats
Definition: CondDBESSource.h:140
submitPVValidationJobs.split
def split(sequence, size)
Definition: submitPVValidationJobs.py:352
cond::GTEntry_t
Definition: Types.h:109
edm::EventSetupRecordIntervalFinder::findingRecordWithKey
void findingRecordWithKey(const eventsetup::EventSetupRecordKey &)
Definition: EventSetupRecordIntervalFinder.cc:44
edm::eventsetup::EventSetupRecordKey::TypeTag
heterocontainer::HCTypeTag TypeTag
Definition: EventSetupRecordKey.h:32
b
double b
Definition: hdecay.h:118
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:112
edm::IOVSyncValue
Definition: IOVSyncValue.h:31
CondDBESSource::m_policy
RefreshPolicy m_policy
Definition: CondDBESSource.h:144
edm::EventID::run
RunNumber_t run() const
Definition: EventID.h:38
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CondDBESSource::Stats::nRefresh
int nRefresh
Definition: CondDBESSource.h:134
cond
Definition: plugin.cc:23
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:681
edm::IOVSyncValue::eventID
const EventID & eventID() const
Definition: IOVSyncValue.h:40
edm::ParameterSet
Definition: ParameterSet.h:47
cond::TIMELIMIT
const Time_t TIMELIMIT(std::numeric_limits< Time_t >::max())
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
cond::persistency::Session
Definition: Session.h:63
edm::eventsetup::heterocontainer::HCTypeTag
Definition: HCTypeTag.h:38
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
CondDBESSource::RECONNECT_EACH_RUN
Definition: CondDBESSource.h:94
download_sqlite_cfg.globaltag
globaltag
Definition: download_sqlite_cfg.py:14
loadRecoTauTagMVAsFromPrepDB_cfi.pfnPrefix
pfnPrefix
Definition: loadRecoTauTagMVAsFromPrepDB_cfi.py:18
edm::Service
Definition: Service.h:30
cond::persistency::Transaction::commit
void commit()
Definition: Session.cc:23
CondDBESSource::RefreshPolicy
RefreshPolicy
Definition: CondDBESSource.h:94
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
cond::Exception
persistency::Exception Exception
Definition: Exception.h:25
cond::persistency::parseTag
std::pair< std::string, std::string > parseTag(const std::string &tag)
Definition: GTProxy.cc:14
cond::persistency::ConnectionPool::setParameters
void setParameters(const edm::ParameterSet &connectionPset)
Definition: ConnectionPool.cc:43
CondDBESSource::m_frontierKey
std::string m_frontierKey
Definition: CondDBESSource.h:113
CondDBESSource::Stats::nSet
int nSet
Definition: CondDBESSource.h:131
edm::eventsetup::DataProxyProvider::KeyedProxiesVector
std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >> KeyedProxiesVector
Definition: DataProxyProvider.h:196
cond::time::lumiTime
Time_t lumiTime(unsigned int run, unsigned int lumiId)
Definition: Time.cc:54
cond::persistency::ConnectionPool::configure
void configure()
Definition: ConnectionPool.cc:127
get
#define get
edm::eventsetup::DataProxyProvider::usingRecordWithKey
void usingRecordWithKey(const EventSetupRecordKey &key)
Definition: DataProxyProvider.h:194
onlinebeammonitor_dqm_sourceclient-live_cfg.refreshTime
refreshTime
Definition: onlinebeammonitor_dqm_sourceclient-live_cfg.py:126
CondDBESSource::fillTagCollectionFromGT
void fillTagCollectionFromGT(const std::string &connectionString, const std::string &prefix, const std::string &postfix, const std::string &roottag, std::set< cond::GTEntry_t > &tagcoll, cond::GTMetadata_t &gtMetadata)
Definition: CondDBESSource.cc:611
cond::persistency::Session::transaction
Transaction & transaction()
Definition: Session.cc:52
CondDBESSource::m_mutex
std::mutex m_mutex
Definition: CondDBESSource.h:127
cond::persistency::Transaction::start
void start(bool readOnly=true)
Definition: Session.cc:18
edm::IOVSyncValue::time
const Timestamp & time() const
Definition: IOVSyncValue.h:42
cond::ValidityInterval
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:17
cond::timeTypeNames
std::string const & timeTypeNames(int)
Definition: Time.cc:11
eostools.move
def move(src, dest)
Definition: eostools.py:511
CondDBESSource::Stats::nReconnect
int nReconnect
Definition: CondDBESSource.h:136
CondDBESSource::Stats::nData
int nData
Definition: CondDBESSource.h:130
edm::eventsetup::NameTag
Definition: DataKeyTags.h:45
CondDBESSource::m_refreshTimeForRecord
std::map< std::string, cond::Time_t > m_refreshTimeForRecord
Definition: CondDBESSource.h:121
loadRecoTauTagMVAsFromPrepDB_cfi.pfnPostfix
pfnPostfix
Definition: loadRecoTauTagMVAsFromPrepDB_cfi.py:17
edm::IOVSyncValue::beginOfTime
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
CondDBESSource::ProxyP
std::shared_ptr< cond::DataProxyWrapperBase > ProxyP
Definition: CondDBESSource.h:91
cond::persistency::GTProxy::snapshotTime
boost::posix_time::ptime snapshotTime() const
Definition: GTProxy.cc:135
genParticles_cff.map
map
Definition: genParticles_cff.py:11
cond::persistency::ConnectionPool::createReadOnlySession
Session createReadOnlySession(const std::string &connectionString, const std::string &transactionId)
Definition: ConnectionPool.cc:176
CondDBESSource::m_lastRecordRuns
std::map< std::string, cond::Time_t > m_lastRecordRuns
Definition: CondDBESSource.h:124
L1TCSCTPG_cff.siteLocalConfig
siteLocalConfig
Definition: L1TCSCTPG_cff.py:8
l1RCTOmdsFedVectorProducer_cfi.connectionString
connectionString
Definition: l1RCTOmdsFedVectorProducer_cfi.py:4
Parameters
vector< ParameterSet > Parameters
Definition: HLTMuonPlotter.cc:25
CondDBESSource::Stats::nLumi
int nLumi
Definition: CondDBESSource.h:133
crabWrapper.key
key
Definition: crabWrapper.py:19
cond::GTMetadata_t::snapshotTime
boost::posix_time::ptime snapshotTime
Definition: Types.h:106
CondDBESSource::m_sessionPool
std::map< std::string, std::pair< cond::persistency::Session, std::string > > m_sessionPool
Definition: CondDBESSource.h:122
edm::ValidityInterval::invalidInterval
static const ValidityInterval & invalidInterval()
Definition: ValidityInterval.cc:71
hcallasereventfilter2012_cfi.prefix
prefix
Definition: hcallasereventfilter2012_cfi.py:10
CondDBESSource::m_queue
edm::SerialTaskQueue m_queue
Definition: CondDBESSource.h:126
DBConfiguration_cff.timetype
timetype
Definition: DBConfiguration_cff.py:23
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
cond::time::limitedIOVSyncValue
edm::IOVSyncValue limitedIOVSyncValue(Time_t time, TimeType timetype)
Definition: Time.cc:101