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  private:
36  unsigned int maxavailableLSforRun(coral::ISchema& schema,const std::string&tablename,unsigned int runnumber);
37  private:
39  std::map< unsigned int,std::shared_ptr<const DIPLumiSummary> > m_summarycache;
40  std::map< unsigned int,std::shared_ptr<const DIPLumiDetail> > m_detailcache;
41  bool m_isNullRun; //if lumi data exist for this run
42  unsigned int m_summarycachedrun;
43  unsigned int m_detailcachedrun;
44  unsigned int m_cachesize;
45  std::shared_ptr<const DIPLumiSummary> m_summaryresult;
46  std::shared_ptr<const DIPLumiDetail> m_detailresult;
48  private:
49  void fillsummarycache(unsigned int runnumber,unsigned int startlsnum);
50  void filldetailcache(unsigned int runnumber,unsigned int startlsnum);
51 };
52 #endif
unsigned int m_detailcachedrun
std::shared_ptr< const DIPLumiSummary > m_summaryresult
std::string m_connectStr
std::map< unsigned int, std::shared_ptr< const DIPLumiSummary > > m_summarycache
std::shared_ptr< const DIPLumiDetail > ReturnDetailType
Definition: Binary.h:9
unsigned int m_summarycachedrun
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