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(), edm::eventsetup::heterocontainer::HCTypeTag::findType(), 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 
324  if (recordKey.type() != EventSetupRecordKey::TypeTag()) {
325  findingRecordWithKey(recordKey);
326  usingRecordWithKey(recordKey);
327  }
328  }
329 
330  m_stats.nData = m_resolvers.size();
331 }
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 &)
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()

CondDBESSource::~CondDBESSource ( )
override

Definition at line 368 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.

368  {
369  //dump info FIXME: find a more suitable place...
370  if (m_doDump) {
371  //Output CondDBESSource Statistics to the console
373 
374  ResolverMap::iterator b = m_resolvers.begin();
375  ResolverMap::iterator e = m_resolvers.end();
376  for (; b != e; b++) {
377  dumpInfo(std::cout, (*b).first, *(*b).second);
378  std::cout << "\n" << std::endl;
379  }
380  }
381  //if filename was provided for iConfig by process.GlobalTag.JsonDumpFileName =cms.untracked.string("CondDBESSource.json")
382  if (!m_jsonDumpFilename.empty()) {
383  json jsonData;
384 
385  for (const auto& entry : m_resolvers) {
386  std::string recName = entry.first;
387  const auto& proxy = *entry.second;
388  dumpInfoJson(jsonData, recName, proxy);
389  }
390  //Save the dump data to a file in JSON format
392  }
393  // FIXME
394  // We shall eventually close transaction and session...
395 }
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 333 of file CondDBESSource.cc.

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

Referenced by CondDBESSource().

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

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

656  {
657  if (!roottag.empty()) {
658  if (connectionString.empty())
659  throw cond::Exception(std::string("ESSource: requested global tag ") + roottag +
660  std::string(" but not connection string given"));
661  std::tuple<std::string, std::string, std::string> connPars =
663  if (std::get<2>(connPars) == "CMS_COND_31X_GLOBALTAG") {
664  edm::LogWarning("CondDBESSource")
665  << "[WARNING] You are reading Global Tag \"" << roottag
666  << "\" from V1 account \"CMS_COND_31X_GLOBALTAG\". The concerned Conditions might be out of date."
667  << std::endl;
668  } else if (roottag.rfind("::All") != std::string::npos && std::get<2>(connPars) == "CMS_CONDITIONS") {
669  edm::LogWarning("CondDBESSource") << "[WARNING] You are trying to read Global Tag \"" << roottag
670  << "\" - postfix \"::All\" should not be used for V2." << std::endl;
671  }
673  session.transaction().start(true);
674  cond::persistency::GTProxy gtp = session.readGlobalTag(roottag, prefix, postfix);
675  gtMetadata.snapshotTime = gtp.snapshotTime();
676  for (const auto& gte : gtp) {
677  tagcoll.insert(gte);
678  }
679  session.transaction().commit();
680  }
681 }
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 639 of file CondDBESSource.cc.

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

639  {
640  std::string recordname = key.name();
641  ResolverMap::const_iterator b = m_resolvers.lower_bound(recordname);
642  ResolverMap::const_iterator e = m_resolvers.upper_bound(recordname);
643  for (ResolverMap::const_iterator p = b; p != e; ++p) {
644  if (p->second) {
645  p->second->initConcurrentIOVs(nConcurrentIOVs);
646  }
647  }
648 }
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 351 of file CondDBESSource.cc.

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

Referenced by ~CondDBESSource().

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

◆ registerResolvers()

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

Implements edm::eventsetup::ESProductResolverProvider.

Definition at line 615 of file CondDBESSource.cc.

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

616  {
617  KeyedResolversVector keyedResolversVector;
618 
619  std::string recordname = iRecordKey.name();
620 
621  ResolverMap::const_iterator b = m_resolvers.lower_bound(recordname);
622  ResolverMap::const_iterator e = m_resolvers.upper_bound(recordname);
623  if (b == e) {
624  edm::LogInfo("CondDBESSource") << "No ProductResolver (Pluging) found for record \"" << recordname
625  << "\"; from CondDBESSource::registerResolvers";
626  return keyedResolversVector;
627  }
628 
629  for (ResolverMap::const_iterator p = b; p != e; ++p) {
630  if (nullptr != (*p).second.get()) {
631  edm::eventsetup::TypeTag type = (*p).second->type();
632  DataKey key(type, edm::eventsetup::IdTags((*p).second->label().c_str()));
633  keyedResolversVector.emplace_back(key, (*p).second->esResolver(iovIndex));
634  }
635  }
636  return keyedResolversVector;
637 }
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 401 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().

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