CMS 3D CMS Logo

LHCInfoPerFillPopConSourceHandler.h
Go to the documentation of this file.
5 
7 public:
9  ~LHCInfoPerFillPopConSourceHandler() override = default;
10 
11  void getNewObjects() override;
12  std::string id() const override;
13 
14 private:
15  void addEmptyPayload(cond::Time_t iov);
16 
17  // Add payload to buffer and store corresponding lumiid IOV in m_timestampToLumiid map
19  void convertBufferedIovsToLumiid(std::map<cond::Time_t, cond::Time_t> timestampToLumiid);
20 
21  size_t getLumiData(const cond::OMSService& oms,
22  unsigned short fillId,
23  const boost::posix_time::ptime& beginFillTime,
24  const boost::posix_time::ptime& endFillTime);
25 
26  void getDipData(const cond::OMSService& oms,
27  const boost::posix_time::ptime& beginFillTime,
28  const boost::posix_time::ptime& endFillTime);
29 
31  const boost::posix_time::ptime& beginFillTime,
32  const boost::posix_time::ptime& endFillTime);
33 
35  const boost::posix_time::ptime& lowerTime,
36  const boost::posix_time::ptime& upperTime);
37 
38 private:
39  bool m_debug;
40  // starting date for sampling
41  boost::posix_time::ptime m_startTime;
42  boost::posix_time::ptime m_endTime;
43  bool m_endFillMode = true;
45  //for reading from relational database source
49  std::unique_ptr<LHCInfoPerFill> m_fillPayload;
50  std::shared_ptr<LHCInfoPerFill> m_prevPayload;
51  std::vector<std::pair<cond::Time_t, std::shared_ptr<LHCInfoPerFill>>> m_tmpBuffer;
52  bool m_lastPayloadEmpty = false;
53  // to hold correspondance between timestamp-type IOVs and lumiid-type IOVs
54  std::map<cond::Time_t, cond::Time_t> m_timestampToLumiid;
55 };
std::shared_ptr< LHCInfoPerFill > m_prevPayload
void getDipData(const cond::OMSService &oms, const boost::posix_time::ptime &beginFillTime, const boost::posix_time::ptime &endFillTime)
unsigned long long Time_t
Definition: Time.h:14
bool getCTPPSData(cond::persistency::Session &session, const boost::posix_time::ptime &beginFillTime, const boost::posix_time::ptime &endFillTime)
std::unique_ptr< LHCInfoPerFill > m_fillPayload
bool getEcalData(cond::persistency::Session &session, const boost::posix_time::ptime &lowerTime, const boost::posix_time::ptime &upperTime)
~LHCInfoPerFillPopConSourceHandler() override=default
void addPayloadToBuffer(cond::OMSServiceResultRef &row)
void convertBufferedIovsToLumiid(std::map< cond::Time_t, cond::Time_t > timestampToLumiid)
LHCInfoPerFillPopConSourceHandler(edm::ParameterSet const &pset)
std::map< cond::Time_t, cond::Time_t > m_timestampToLumiid
size_t getLumiData(const cond::OMSService &oms, unsigned short fillId, const boost::posix_time::ptime &beginFillTime, const boost::posix_time::ptime &endFillTime)
std::vector< std::pair< cond::Time_t, std::shared_ptr< LHCInfoPerFill > > > m_tmpBuffer