CMS 3D CMS Logo

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

#include <CondDBESSource.h>

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

Classes

struct  Stats
 

Public Types

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

Public Member Functions

 CondDBESSource (const edm::ParameterSet &)
 
 ~CondDBESSource () override
 
- Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
void createKeyedResolvers (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
const ComponentDescriptiondescription () const
 
 ESProductResolverProvider ()
 
 ESProductResolverProvider (const ESProductResolverProvider &)=delete
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedResolverskeyedResolvers (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const ESProductResolverProvideroperator= (const ESProductResolverProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
virtual void updateLookup (ESRecordsToProductResolverIndices const &)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~ESProductResolverProvider () 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)
 

Public Attributes

std::string m_jsonDumpFilename
 

Protected Member Functions

void initConcurrentIOVs (const EventSetupRecordKey &key, unsigned int nConcurrentIOVs) override
 
bool isConcurrentFinder () const override
 
KeyedResolversVector registerResolvers (const EventSetupRecordKey &, unsigned int iovIndex) override
 
void setIntervalFor (const EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
 
- Protected Member Functions inherited from edm::eventsetup::ESProductResolverProvider
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)
 
void printStatistics (const Stats &stats) const
 

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, unsigned int > m_lastRecordRuns
 
unsigned int m_lastRun
 
std::mutex m_mutex
 
RefreshPolicy m_policy
 
edm::SerialTaskQueue m_queue
 
std::map< std::string, std::pair< cond::Time_t, bool > > m_refreshTimeForRecord
 
ResolverMap m_resolvers
 
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::ESProductResolverProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::eventsetup::ESProductResolverProvider
using KeyedResolversVector = std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >>
 

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.

◆ ResolverMap

typedef std::multimap<std::string, ResolverP> CondDBESSource::ResolverMap

Definition at line 92 of file CondDBESSource.h.

◆ ResolverP

Definition at line 91 of file CondDBESSource.h.

◆ TagCollection

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

Definition at line 120 of file CondDBESSource.h.

Member Enumeration Documentation

◆ RefreshPolicy

Constructor & Destructor Documentation

◆ CondDBESSource()

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

required by eventsetup

Definition at line 123 of file CondDBESSource.cc.

References b, cond::persistency::ConnectionPool::configure(), cond::persistency::convertoToOracleConnection(), cond::persistency::ConnectionPool::createReadOnlySession(), MillePedeFileConverter_cfg::e, edm::ParameterSet::exists(), fillList(), fillTagCollectionFromDB(), edm::EventSetupRecordIntervalFinder::findingRecordWithKey(), cond::persistency::fullyQualifiedTag(), get, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), download_sqlite_cfg::globaltag, ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets::if(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, m_connection, m_connectionString, m_frontierKey, m_mutex, m_policy, m_queue, m_refreshTimeForRecord, m_resolvers, 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, beamspotdip_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, makeGlobalPositionRcd_cfg::tag, GlobalPosition_Frontier_DevDB_cff::toGet, edm::eventsetup::EventSetupRecordKey::type(), and edm::eventsetup::ESProductResolverProvider::usingRecordWithKey().

124  : m_jsonDumpFilename(iConfig.getUntrackedParameter<std::string>("JsonDumpFileName", "")),
125  m_connection(),
126  m_connectionString(""),
127  m_frontierKey(""),
128  m_lastRun(0), // for the stat
129  m_lastLumi(0), // for the stat
131  m_doDump(iConfig.getUntrackedParameter<bool>("DumpStat", false)) {
132  if (iConfig.getUntrackedParameter<bool>("RefreshAlways", false)) {
134  }
135  if (iConfig.getUntrackedParameter<bool>("RefreshOpenIOVs", false)) {
137  }
138  if (iConfig.getUntrackedParameter<bool>("RefreshEachRun", false)) {
140  }
141  if (iConfig.getUntrackedParameter<bool>("ReconnectEachRun", false)) {
143  }
144 
145  Stats s = {0, 0, 0, 0, 0, 0, 0, 0};
146  m_stats = s;
147 
148  /*parameter set parsing
149  */
151  if (iConfig.exists("globaltag")) {
152  globaltag = iConfig.getParameter<std::string>("globaltag");
153  // the global tag _requires_ a connection string
154  m_connectionString = iConfig.getParameter<std::string>("connect");
155 
156  if (!globaltag.empty()) {
158  if (siteLocalConfig.isAvailable()) {
159  if (siteLocalConfig->useLocalConnectString()) {
160  std::string const& localConnectPrefix = siteLocalConfig->localConnectPrefix();
161  std::string const& localConnectSuffix = siteLocalConfig->localConnectSuffix();
162  m_connectionString = localConnectPrefix + globaltag + localConnectSuffix;
163  }
164  }
165  }
166  } else if (iConfig.exists("connect")) // default connection string
167  m_connectionString = iConfig.getParameter<std::string>("connect");
168 
169  // frontier key
170  m_frontierKey = iConfig.getUntrackedParameter<std::string>("frontierKey", "");
171 
172  // snapshot
173  boost::posix_time::ptime snapshotTime;
174  if (iConfig.exists("snapshotTime")) {
175  std::string snapshotTimeString = iConfig.getParameter<std::string>("snapshotTime");
176  if (!snapshotTimeString.empty())
177  snapshotTime = boost::posix_time::time_from_string(snapshotTimeString);
178  }
179 
180  // connection configuration
181  if (iConfig.exists("DBParameters")) {
182  edm::ParameterSet connectionPset = iConfig.getParameter<edm::ParameterSet>("DBParameters");
183  m_connection.setParameters(connectionPset);
184  }
186 
187  // load specific record/tag info - it will overwrite the global tag ( if any )
188  std::map<std::string, cond::GTEntry_t> replacements;
189  std::map<std::string, boost::posix_time::ptime> specialSnapshots;
190  if (iConfig.exists("toGet")) {
191  typedef std::vector<edm::ParameterSet> Parameters;
192  Parameters toGet = iConfig.getParameter<Parameters>("toGet");
193  for (Parameters::iterator itToGet = toGet.begin(); itToGet != toGet.end(); ++itToGet) {
194  std::string recordname = itToGet->getParameter<std::string>("record");
195  if (recordname.empty())
196  throw cond::Exception("ESSource: The record name has not been provided in a \"toGet\" entry.");
197  std::string labelname = itToGet->getUntrackedParameter<std::string>("label", "");
198  std::string pfn("");
199  if (m_connectionString.empty() || itToGet->exists("connect"))
200  pfn = itToGet->getParameter<std::string>("connect");
201  std::string tag("");
202  std::string fqTag("");
203  if (itToGet->exists("tag")) {
204  tag = itToGet->getParameter<std::string>("tag");
206  }
207  boost::posix_time::ptime tagSnapshotTime =
208  boost::posix_time::time_from_string(std::string(cond::time::MAX_TIMESTAMP));
209  if (itToGet->exists("snapshotTime"))
210  tagSnapshotTime = boost::posix_time::time_from_string(itToGet->getParameter<std::string>("snapshotTime"));
211  if (itToGet->exists("refreshTime")) {
212  cond::Time_t refreshTime = itToGet->getParameter<unsigned long long>("refreshTime");
213  m_refreshTimeForRecord.insert(std::make_pair(recordname, std::make_pair(refreshTime, true)));
214  }
215 
216  std::string recordLabelKey = joinRecordAndLabel(recordname, labelname);
217  replacements.insert(
218  std::make_pair(recordLabelKey, cond::GTEntry_t(std::make_tuple(recordname, labelname, fqTag))));
219  specialSnapshots.insert(std::make_pair(recordLabelKey, tagSnapshotTime));
220  }
221  }
222 
223  // get the global tag, merge with "replacement" store in "tagCollection"
224  std::vector<std::string> globaltagList;
225  std::vector<std::string> connectList;
226  std::vector<std::string> pfnPrefixList;
227  std::vector<std::string> pfnPostfixList;
228  if (!globaltag.empty()) {
229  std::string pfnPrefix(iConfig.getUntrackedParameter<std::string>("pfnPrefix", ""));
230  std::string pfnPostfix(iConfig.getUntrackedParameter<std::string>("pfnPostfix", ""));
231  boost::split(globaltagList, globaltag, boost::is_any_of("|"), boost::token_compress_off);
232  fillList(m_connectionString, connectList, globaltagList.size(), "connection");
233  fillList(pfnPrefix, pfnPrefixList, globaltagList.size(), "pfnPrefix");
234  fillList(pfnPostfix, pfnPostfixList, globaltagList.size(), "pfnPostfix");
235  }
236 
237  cond::GTMetadata_t gtMetadata;
238  fillTagCollectionFromDB(connectList, pfnPrefixList, pfnPostfixList, globaltagList, replacements, gtMetadata);
239  // if no job specific setting has been found, use the GT timestamp
240  if (snapshotTime.is_not_a_date_time())
241  snapshotTime = gtMetadata.snapshotTime;
242 
243  TagCollection::iterator it;
244  TagCollection::iterator itBeg = m_tagCollection.begin();
245  TagCollection::iterator itEnd = m_tagCollection.end();
246 
247  std::map<std::string, cond::persistency::Session> sessions;
248 
249  /* load ProductResolver Plugin (it is strongly typed due to EventSetup ideosyncrasis)
250  * construct proxy
251  * contrary to EventSetup the "object-name" is not used as identifier: multiple entries in a record are
252  * dinstinguished only by their label...
253  * done in two step: first create ResolverWrapper loading ALL required dictionaries
254  * this will allow to initialize POOL in one go for each "database"
255  * The real initialization of the Data-Resolvers is done in the second loop
256  */
257  std::vector<std::unique_ptr<cond::ProductResolverWrapperBase>> resolverWrappers(m_tagCollection.size());
258  size_t ipb = 0;
259  for (it = itBeg; it != itEnd; ++it) {
260  size_t ind = ipb++;
261  resolverWrappers[ind] = std::unique_ptr<cond::ProductResolverWrapperBase>{
262  cond::ProductResolverFactory::get()->tryToCreate(buildName(it->second.recordName()))};
263  if (!resolverWrappers[ind].get()) {
264  edm::LogWarning("CondDBESSource") << "Plugin for Record " << it->second.recordName() << " has not been found.";
265  }
266  }
267 
268  // now all required libraries have been loaded
269  // init sessions and DataResolvers
270  ipb = 0;
271  for (it = itBeg; it != itEnd; ++it) {
273  std::string tag = it->second.tagName();
274  std::pair<std::string, std::string> tagParams = cond::persistency::parseTag(it->second.tagName());
275  if (!tagParams.second.empty()) {
276  connStr = tagParams.second;
277  tag = tagParams.first;
278  }
279  std::map<std::string, cond::persistency::Session>::iterator p = sessions.find(connStr);
281  if (p == sessions.end()) {
283  std::tuple<std::string, std::string, std::string> connPars =
285  std::string dbService = std::get<1>(connPars);
286  std::string dbAccount = std::get<2>(connPars);
287  if ((dbService == "cms_orcon_prod" || dbService == "cms_orcon_adg") && dbAccount != "CMS_CONDITIONS")
288  edm::LogWarning("CondDBESSource")
289  << "[WARNING] You are reading tag \"" << tag << "\" from V1 account \"" << connStr
290  << "\". The concerned Conditions might be out of date." << std::endl;
291  //open db get tag info (i.e. the IOV token...)
292  nsess = m_connection.createReadOnlySession(connStr, "");
293  sessions.insert(std::make_pair(connStr, nsess));
294  } else
295  nsess = (*p).second;
296 
297  // ownership...
298  ResolverP resolver(std::move(resolverWrappers[ipb++]));
299  // instert in the map
300  if (resolver.get()) {
301  m_resolvers.insert(std::make_pair(it->second.recordName(), resolver));
302  // initialize
303  boost::posix_time::ptime tagSnapshotTime = snapshotTime;
304  auto tagSnapshotIter = specialSnapshots.find(it->first);
305  if (tagSnapshotIter != specialSnapshots.end())
306  tagSnapshotTime = tagSnapshotIter->second;
307  // finally, if the snapshot is set to infinity, reset the snapshot to null, to take the full iov set...
308  if (tagSnapshotTime == boost::posix_time::time_from_string(std::string(cond::time::MAX_TIMESTAMP)))
309  tagSnapshotTime = boost::posix_time::ptime();
310 
311  resolver->lateInit(nsess, tag, tagSnapshotTime, it->second.recordLabel(), connStr, &m_queue, &m_mutex);
312  }
313  }
314 
315  // one loaded expose all other tags to the Proxy!
316  CondGetterFromESSource visitor(m_resolvers);
317  ResolverMap::iterator b = m_resolvers.begin();
318  ResolverMap::iterator e = m_resolvers.end();
319  for (; b != e; b++) {
320  (*b).second->proxy(0)->loadMore(visitor);
321 
323  EventSetupRecordKey recordKey = b->second->recordKey();
324  if (recordKey.type() != EventSetupRecordKey::TypeTag()) {
325  findingRecordWithKey(recordKey);
326  usingRecordWithKey(recordKey);
327  } else {
328  edm::LogWarning("CondDBESSource") << "Failed to load key for record " << b->first
329  << ". No data from this record will be available.";
330  }
331  }
332 
333  m_stats.nData = m_resolvers.size();
334 }
std::map< std::string, std::pair< cond::Time_t, bool > > m_refreshTimeForRecord
ResolverMap m_resolvers
std::tuple< std::string, std::string, std::string > parseConnectionString(const std::string &connectionString)
Definition: Utils.h:95
std::mutex m_mutex
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
Base exception class for the object to relational access.
Definition: Exception.h:11
std::shared_ptr< cond::ProductResolverWrapperBase > ResolverP
void usingRecordWithKey(const EventSetupRecordKey &key)
bool exists(std::string const &parameterName) const
checks if a parameter exists
boost::posix_time::ptime snapshotTime
Definition: Types.h:106
static constexpr const char *const MAX_TIMESTAMP
Definition: Time.h:26
RefreshPolicy m_policy
void setParameters(const edm::ParameterSet &connectionPset)
T getUntrackedParameter(std::string const &, T const &) const
edm::SerialTaskQueue m_queue
unsigned long long Time_t
Definition: Time.h:14
std::string convertoToOracleConnection(const std::string &input)
Definition: Utils.h:120
std::pair< std::string, std::string > parseTag(const std::string &tag)
Definition: GTProxy.cc:14
cond::persistency::ConnectionPool m_connection
std::string fullyQualifiedTag(const std::string &tag, const std::string &connectionString)
Definition: GTProxy.cc:8
void fillList(const std::string &pfn, std::vector< std::string > &pfnList, const unsigned int listSize, const std::string &type)
TagCollection m_tagCollection
double b
Definition: hdecay.h:120
std::string m_jsonDumpFilename
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)
std::vector< AlignmentParameters * > Parameters
Definition: Utilities.h:32
heterocontainer::HCTypeTag TypeTag
std::string m_connectionString
unsigned int m_lastRun
Session createReadOnlySession(const std::string &connectionString, const std::string &transactionId)
std::string m_frontierKey
#define get
Log< level::Warning, false > LogWarning
if(threadIdxLocalY==0 &&threadIdxLocalX==0)
unsigned int m_lastLumi
def move(src, dest)
Definition: eostools.py:511
void findingRecordWithKey(const eventsetup::EventSetupRecordKey &)

◆ ~CondDBESSource()

CondDBESSource::~CondDBESSource ( )
override

Definition at line 371 of file CondDBESSource.cc.

References b, gather_cfg::cout, getInfo::dumpInfo(), MillePedeFileConverter_cfg::e, mps_splice::entry, m_doDump, m_jsonDumpFilename, m_resolvers, m_stats, printStatistics(), saveJsonToFile(), and AlCaHLTBitMon_QueryRunRegistry::string.

371  {
372  //dump info FIXME: find a more suitable place...
373  if (m_doDump) {
374  //Output CondDBESSource Statistics to the console
376 
377  ResolverMap::iterator b = m_resolvers.begin();
378  ResolverMap::iterator e = m_resolvers.end();
379  for (; b != e; b++) {
380  dumpInfo(std::cout, (*b).first, *(*b).second);
381  std::cout << "\n" << std::endl;
382  }
383  }
384  //if filename was provided for iConfig by process.GlobalTag.JsonDumpFileName =cms.untracked.string("CondDBESSource.json")
385  if (!m_jsonDumpFilename.empty()) {
386  json jsonData;
387 
388  for (const auto& entry : m_resolvers) {
389  std::string recName = entry.first;
390  const auto& proxy = *entry.second;
391  dumpInfoJson(jsonData, recName, proxy);
392  }
393  //Save the dump data to a file in JSON format
395  }
396  // FIXME
397  // We shall eventually close transaction and session...
398 }
ResolverMap m_resolvers
void saveJsonToFile(const json &jsonData, const std::string &filename)
void printStatistics(const Stats &stats) const
nlohmann::json json
def dumpInfo(run)
Definition: getInfo.py:88
double b
Definition: hdecay.h:120
std::string m_jsonDumpFilename

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 336 of file CondDBESSource.cc.

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

Referenced by CondDBESSource().

339  {
340  boost::split(listToFill, stringList, boost::is_any_of("|"), boost::token_compress_off);
341  // If it is one clone it for each GT
342  if (listToFill.size() == 1) {
343  for (unsigned int i = 1; i < listSize; ++i) {
344  listToFill.push_back(stringList);
345  }
346  }
347  // else if they don't match the number of GTs throw an exception
348  else if (listSize != listToFill.size()) {
349  throw cond::Exception(
350  std::string("ESSource: number of global tag components does not match number of " + type + " strings"));
351  }
352 }
persistency::Exception Exception
Definition: Exception.h:25

◆ 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 688 of file CondDBESSource.cc.

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

Referenced by CondDBESSource().

693  {
694  std::set<cond::GTEntry_t> tagcoll;
695 
696  auto connectionString = connectionStringList.begin();
697  auto prefix = prefixList.begin();
698  auto postfix = postfixList.begin();
699  for (auto roottag = roottagList.begin(); roottag != roottagList.end();
700  ++roottag, ++connectionString, ++prefix, ++postfix) {
701  fillTagCollectionFromGT(*connectionString, *prefix, *postfix, *roottag, tagcoll, gtMetadata);
702  }
703 
704  std::set<cond::GTEntry_t>::iterator tagCollIter;
705  std::set<cond::GTEntry_t>::iterator tagCollBegin = tagcoll.begin();
706  std::set<cond::GTEntry_t>::iterator tagCollEnd = tagcoll.end();
707 
708  // FIXME the logic is a bit perverse: can be surely linearized (at least simplified!) ....
709  for (tagCollIter = tagCollBegin; tagCollIter != tagCollEnd; ++tagCollIter) {
710  std::string recordLabelKey = joinRecordAndLabel(tagCollIter->recordName(), tagCollIter->recordLabel());
711  std::map<std::string, cond::GTEntry_t>::iterator fid = replacement.find(recordLabelKey);
712  if (fid != replacement.end()) {
713  if (!fid->second.tagName().empty()) {
714  cond::GTEntry_t tagMetadata(
715  std::make_tuple(tagCollIter->recordName(), tagCollIter->recordLabel(), fid->second.tagName()));
716  m_tagCollection.insert(std::make_pair(recordLabelKey, tagMetadata));
717  edm::LogInfo("CondDBESSource") << "Replacing tag \"" << tagCollIter->tagName() << "\" for record \""
718  << tagMetadata.recordName() << "\" and label \"" << tagMetadata.recordLabel()
719  << "\" with tag " << tagMetadata.tagName()
720  << "\"; from CondDBESSource::fillTagCollectionFromDB";
721  } else {
722  m_tagCollection.insert(std::make_pair(recordLabelKey, *tagCollIter));
723  }
724  replacement.erase(fid);
725  } else {
726  m_tagCollection.insert(std::make_pair(recordLabelKey, *tagCollIter));
727  }
728  }
729  std::map<std::string, cond::GTEntry_t>::iterator replacementIter;
730  std::map<std::string, cond::GTEntry_t>::iterator replacementBegin = replacement.begin();
731  std::map<std::string, cond::GTEntry_t>::iterator replacementEnd = replacement.end();
732  for (replacementIter = replacementBegin; replacementIter != replacementEnd; ++replacementIter) {
733  if (replacementIter->second.tagName().empty()) {
734  std::stringstream msg;
735  msg << "ESSource: no tag provided for record " << replacementIter->second.recordName();
736  if (!replacementIter->second.recordLabel().empty())
737  msg << " and label " << replacementIter->second.recordLabel();
738  throw cond::Exception(msg.str());
739  }
740  m_tagCollection.insert(*replacementIter);
741  }
742 }
persistency::Exception Exception
Definition: Exception.h:25
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)
Log< level::Info, false > LogInfo
TagCollection m_tagCollection
tuple msg
Definition: mps_check.py:286

◆ 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 654 of file CondDBESSource.cc.

References cond::persistency::Transaction::commit(), l1RCTOmdsFedVectorProducer_cfi::connectionString, cond::persistency::ConnectionPool::createSession(), m_connection, cond::persistency::parseConnectionString(), nano_postproc::postfix, 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().

659  {
660  if (!roottag.empty()) {
661  if (connectionString.empty())
662  throw cond::Exception(std::string("ESSource: requested global tag ") + roottag +
663  std::string(" but not connection string given"));
664  std::tuple<std::string, std::string, std::string> connPars =
666  if (std::get<2>(connPars) == "CMS_COND_31X_GLOBALTAG") {
667  edm::LogWarning("CondDBESSource")
668  << "[WARNING] You are reading Global Tag \"" << roottag
669  << "\" from V1 account \"CMS_COND_31X_GLOBALTAG\". The concerned Conditions might be out of date."
670  << std::endl;
671  } else if (roottag.rfind("::All") != std::string::npos && std::get<2>(connPars) == "CMS_CONDITIONS") {
672  edm::LogWarning("CondDBESSource") << "[WARNING] You are trying to read Global Tag \"" << roottag
673  << "\" - postfix \"::All\" should not be used for V2." << std::endl;
674  }
676  session.transaction().start(true);
677  cond::persistency::GTProxy gtp = session.readGlobalTag(roottag, prefix, postfix);
678  gtMetadata.snapshotTime = gtp.snapshotTime();
679  for (const auto& gte : gtp) {
680  tagcoll.insert(gte);
681  }
682  session.transaction().commit();
683  }
684 }
std::tuple< std::string, std::string, std::string > parseConnectionString(const std::string &connectionString)
Definition: Utils.h:95
Base exception class for the object to relational access.
Definition: Exception.h:11
void start(bool readOnly=true)
Definition: Session.cc:18
boost::posix_time::ptime snapshotTime
Definition: Types.h:106
Transaction & transaction()
Definition: Session.cc:52
cond::persistency::ConnectionPool m_connection
Session createSession(const std::string &connectionString, bool writeCapable=false)
boost::posix_time::ptime snapshotTime() const
Definition: GTProxy.cc:135
Log< level::Warning, false > LogWarning
GTProxy readGlobalTag(const std::string &name)
Definition: Session.cc:163

◆ initConcurrentIOVs()

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

Reimplemented from edm::eventsetup::ESProductResolverProvider.

Definition at line 642 of file CondDBESSource.cc.

References b, MillePedeFileConverter_cfg::e, submitPVResolutionJobs::key, m_resolvers, AlCaHLTBitMon_ParallelJobs::p, and AlCaHLTBitMon_QueryRunRegistry::string.

642  {
643  std::string recordname = key.name();
644  ResolverMap::const_iterator b = m_resolvers.lower_bound(recordname);
645  ResolverMap::const_iterator e = m_resolvers.upper_bound(recordname);
646  for (ResolverMap::const_iterator p = b; p != e; ++p) {
647  if (p->second) {
648  p->second->initConcurrentIOVs(nConcurrentIOVs);
649  }
650  }
651 }
ResolverMap m_resolvers
key
prepare the HTCondor submission files and eventually submit them
double b
Definition: hdecay.h:120

◆ isConcurrentFinder()

bool CondDBESSource::isConcurrentFinder ( ) const
inlineoverrideprotectedvirtual

Reimplemented from edm::EventSetupRecordIntervalFinder.

Definition at line 108 of file CondDBESSource.h.

108 { return true; }

◆ printStatistics()

void CondDBESSource::printStatistics ( const Stats stats) const
private

Definition at line 354 of file CondDBESSource.cc.

References gather_cfg::cout, and dqmMemoryStats::stats.

Referenced by ~CondDBESSource().

354  {
355  std::cout << "CondDBESSource Statistics\n"
356  << "DataProxy " << stats.nData << " setInterval " << stats.nSet << " Runs " << stats.nRun << " Lumis "
357  << stats.nLumi << " Refresh " << stats.nRefresh << " Actual Refresh " << stats.nActualRefresh
358  << " Reconnect " << stats.nReconnect << " Actual Reconnect " << stats.nActualReconnect << std::endl;
359 }

◆ registerResolvers()

edm::eventsetup::ESProductResolverProvider::KeyedResolversVector CondDBESSource::registerResolvers ( const EventSetupRecordKey iRecordKey,
unsigned int  iovIndex 
)
overrideprotectedvirtual

Implements edm::eventsetup::ESProductResolverProvider.

Definition at line 618 of file CondDBESSource.cc.

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

619  {
620  KeyedResolversVector keyedResolversVector;
621 
622  std::string recordname = iRecordKey.name();
623 
624  ResolverMap::const_iterator b = m_resolvers.lower_bound(recordname);
625  ResolverMap::const_iterator e = m_resolvers.upper_bound(recordname);
626  if (b == e) {
627  edm::LogInfo("CondDBESSource") << "No ProductResolver (Pluging) found for record \"" << recordname
628  << "\"; from CondDBESSource::registerResolvers";
629  return keyedResolversVector;
630  }
631 
632  for (ResolverMap::const_iterator p = b; p != e; ++p) {
633  if (nullptr != (*p).second.get()) {
634  edm::eventsetup::TypeTag type = (*p).second->type();
635  DataKey key(type, edm::eventsetup::IdTags((*p).second->label().c_str()));
636  keyedResolversVector.emplace_back(key, (*p).second->esResolver(iovIndex));
637  }
638  }
639  return keyedResolversVector;
640 }
ResolverMap m_resolvers
key
prepare the HTCondor submission files and eventually submit them
Log< level::Info, false > LogInfo
double b
Definition: hdecay.h:120
std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >> KeyedResolversVector

◆ setIntervalFor()

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

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 404 of file CondDBESSource.cc.

References edm::IOVSyncValue::beginOfTime(), cond::persistency::ConnectionPool::createReadOnlySession(), cond::TimeTypeSpecs::endValue, edm::IOVSyncValue::eventID(), edm::ValidityInterval::first(), cond::time::fromIOVSyncValue(), ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets::if(), edm::ValidityInterval::invalidInterval(), edm::IOVSyncValue::invalidIOVSyncValue(), edm::ValidityInterval::last(), cond::time::limitedIOVSyncValue(), edm::IOVSyncValue::luminosityBlockNumber(), m_connection, m_connectionString, m_frontierKey, m_lastLumi, m_lastRecordRuns, m_lastRun, m_mutex, m_policy, m_refreshTimeForRecord, m_resolvers, m_sessionPool, m_sessionPoolForLumiConditions, m_stats, m_tagCollection, genParticles_cff::map, SiStripPI::max, cond::time::MAX_VAL(), SiStripPI::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, cond::time::tillTimeForIOV(), edm::IOVSyncValue::time(), cond::TIMELIMIT(), AlCaHarvesting_cff::timetype, cond::timeTypeNames(), cond::timeTypeSpecs, to_string(), cond::time::toIOVSyncValue(), cond::time::transactionIdForLumiTime(), and edm::Timestamp::value().

406  {
407  std::string recordname = iKey.name();
408 
409  edm::LogInfo("CondDBESSource") << "Getting data for record \"" << recordname
410  << "\" to be consumed on Run: " << iTime.eventID().run()
411  << " - Lumiblock:" << iTime.luminosityBlockNumber()
412  << " - Timestamp: " << iTime.time().value() << "; from CondDBESSource::setIntervalFor";
413 
414  std::lock_guard<std::mutex> guard(m_mutex);
415  m_stats.nSet++;
416 
417  if (iTime.eventID().run() != m_lastRun) {
418  m_lastRun = iTime.eventID().run();
419  m_stats.nRun++;
420  }
421  if (iTime.luminosityBlockNumber() != m_lastLumi) {
423  m_stats.nLumi++;
424  }
425 
426  bool doRefresh = false;
427  cond::Time_t defaultIovSize = cond::time::MAX_VAL;
428  bool refreshThisRecord = false;
429  bool reconnectThisRecord = false;
430 
431  auto iR = m_refreshTimeForRecord.find(recordname);
432  refreshThisRecord = iR != m_refreshTimeForRecord.end();
433  if (refreshThisRecord) {
434  defaultIovSize = iR->second.first;
435  reconnectThisRecord = iR->second.second;
436  iR->second.second = false;
437  }
438 
440  // find out the last run number for the proxy of the specified record
441  std::map<std::string, unsigned int>::iterator iRec = m_lastRecordRuns.find(recordname);
442  if (iRec != m_lastRecordRuns.end()) {
443  cond::Time_t lastRecordRun = iRec->second;
444  if (lastRecordRun != m_lastRun) {
445  // a refresh is required!
446  doRefresh = true;
447  iRec->second = m_lastRun;
448  edm::LogInfo("CondDBESSource") << "Preparing refresh for record \"" << recordname
449  << "\" since there has been a transition from run/lumi " << lastRecordRun
450  << " to run/lumi " << m_lastRun << "; from CondDBESSource::setIntervalFor";
451  }
452  } else {
453  doRefresh = true;
454  m_lastRecordRuns.insert(std::make_pair(recordname, m_lastRun));
455  edm::LogInfo("CondDBESSource") << "Preparing refresh for record \"" << recordname << "\" for " << iTime.eventID()
456  << ", timestamp: " << iTime.time().value()
457  << "; from CondDBESSource::setIntervalFor";
458  }
459  if (!doRefresh)
460  edm::LogInfo("CondDBESSource") << "Though enabled, refresh not needed for record \"" << recordname << "\" for "
461  << iTime.eventID() << ", timestamp: " << iTime.time().value()
462  << "; from CondDBESSource::setIntervalFor";
463  } else if (m_policy == REFRESH_ALWAYS || m_policy == REFRESH_OPEN_IOVS) {
464  doRefresh = true;
465  edm::LogInfo("CondDBESSource") << "Forcing refresh for record \"" << recordname << "\" for " << iTime.eventID()
466  << ", timestamp: " << iTime.time().value()
467  << "; from CondDBESSource::setIntervalFor";
468  }
469 
471 
472  // compute the smallest interval (assume all objects have the same timetype....)
473  cond::ValidityInterval recordValidity(1, cond::TIMELIMIT);
474  cond::TimeType timetype = cond::TimeType::invalid;
475  bool userTime = true;
476 
477  //FIXME use equal_range
478  ResolverMap::const_iterator pmBegin = m_resolvers.lower_bound(recordname);
479  ResolverMap::const_iterator pmEnd = m_resolvers.upper_bound(recordname);
480  if (pmBegin == pmEnd) {
481  edm::LogInfo("CondDBESSource") << "No ProductResolver (Pluging) found for record \"" << recordname
482  << "\"; from CondDBESSource::setIntervalFor";
483  return;
484  }
485 
486  for (ResolverMap::const_iterator pmIter = pmBegin; pmIter != pmEnd; ++pmIter) {
487  edm::LogInfo("CondDBESSource") << "Processing record \"" << recordname << "\" and label \""
488  << pmIter->second->label() << "\" for " << iTime.eventID()
489  << ", timestamp: " << iTime.time().value()
490  << "; from CondDBESSource::setIntervalFor";
491 
492  timetype = (*pmIter).second->timeType();
493 
495  userTime = (0 == abtime);
496 
497  if (userTime)
498  return; // oInterval invalid to avoid that make is called...
499 
500  if (doRefresh || refreshThisRecord) {
501  std::string recKey = joinRecordAndLabel(recordname, pmIter->second->label());
502  TagCollection::const_iterator tcIter = m_tagCollection.find(recKey);
503  if (tcIter == m_tagCollection.end()) {
504  edm::LogInfo("CondDBESSource") << "No Tag found for record \"" << recordname << "\" and label \""
505  << pmIter->second->label() << "\"; from CondDBESSource::setIntervalFor";
506  return;
507  }
508 
509  // first reconnect if required
510  if (m_policy == RECONNECT_EACH_RUN || reconnectThisRecord) {
511  edm::LogInfo("CondDBESSource")
512  << "Checking if the session must be closed and re-opened for getting correct conditions"
513  << "; from CondDBESSource::setIntervalFor";
514  std::string transId;
515  if (!reconnectThisRecord) {
516  transId = std::to_string(abtime);
517  } else {
518  transId = cond::time::transactionIdForLumiTime(abtime, defaultIovSize, m_frontierKey);
519  }
521  std::pair<std::string, std::string> tagParams = cond::persistency::parseTag(tcIter->second.tagName());
522  if (!tagParams.second.empty())
523  connStr = tagParams.second;
524  std::map<std::string, std::pair<cond::persistency::Session, std::string>>* sessionPool = &m_sessionPool;
525  if (refreshThisRecord) {
526  sessionPool = &m_sessionPoolForLumiConditions;
527  }
528  auto iSess = sessionPool->find(connStr);
529  bool reopen = false;
530  if (iSess != sessionPool->end()) {
531  if (iSess->second.second != transId) {
532  // the available session is open for a different run: reopen
533  reopen = true;
534  iSess->second.second = transId;
535  }
536  } else {
537  // no available session: probably first run analysed...
538  iSess =
539  sessionPool->insert(std::make_pair(connStr, std::make_pair(cond::persistency::Session(), transId))).first;
540  reopen = true;
541  }
542  if (reopen) {
543  iSess->second.first = m_connection.createReadOnlySession(connStr, transId);
544  edm::LogInfo("CondDBESSource") << "Re-opening the session with connection string " << connStr
545  << " and new transaction Id " << transId
546  << "; from CondDBESSource::setIntervalFor";
547  }
548 
549  edm::LogInfo("CondDBESSource") << "Reconnecting to \"" << connStr << "\" for getting new payload for record \""
550  << recordname << "\" and label \"" << pmIter->second->label()
551  << "\" from IOV tag \"" << tcIter->second.tagName() << "\" to be consumed by "
552  << iTime.eventID() << ", timestamp: " << iTime.time().value()
553  << "; from CondDBESSource::setIntervalFor";
554  pmIter->second->session() = iSess->second.first;
555  pmIter->second->reload();
557  } else {
558  edm::LogInfo("CondDBESSource") << "Refreshing IOV sequence labeled by tag \"" << tcIter->second.tagName()
559  << "\" for getting new payload for record \"" << recordname << "\" and label \""
560  << pmIter->second->label() << "\" to be consumed by " << iTime.eventID()
561  << ", timestamp: " << iTime.time().value()
562  << "; from CondDBESSource::setIntervalFor";
563  pmIter->second->reload();
564  m_stats.nRefresh++;
565  }
566  }
567 
568  //query the IOVSequence
569  cond::ValidityInterval validity = (*pmIter).second->setIntervalFor(abtime);
570 
571  edm::LogInfo("CondDBESSource") << "Validity coming from IOV sequence for record \"" << recordname
572  << "\" and label \"" << pmIter->second->label() << "\": (" << validity.first << ", "
573  << validity.second << ") for time (type: " << cond::timeTypeNames(timetype) << ") "
574  << abtime << "; from CondDBESSource::setIntervalFor";
575 
576  recordValidity.first = std::max(recordValidity.first, validity.first);
577  recordValidity.second = std::min(recordValidity.second, validity.second);
578  if (refreshThisRecord && recordValidity.second == cond::TIMELIMIT) {
579  iR->second.second = true;
580  if (defaultIovSize)
581  recordValidity.second = cond::time::tillTimeForIOV(abtime, defaultIovSize, timetype);
582  else {
583  recordValidity.second = 0;
584  }
585  }
586  }
587 
588  if (m_policy == REFRESH_OPEN_IOVS) {
589  doRefresh = (recordValidity.second == cond::timeTypeSpecs[timetype].endValue);
590  edm::LogInfo("CondDBESSource") << "Validity for record \"" << recordname
591  << "\" and the corresponding label(s) coming from Condition DB: ("
592  << recordValidity.first << ", " << recordValidity.first
593  << ") as the last IOV element in the IOV sequence is infinity"
594  << "; from CondDBESSource::setIntervalFor";
595  }
596 
597  // to force refresh we set end-value to the minimum such an IOV can extend to: current run or lumiblock
598  if ((!userTime) && recordValidity.second != 0) {
599  edm::IOVSyncValue start = cond::time::toIOVSyncValue(recordValidity.first, timetype, true);
601  : cond::time::toIOVSyncValue(recordValidity.second, timetype, false);
602 
605  }
606  oInterval = edm::ValidityInterval(start, stop);
607  }
608 
609  edm::LogInfo("CondDBESSource") << "Setting validity for record \"" << recordname
610  << "\" and corresponding label(s): starting at " << oInterval.first().eventID()
611  << ", timestamp: " << oInterval.first().time().value() << ", ending at "
612  << oInterval.last().eventID() << ", timestamp: " << oInterval.last().time().value()
613  << ", for " << iTime.eventID() << ", timestamp: " << iTime.time().value()
614  << "; from CondDBESSource::setIntervalFor";
615 }
const TimeTypeSpecs timeTypeSpecs[]
Definition: Time.cc:16
Definition: start.py:1
const IOVSyncValue & last() const
std::map< std::string, std::pair< cond::Time_t, bool > > m_refreshTimeForRecord
ResolverMap m_resolvers
std::mutex m_mutex
LuminosityBlockNumber_t luminosityBlockNumber() const
Definition: IOVSyncValue.h:41
const IOVSyncValue & first() const
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:17
std::map< std::string, std::pair< cond::persistency::Session, std::string > > m_sessionPool
RefreshPolicy m_policy
std::string transactionIdForLumiTime(Time_t time, unsigned int iovSize, const std::string &secretKey)
Definition: Time.cc:150
static std::string to_string(const XMLCh *ch)
TimeType
Definition: Time.h:19
Time_t tillTimeForIOV(Time_t since, unsigned int iovSize, TimeType timeType)
Definition: Time.cc:54
U second(std::pair< T, U > const &p)
Time_t fromIOVSyncValue(edm::IOVSyncValue const &time, TimeType timetype)
Definition: Time.cc:97
std::string const & timeTypeNames(int)
Definition: Time.cc:11
unsigned long long Time_t
Definition: Time.h:14
std::pair< std::string, std::string > parseTag(const std::string &tag)
Definition: GTProxy.cc:14
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88
cond::persistency::ConnectionPool m_connection
edm::IOVSyncValue toIOVSyncValue(cond::Time_t time, TimeType timetype, bool startOrStop)
Definition: Time.cc:79
std::map< std::string, std::pair< cond::persistency::Session, std::string > > m_sessionPoolForLumiConditions
Log< level::Info, false > LogInfo
RunNumber_t run() const
Definition: EventID.h:38
TimeValue_t value() const
Definition: Timestamp.h:38
TagCollection m_tagCollection
const Time_t TIMELIMIT(std::numeric_limits< Time_t >::max())
const EventID & eventID() const
Definition: IOVSyncValue.h:40
std::string m_connectionString
const Timestamp & time() const
Definition: IOVSyncValue.h:42
unsigned int m_lastRun
static const ValidityInterval & invalidInterval()
Session createReadOnlySession(const std::string &connectionString, const std::string &transactionId)
std::string m_frontierKey
edm::IOVSyncValue limitedIOVSyncValue(Time_t time, TimeType timetype)
Definition: Time.cc:113
Time_t endValue
Definition: Time.h:42
std::map< std::string, unsigned int > m_lastRecordRuns
if(threadIdxLocalY==0 &&threadIdxLocalX==0)
unsigned int m_lastLumi
const Time_t MAX_VAL(std::numeric_limits< Time_t >::max())
static const IOVSyncValue & invalidIOVSyncValue()
Definition: IOVSyncValue.cc:78

Member Data Documentation

◆ m_connection

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

Definition at line 113 of file CondDBESSource.h.

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

◆ m_connectionString

std::string CondDBESSource::m_connectionString
private

Definition at line 114 of file CondDBESSource.h.

Referenced by CondDBESSource(), and setIntervalFor().

◆ m_doDump

bool CondDBESSource::m_doDump
private

Definition at line 148 of file CondDBESSource.h.

Referenced by ~CondDBESSource().

◆ m_frontierKey

std::string CondDBESSource::m_frontierKey
private

Definition at line 115 of file CondDBESSource.h.

Referenced by CondDBESSource(), and setIntervalFor().

◆ m_jsonDumpFilename

std::string CondDBESSource::m_jsonDumpFilename

Definition at line 96 of file CondDBESSource.h.

Referenced by ~CondDBESSource().

◆ m_lastLumi

unsigned int CondDBESSource::m_lastLumi
private

Definition at line 145 of file CondDBESSource.h.

Referenced by setIntervalFor().

◆ m_lastRecordRuns

std::map<std::string, unsigned int> CondDBESSource::m_lastRecordRuns
private

Definition at line 126 of file CondDBESSource.h.

Referenced by setIntervalFor().

◆ m_lastRun

unsigned int CondDBESSource::m_lastRun
private

Definition at line 144 of file CondDBESSource.h.

Referenced by setIntervalFor().

◆ m_mutex

std::mutex CondDBESSource::m_mutex
private

Definition at line 129 of file CondDBESSource.h.

Referenced by CondDBESSource(), and setIntervalFor().

◆ m_policy

RefreshPolicy CondDBESSource::m_policy
private

Definition at line 146 of file CondDBESSource.h.

Referenced by CondDBESSource(), and setIntervalFor().

◆ m_queue

edm::SerialTaskQueue CondDBESSource::m_queue
private

Definition at line 128 of file CondDBESSource.h.

Referenced by CondDBESSource().

◆ m_refreshTimeForRecord

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

Definition at line 123 of file CondDBESSource.h.

Referenced by CondDBESSource(), and setIntervalFor().

◆ m_resolvers

ResolverMap CondDBESSource::m_resolvers
private

◆ m_sessionPool

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

Definition at line 124 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 125 of file CondDBESSource.h.

Referenced by setIntervalFor().

◆ m_stats

Stats CondDBESSource::m_stats
private

Definition at line 142 of file CondDBESSource.h.

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

◆ m_tagCollection

TagCollection CondDBESSource::m_tagCollection
private

Definition at line 122 of file CondDBESSource.h.

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