CMS 3D CMS Logo

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

#include <RecoLuminosity/LumiProducer/src/DIPLumiProducer.cc>

Inheritance diagram for DIPLumiProducer:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

typedef std::shared_ptr< const DIPLumiDetailReturnDetailType
 
typedef std::shared_ptr< const DIPLumiSummaryReturnSummaryType
 

Public Member Functions

 DIPLumiProducer (const edm::ParameterSet &)
 
ReturnDetailType produceDetail (const DIPLuminosityRcd &)
 
ReturnSummaryType produceSummary (const DIPLuminosityRcd &)
 
 ~DIPLumiProducer () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
bool concurrentFinder () const
 
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
 EventSetupRecordIntervalFinder (const EventSetupRecordIntervalFinder &)=delete
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
bool nonconcurrentAndIOVNeedsUpdate (const eventsetup::EventSetupRecordKey &key, const IOVSyncValue &syncValue) const
 
const EventSetupRecordIntervalFinderoperator= (const EventSetupRecordIntervalFinder &)=delete
 
void resetInterval (const eventsetup::EventSetupRecordKey &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Protected Member Functions

void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Private Member Functions

void filldetailcache (unsigned int runnumber, unsigned int startlsnum)
 
void fillsummarycache (unsigned int runnumber, unsigned int startlsnum)
 
unsigned int maxavailableLSforRun (coral::ISchema &schema, const std::string &tablename, unsigned int runnumber)
 

Private Attributes

unsigned int m_cachesize
 
std::string m_connectStr
 
std::map< unsigned int, std::shared_ptr< const DIPLumiDetail > > m_detailcache
 
unsigned int m_detailcachedrun
 
std::shared_ptr< const DIPLumiDetailm_detailresult
 
bool m_isNullRun
 
const edm::IOVSyncValuem_pcurrentTime
 
std::map< unsigned int, std::shared_ptr< const DIPLumiSummary > > m_summarycache
 
unsigned int m_summarycachedrun
 
std::shared_ptr< const DIPLumiSummarym_summaryresult
 

Additional Inherited Members

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

Detailed Description

HF Luminosity numbers from DIP. Only exist if stable beam. No data available for other beam status

Description: A essource/esproducer for lumi values from DIP via runtime logger DB

Definition at line 22 of file DIPLumiProducer.h.

Member Typedef Documentation

◆ ReturnDetailType

typedef std::shared_ptr<const DIPLumiDetail> DIPLumiProducer::ReturnDetailType

Definition at line 27 of file DIPLumiProducer.h.

◆ ReturnSummaryType

typedef std::shared_ptr<const DIPLumiSummary> DIPLumiProducer::ReturnSummaryType

Definition at line 25 of file DIPLumiProducer.h.

Constructor & Destructor Documentation

◆ DIPLumiProducer()

DIPLumiProducer::DIPLumiProducer ( const edm::ParameterSet iConfig)

◆ ~DIPLumiProducer()

DIPLumiProducer::~DIPLumiProducer ( )
override

Definition at line 345 of file DIPLumiProducer.cc.

345 {}

Member Function Documentation

◆ filldetailcache()

void DIPLumiProducer::filldetailcache ( unsigned int  runnumber,
unsigned int  startlsnum 
)
private

Definition at line 265 of file DIPLumiProducer.cc.

265  {
266  m_detailcache.clear();
268 
269  std::map<unsigned int, std::unique_ptr<DIPLumiDetail> > detailcache;
270  //
271  //queries once per cache refill
272  //
273  //select lumisection,bunch,bunchlumi from cms_runtime_logger.bunch_lumi_sections where lumisection>=:lsmin and lumisection<:lsmax and runnumber=:runnumber ;
274  //
276  if (!mydbservice.isAvailable()) {
277  throw cms::Exception("Non existing service lumi::service::DBService");
278  }
279  auto session = mydbservice->connectReadOnly(m_connectStr);
280  coral::ITypeConverter& tconverter = session->typeConverter();
281  tconverter.setCppTypeForSqlType(std::string("float"), std::string("FLOAT(63)"));
282  tconverter.setCppTypeForSqlType(std::string("unsigned int"), std::string("NUMBER(10)"));
283  unsigned int lsmin = 1;
284  unsigned int lsmax = currentlsnum;
285  try {
286  session->transaction().start(true);
287  coral::ISchema& schema = session->nominalSchema();
288  unsigned int maxavailableLS = maxavailableLSforRun(schema, std::string("BUNCH_LUMI_SECTIONS"), m_summarycachedrun);
289  if (maxavailableLS != 0 && maxavailableLS < currentlsnum) {
290  lsmax = maxavailableLS;
291  } else if (maxavailableLS == 0) {
292  //this run not existing (yet)
293  session->transaction().commit();
294  return;
295  }
296  if (m_cachesize != 0) {
297  lsmin = (lsmax - m_cachesize) > 0 ? (lsmax - m_cachesize + 1) : 1;
298  }
299  coral::AttributeList lumidetailBindVariables;
300  lumidetailBindVariables.extend("lsmin", typeid(unsigned int));
301  lumidetailBindVariables.extend("lsmax", typeid(unsigned int));
302  lumidetailBindVariables.extend("runnumber", typeid(unsigned int));
303  lumidetailBindVariables["runnumber"].data<unsigned int>() = m_detailcachedrun;
304  lumidetailBindVariables["lsmin"].data<unsigned int>() = lsmin;
305  lumidetailBindVariables["lsmax"].data<unsigned int>() = lsmax;
306  std::string conditionStr("RUNNUMBER=:runnumber AND LUMISECTION>=:lsmin AND LUMISECTION<=:lsmax AND BUNCHLUMI>0 ");
307  coral::AttributeList lumidetailOutput;
308  lumidetailOutput.extend("LUMISECTION", typeid(unsigned int));
309  lumidetailOutput.extend("BUNCH", typeid(unsigned int));
310  lumidetailOutput.extend("BUNCHLUMI", typeid(float));
311  coral::IQuery* lumidetailQuery = schema.newQuery();
312  lumidetailQuery->addToTableList(std::string("BUNCH_LUMI_SECTIONS"));
313  lumidetailQuery->addToOutputList("LUMISECTION");
314  lumidetailQuery->addToOutputList("BUNCH");
315  lumidetailQuery->addToOutputList("BUNCHLUMI");
316  lumidetailQuery->setCondition(conditionStr, lumidetailBindVariables);
317  lumidetailQuery->defineOutput(lumidetailOutput);
318  coral::ICursor& lumidetailcursor = lumidetailQuery->execute();
319  while (lumidetailcursor.next()) {
320  const coral::AttributeList& row = lumidetailcursor.currentRow();
321  unsigned int lsnum = row["LUMISECTION"].data<unsigned int>();
322  if (detailcache.find(lsnum) == detailcache.end()) {
323  detailcache.insert(std::make_pair(lsnum, std::make_unique<DIPLumiDetail>()));
324  detailcache[lsnum]->setOrigin(m_detailcachedrun, lsnum);
325  }
326  if (!row["BUNCH"].isNull()) {
327  unsigned int bxidx = row["BUNCH"].data<unsigned int>();
328  float bxlumi = 0.0;
329  if (!row["BUNCHLUMI"].isNull()) {
330  bxlumi = row["BUNCHLUMI"].data<float>(); //Hz/ub
331  }
332  detailcache[lsnum]->fillbxdata(bxidx, bxlumi);
333  }
334  }
335  for (auto& item : detailcache) {
336  m_detailcache[item.first] = std::move(item.second);
337  }
338  delete lumidetailQuery;
339  session->transaction().commit();
340  } catch (const coral::Exception& er) {
341  session->transaction().rollback();
342  throw cms::Exception("DatabaseError ") << er.what();
343  }
344 }

References lumi::service::DBService::connectReadOnly(), Exception, edm::Service< T >::isAvailable(), B2GTnPMonitor_cfi::item, remoteMonitoring_LED_IterMethod_cfg::lsmax, remoteMonitoring_LED_IterMethod_cfg::lsmin, m_cachesize, m_connectStr, m_detailcache, m_detailcachedrun, m_summarycachedrun, maxavailableLSforRun(), eostools::move(), cond::runnumber, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by produceDetail().

◆ fillsummarycache()

void DIPLumiProducer::fillsummarycache ( unsigned int  runnumber,
unsigned int  startlsnum 
)
private

Definition at line 144 of file DIPLumiProducer.cc.

144  {
145  m_summarycache.clear();
147  //
148  // queries once per cache refill
149  //
150  // select max(lumi_sections) as maxavailable from cms_runtime_logger.lumi_sections where runnumber=:runnumber;
151  //
152  // if maxavailable<currentls: get lsmax=maxavailable ; else: get lsmax=currentls
153  // lsmin=lsmax-cachesize
154  // select runnumber,lumisection,instlumi,delivlumi,livelumi from cms_runtime_logger.lumi_sections where lumisection>=:lsmin and lumisection<=:lsmax and runnumber=:runnumber;
155  //
157  if (!mydbservice.isAvailable()) {
158  throw cms::Exception("Non existing service lumi::service::DBService");
159  }
160  auto session = mydbservice->connectReadOnly(m_connectStr);
161  coral::ITypeConverter& tconverter = session->typeConverter();
162  tconverter.setCppTypeForSqlType(std::string("float"), std::string("FLOAT(63)"));
163  tconverter.setCppTypeForSqlType(std::string("unsigned int"), std::string("NUMBER(10)"));
164  tconverter.setCppTypeForSqlType(std::string("unsigned short"), std::string("NUMBER(1)"));
165  unsigned int lsmin = 1;
166  unsigned int lsmax = currentlsnum;
167  try {
168  session->transaction().start(true);
169  coral::ISchema& schema = session->nominalSchema();
170  unsigned int maxavailableLS = maxavailableLSforRun(schema, std::string("LUMI_SECTIONS"), m_summarycachedrun);
171  if (maxavailableLS != 0 && maxavailableLS < currentlsnum) {
172  lsmax = maxavailableLS;
173  } else if (maxavailableLS == 0) {
174  //this run not existing (yet)
175  session->transaction().commit();
176  return;
177  }
178  if (m_cachesize != 0) {
179  lsmin = (lsmax - m_cachesize) > 0 ? (lsmax - m_cachesize + 1) : 1;
180  }
181  //std::cout<<"lsmin "<<lsmin<<" lsmax "<<lsmax<<std::endl;
182  coral::AttributeList lumisummaryBindVariables;
183  lumisummaryBindVariables.extend("lsmin", typeid(unsigned int));
184  lumisummaryBindVariables.extend("lsmax", typeid(unsigned int));
185  lumisummaryBindVariables.extend("runnumber", typeid(unsigned int));
186  lumisummaryBindVariables["runnumber"].data<unsigned int>() = m_summarycachedrun;
187  lumisummaryBindVariables["lsmin"].data<unsigned int>() = lsmin;
188  lumisummaryBindVariables["lsmax"].data<unsigned int>() = lsmax;
189  std::string conditionStr("RUNNUMBER=:runnumber AND LUMISECTION>=:lsmin AND LUMISECTION<=:lsmax");
190  coral::AttributeList lumisummaryOutput;
191  lumisummaryOutput.extend("LUMISECTION", typeid(unsigned int));
192  lumisummaryOutput.extend("INSTLUMI", typeid(float));
193  lumisummaryOutput.extend("DELIVLUMISECTION", typeid(float));
194  lumisummaryOutput.extend("LIVELUMISECTION", typeid(float));
195  lumisummaryOutput.extend("CMS_ACTIVE", typeid(unsigned short));
196  coral::IQuery* lumisummaryQuery = schema.newQuery();
197  lumisummaryQuery->addToTableList(std::string("LUMI_SECTIONS"));
198  lumisummaryQuery->addToOutputList("LUMISECTION");
199  lumisummaryQuery->addToOutputList("INSTLUMI");
200  lumisummaryQuery->addToOutputList("DELIVLUMISECTION");
201  lumisummaryQuery->addToOutputList("LIVELUMISECTION");
202  lumisummaryQuery->addToOutputList("CMS_ACTIVE");
203  lumisummaryQuery->setCondition(conditionStr, lumisummaryBindVariables);
204  lumisummaryQuery->defineOutput(lumisummaryOutput);
205  coral::ICursor& lumisummarycursor = lumisummaryQuery->execute();
206  while (lumisummarycursor.next()) {
207  const coral::AttributeList& row = lumisummarycursor.currentRow();
208  unsigned int lsnum = row["LUMISECTION"].data<unsigned int>();
209  float instlumi = 0.0;
210  if (!row["INSTLUMI"].isNull()) {
211  instlumi = row["INSTLUMI"].data<float>(); //Hz/ub
212  }
213  float intgdellumi = 0.0;
214  if (!row["DELIVLUMISECTION"].isNull()) {
215  intgdellumi = row["DELIVLUMISECTION"].data<float>() * 1000.0; //convert to /ub
216  }
217  float intgreclumi = 0.0;
218  if (!row["LIVELUMISECTION"].isNull()) {
219  intgreclumi = row["LIVELUMISECTION"].data<float>() * 1000.0; //convert to /ub
220  }
221  unsigned short cmsalive = 0;
222  if (!row["CMS_ACTIVE"].isNull()) {
223  cmsalive = row["CMS_ACTIVE"].data<unsigned short>();
224  }
225  auto tmpls = std::make_unique<DIPLumiSummary>(instlumi, intgdellumi, intgreclumi, cmsalive);
226  tmpls->setOrigin(m_summarycachedrun, lsnum);
227  //std::cout<<"filling "<<lsnum<<std::endl;
228  std::shared_ptr<const DIPLumiSummary> const_tmpls = std::move(tmpls);
229  m_summarycache.insert(std::make_pair(lsnum, const_tmpls));
230  }
231  delete lumisummaryQuery;
232  session->transaction().commit();
233  } catch (const coral::Exception& er) {
234  session->transaction().rollback();
235  throw cms::Exception("DatabaseError ") << er.what();
236  }
237 }

References lumi::service::DBService::connectReadOnly(), Exception, edm::Service< T >::isAvailable(), remoteMonitoring_LED_IterMethod_cfg::lsmax, remoteMonitoring_LED_IterMethod_cfg::lsmin, m_cachesize, m_connectStr, m_summarycache, m_summarycachedrun, maxavailableLSforRun(), eostools::move(), cond::runnumber, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by produceSummary().

◆ maxavailableLSforRun()

unsigned int DIPLumiProducer::maxavailableLSforRun ( coral::ISchema &  schema,
const std::string &  tablename,
unsigned int  runnumber 
)
private

select max(lumisection) as maxavailable from cms_runtime_logger.lumi_sections where runnumber=:runnumber;

Definition at line 238 of file DIPLumiProducer.cc.

240  {
244  unsigned int result = 0;
245  coral::AttributeList bindVariables;
246  bindVariables.extend("runnumber", typeid(unsigned int));
247  bindVariables["runnumber"].data<unsigned int>() = runnumber;
248  std::string conditionStr("RUNNUMBER=:runnumber");
249  coral::AttributeList MyOutput;
250  MyOutput.extend("maxavailablels", typeid(unsigned int));
251  coral::IQuery* myQuery = schema.newQuery();
252  myQuery->addToTableList(tablename);
253  myQuery->addToOutputList("max(LUMISECTION)", "maxavailablels");
254  myQuery->setCondition(conditionStr, bindVariables);
255  myQuery->defineOutput(MyOutput);
256  coral::ICursor& mycursor = myQuery->execute();
257  while (mycursor.next()) {
258  const coral::AttributeList& row = mycursor.currentRow();
259  if (!row["maxavailablels"].isNull()) {
260  result = row["maxavailablels"].data<unsigned int>();
261  }
262  }
263  return result;
264 }

References inputsource_file_cfi::myQuery, mps_fire::result, cond::runnumber, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by filldetailcache(), and fillsummarycache().

◆ produceDetail()

DIPLumiProducer::ReturnDetailType DIPLumiProducer::produceDetail ( const DIPLuminosityRcd )

Definition at line 103 of file DIPLumiProducer.cc.

103  {
104  unsigned int currentrun = m_pcurrentTime->eventID().run();
105  unsigned int currentls = m_pcurrentTime->luminosityBlockNumber();
106  if (currentls == 0 || currentls == 4294967295) {
107  return std::make_shared<const DIPLumiDetail>();
108  }
109  if (m_detailcachedrun != currentrun) { //i'm in a new run
110  filldetailcache(currentrun, currentls); //starting ls
111  } else { //i'm in an known run
112  if (m_detailcache.find(currentls) == m_detailcache.end()) { //i'm in a unknown ls
113  filldetailcache(currentrun, currentls); //cache all ls>=currentls
114  }
115  }
116  if (m_detailcache.empty()) {
117  return std::make_shared<const DIPLumiDetail>();
118  }
119  if (m_detailcache.find(currentls) == m_detailcache.end()) {
120  std::vector<unsigned int> v;
121  for (std::map<unsigned int, std::shared_ptr<const DIPLumiDetail> >::iterator it = m_detailcache.begin();
122  it != m_detailcache.end();
123  ++it) {
124  v.push_back(it->first);
125  }
126  m_detailresult = m_detailcache[v.back()];
127  } else {
128  m_detailresult = m_detailcache[currentls];
129  }
130  if (m_detailresult.get() == nullptr) {
131  return std::make_shared<const DIPLumiDetail>();
132  }
133  return m_detailresult;
134 }

References dqmiodumpmetadata::currentrun, edm::IOVSyncValue::eventID(), filldetailcache(), edm::IOVSyncValue::luminosityBlockNumber(), m_detailcache, m_detailcachedrun, m_detailresult, m_pcurrentTime, genParticles_cff::map, edm::EventID::run(), and findQualityFiles::v.

Referenced by DIPLumiProducer().

◆ produceSummary()

DIPLumiProducer::ReturnSummaryType DIPLumiProducer::produceSummary ( const DIPLuminosityRcd )

Definition at line 71 of file DIPLumiProducer.cc.

71  {
72  unsigned int currentrun = m_pcurrentTime->eventID().run();
73  unsigned int currentls = m_pcurrentTime->luminosityBlockNumber();
74  if (currentls == 0 || currentls == 4294967295) {
75  return std::make_shared<const DIPLumiSummary>();
76  }
77  if (m_summarycachedrun != currentrun) { //i'm in a new run
78  fillsummarycache(currentrun, currentls); //starting ls
79  } else { //i'm in an old run
80  if (m_summarycache.find(currentls) == m_summarycache.end()) { //i'm not cached
81  fillsummarycache(currentrun, currentls); //
82  }
83  }
84  if (m_summarycache.empty()) {
85  return std::make_shared<const DIPLumiSummary>();
86  }
87  if (m_summarycache.find(currentls) == m_summarycache.end()) {
88  std::vector<unsigned int> v;
89  for (std::map<unsigned int, std::shared_ptr<const DIPLumiSummary> >::iterator it = m_summarycache.begin();
90  it != m_summarycache.end();
91  ++it) {
92  v.push_back(it->first);
93  }
95  } else {
96  m_summaryresult = m_summarycache[currentls];
97  }
98  if (m_summaryresult.get() == nullptr) {
99  return std::make_shared<const DIPLumiSummary>();
100  }
101  return m_summaryresult;
102 }

References dqmiodumpmetadata::currentrun, edm::IOVSyncValue::eventID(), fillsummarycache(), edm::IOVSyncValue::luminosityBlockNumber(), m_pcurrentTime, m_summarycache, m_summarycachedrun, m_summaryresult, genParticles_cff::map, edm::EventID::run(), and findQualityFiles::v.

Referenced by DIPLumiProducer().

◆ setIntervalFor()

void DIPLumiProducer::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey iKey,
const edm::IOVSyncValue iTime,
edm::ValidityInterval oValidity 
)
overrideprotectedvirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 136 of file DIPLumiProducer.cc.

138  {
139  m_pcurrentTime = &iTime;
140  oValidity.setFirst(iTime);
141  oValidity.setLast(iTime);
142 }

References m_pcurrentTime, edm::ValidityInterval::setFirst(), and edm::ValidityInterval::setLast().

Member Data Documentation

◆ m_cachesize

unsigned int DIPLumiProducer::m_cachesize
private

Definition at line 46 of file DIPLumiProducer.h.

Referenced by DIPLumiProducer(), filldetailcache(), and fillsummarycache().

◆ m_connectStr

std::string DIPLumiProducer::m_connectStr
private

Definition at line 40 of file DIPLumiProducer.h.

Referenced by DIPLumiProducer(), filldetailcache(), and fillsummarycache().

◆ m_detailcache

std::map<unsigned int, std::shared_ptr<const DIPLumiDetail> > DIPLumiProducer::m_detailcache
private

Definition at line 42 of file DIPLumiProducer.h.

Referenced by filldetailcache(), and produceDetail().

◆ m_detailcachedrun

unsigned int DIPLumiProducer::m_detailcachedrun
private

Definition at line 45 of file DIPLumiProducer.h.

Referenced by filldetailcache(), and produceDetail().

◆ m_detailresult

std::shared_ptr<const DIPLumiDetail> DIPLumiProducer::m_detailresult
private

Definition at line 48 of file DIPLumiProducer.h.

Referenced by produceDetail().

◆ m_isNullRun

bool DIPLumiProducer::m_isNullRun
private

Definition at line 43 of file DIPLumiProducer.h.

◆ m_pcurrentTime

const edm::IOVSyncValue* DIPLumiProducer::m_pcurrentTime
private

Definition at line 49 of file DIPLumiProducer.h.

Referenced by produceDetail(), produceSummary(), and setIntervalFor().

◆ m_summarycache

std::map<unsigned int, std::shared_ptr<const DIPLumiSummary> > DIPLumiProducer::m_summarycache
private

Definition at line 41 of file DIPLumiProducer.h.

Referenced by fillsummarycache(), and produceSummary().

◆ m_summarycachedrun

unsigned int DIPLumiProducer::m_summarycachedrun
private

Definition at line 44 of file DIPLumiProducer.h.

Referenced by filldetailcache(), fillsummarycache(), and produceSummary().

◆ m_summaryresult

std::shared_ptr<const DIPLumiSummary> DIPLumiProducer::m_summaryresult
private

Definition at line 47 of file DIPLumiProducer.h.

Referenced by produceSummary().

DIPLumiProducer::m_detailcachedrun
unsigned int m_detailcachedrun
Definition: DIPLumiProducer.h:45
DIPLumiProducer::m_connectStr
std::string m_connectStr
Definition: DIPLumiProducer.h:40
DIPLumiProducer::m_pcurrentTime
const edm::IOVSyncValue * m_pcurrentTime
Definition: DIPLumiProducer.h:49
DIPLumiProducer::maxavailableLSforRun
unsigned int maxavailableLSforRun(coral::ISchema &schema, const std::string &tablename, unsigned int runnumber)
Definition: DIPLumiProducer.cc:238
DIPLumiProducer::m_detailcache
std::map< unsigned int, std::shared_ptr< const DIPLumiDetail > > m_detailcache
Definition: DIPLumiProducer.h:42
DIPLumiProducer::m_detailresult
std::shared_ptr< const DIPLumiDetail > m_detailresult
Definition: DIPLumiProducer.h:48
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
findQualityFiles.v
v
Definition: findQualityFiles.py:179
edm::IOVSyncValue::luminosityBlockNumber
LuminosityBlockNumber_t luminosityBlockNumber() const
Definition: IOVSyncValue.h:41
edm::ValidityInterval::setFirst
void setFirst(const IOVSyncValue &iTime)
Definition: ValidityInterval.h:47
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
DIPLumiProducer::fillsummarycache
void fillsummarycache(unsigned int runnumber, unsigned int startlsnum)
Definition: DIPLumiProducer.cc:144
edm::ValidityInterval::setLast
void setLast(const IOVSyncValue &iTime)
Definition: ValidityInterval.h:48
DIPLumiProducer::m_summarycachedrun
unsigned int m_summarycachedrun
Definition: DIPLumiProducer.h:44
DIPLumiProducer::filldetailcache
void filldetailcache(unsigned int runnumber, unsigned int startlsnum)
Definition: DIPLumiProducer.cc:265
edm::EventID::run
RunNumber_t run() const
Definition: EventID.h:38
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::IOVSyncValue::eventID
const EventID & eventID() const
Definition: IOVSyncValue.h:40
cond::runnumber
Definition: Time.h:19
remoteMonitoring_LED_IterMethod_cfg.lsmax
lsmax
Definition: remoteMonitoring_LED_IterMethod_cfg.py:215
inputsource_file_cfi.myQuery
myQuery
Definition: inputsource_file_cfi.py:102
edm::Service
Definition: Service.h:30
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
DIPLumiProducer::produceDetail
ReturnDetailType produceDetail(const DIPLuminosityRcd &)
Definition: DIPLumiProducer.cc:103
eostools.move
def move(src, dest)
Definition: eostools.py:511
Exception
Definition: hltDiff.cc:246
DIPLumiProducer::m_cachesize
unsigned int m_cachesize
Definition: DIPLumiProducer.h:46
DIPLumiProducer::m_summaryresult
std::shared_ptr< const DIPLumiSummary > m_summaryresult
Definition: DIPLumiProducer.h:47
DIPLumiProducer::m_summarycache
std::map< unsigned int, std::shared_ptr< const DIPLumiSummary > > m_summarycache
Definition: DIPLumiProducer.h:41
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
DIPLumiProducer::produceSummary
ReturnSummaryType produceSummary(const DIPLuminosityRcd &)
Definition: DIPLumiProducer.cc:71
mps_fire.result
result
Definition: mps_fire.py:311
dqmiodumpmetadata.currentrun
currentrun
Definition: dqmiodumpmetadata.py:34
genParticles_cff.map
map
Definition: genParticles_cff.py:11
remoteMonitoring_LED_IterMethod_cfg.lsmin
lsmin
Definition: remoteMonitoring_LED_IterMethod_cfg.py:213
lumi::service::DBService::connectReadOnly
ISessionProxyPtr connectReadOnly(const std::string &connectstring)
Definition: DBService.cc:19