CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
LHCInfoPopConSourceHandler.h
Go to the documentation of this file.
1 #ifndef LHCINFOPOPCONSOURCEHANDLER_H
2 #define LHCINFOPOPCONSOURCEHANDLER_H
3 
4 #include <string>
5 
9 
10 namespace cond {
11  class OMSService;
12 }
13 
15 public:
17  ~LHCInfoPopConSourceHandler() override;
18  void getNewObjects() override;
19  std::string id() const override;
20 
21  static constexpr unsigned int kLumisectionsQueryLimit = 4000; // enough for fills not exceeding 25h
22 
23 private:
24  void addEmptyPayload(cond::Time_t iov);
25 
26  size_t getLumiData(const cond::OMSService& service,
27  unsigned short fillId,
28  const boost::posix_time::ptime& beginFillTime,
29  const boost::posix_time::ptime& endFillTime);
31  const boost::posix_time::ptime& beginFillTime,
32  const boost::posix_time::ptime& endFillTime);
34  const boost::posix_time::ptime& beginFillTime,
35  const boost::posix_time::ptime& endFillTime);
37  const boost::posix_time::ptime& lowerTime,
38  const boost::posix_time::ptime& upperTime,
39  bool update);
40 
41 private:
42  bool m_debug;
43  // starting date for sampling
44  boost::posix_time::ptime m_startTime;
45  boost::posix_time::ptime m_endTime;
46  // sampling interval in seconds
47  unsigned int m_samplingInterval;
48  bool m_endFill = true;
50  //for reading from relational database source
54  std::unique_ptr<LHCInfo> m_fillPayload;
55  std::shared_ptr<LHCInfo> m_prevPayload;
56  std::vector<std::pair<cond::Time_t, std::shared_ptr<LHCInfo> > > m_tmpBuffer;
57  bool m_lastPayloadEmpty = false;
58 };
59 
60 #endif
boost::posix_time::ptime m_startTime
bool getCTTPSData(cond::persistency::Session &session, const boost::posix_time::ptime &beginFillTime, const boost::posix_time::ptime &endFillTime)
std::vector< std::pair< cond::Time_t, std::shared_ptr< LHCInfo > > > m_tmpBuffer
std::unique_ptr< LHCInfo > m_fillPayload
bool getEcalData(cond::persistency::Session &session, const boost::posix_time::ptime &lowerTime, const boost::posix_time::ptime &upperTime, bool update)
std::shared_ptr< LHCInfo > m_prevPayload
std::string id() const override
void getDipData(const cond::OMSService &service, const boost::posix_time::ptime &beginFillTime, const boost::posix_time::ptime &endFillTime)
unsigned long long Time_t
Definition: Time.h:14
boost::posix_time::ptime m_endTime
static constexpr unsigned int kLumisectionsQueryLimit
size_t getLumiData(const cond::OMSService &service, unsigned short fillId, const boost::posix_time::ptime &beginFillTime, const boost::posix_time::ptime &endFillTime)
Definition: plugin.cc:23
#define update(a, b)
LHCInfoPopConSourceHandler(const edm::ParameterSet &pset)