CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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;
27  typedef std::shared_ptr<const DIPLumiDetail> ReturnDetailType;
29  ~DIPLumiProducer() override;
30 
31 protected:
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
DIPLumiProducer(const edm::ParameterSet &)
std::string m_connectStr
~DIPLumiProducer() override
ReturnDetailType produceDetail(const DIPLuminosityRcd &)
std::shared_ptr< const DIPLumiDetail > ReturnDetailType
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
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
unsigned int maxavailableLSforRun(coral::ISchema &schema, const std::string &tablename, unsigned int runnumber)
void filldetailcache(unsigned int runnumber, unsigned int startlsnum)
const edm::IOVSyncValue * m_pcurrentTime
std::shared_ptr< const DIPLumiDetail > m_detailresult
std::shared_ptr< const DIPLumiSummary > ReturnSummaryType
void fillsummarycache(unsigned int runnumber, unsigned int startlsnum)
ReturnSummaryType produceSummary(const DIPLuminosityRcd &)