CMS 3D CMS Logo

DIPLumiProducer.h
Go to the documentation of this file.
1 #ifndef RecoLuminosity_LumiProducer_DIPLumiProducer_h
2 #define RecoLuminosity_LumiProducer_DIPLumiProducer_h
3 
9 #include <memory>
10 namespace edm {
11  class IOVSyncValue;
12 }
13 namespace coral {
14  class ISchema;
15 }
16 class DIPLuminosityRcd;
17 class DIPLumiSummary;
18 class DIPLumiDetail;
23 public:
25  typedef std::shared_ptr<const DIPLumiSummary> ReturnSummaryType;
26  ReturnSummaryType produceSummary(const DIPLuminosityRcd&);
27  typedef std::shared_ptr<const DIPLumiDetail> ReturnDetailType;
28  ReturnDetailType produceDetail(const DIPLuminosityRcd&);
29  ~DIPLumiProducer() override;
30 
31 protected:
32  void setIntervalFor(const edm::eventsetup::EventSetupRecordKey&,
33  const edm::IOVSyncValue&,
34  edm::ValidityInterval&) override;
35 
36 private:
37  unsigned int maxavailableLSforRun(coral::ISchema& schema, const std::string& tablename, unsigned int runnumber);
38 
39 private:
41  std::map<unsigned int, std::shared_ptr<const DIPLumiSummary> > m_summarycache;
42  std::map<unsigned int, std::shared_ptr<const DIPLumiDetail> > m_detailcache;
43  bool m_isNullRun; //if lumi data exist for this run
44  unsigned int m_summarycachedrun;
45  unsigned int m_detailcachedrun;
46  unsigned int m_cachesize;
47  std::shared_ptr<const DIPLumiSummary> m_summaryresult;
48  std::shared_ptr<const DIPLumiDetail> m_detailresult;
50 
51 private:
52  void fillsummarycache(unsigned int runnumber, unsigned int startlsnum);
53  void filldetailcache(unsigned int runnumber, unsigned int startlsnum);
54 };
55 #endif
unsigned int m_detailcachedrun
std::shared_ptr< const DIPLumiSummary > m_summaryresult
std::string m_connectStr
std::shared_ptr< const DIPLumiDetail > ReturnDetailType
Definition: Binary.h:9
unsigned int m_summarycachedrun
std::map< unsigned int, std::shared_ptr< const DIPLumiSummary > > m_summarycache
std::map< unsigned int, std::shared_ptr< const DIPLumiDetail > > m_detailcache
unsigned int m_cachesize
const edm::IOVSyncValue * m_pcurrentTime
HLT enums.
std::shared_ptr< const DIPLumiDetail > m_detailresult
std::shared_ptr< const DIPLumiSummary > ReturnSummaryType