CMS 3D CMS Logo

LHCInfoPopConSourceHandler.h
Go to the documentation of this file.
1 #ifndef LHCINFOPOPCONSOURCEHANDLER_H
2 #define LHCINFOPOPCONSOURCEHANDLER_H
3 
4 #include <string>
5 
9 
11  public:
13  ~LHCInfoPopConSourceHandler() override;
14  void getNewObjects() override;
15  std::string id() const override;
16 private:
17  void addEmptyPayload( cond::Time_t iov );
18  bool getNextFillData( cond::persistency::Session& session, const boost::posix_time::ptime& targetTime, bool ended );
19  bool getFillData( cond::persistency::Session& session, unsigned short fillId );
20  size_t getLumiData( cond::persistency::Session& session, const boost::posix_time::ptime& beginFillTime, const boost::posix_time::ptime& endFillTime );
21  bool getDipData( cond::persistency::Session& session, const boost::posix_time::ptime& beginFillTime, const boost::posix_time::ptime& endFillTime );
22  bool getCTTPSData( cond::persistency::Session& session, const boost::posix_time::ptime& beginFillTime, const boost::posix_time::ptime& endFillTime );
23  bool getEcalData( cond::persistency::Session& session, const boost::posix_time::ptime& lowerTime, const boost::posix_time::ptime& upperTime, bool update );
24 
25  private:
26  bool m_debug;
27  // starting date for sampling
28  boost::posix_time::ptime m_startTime;
29  boost::posix_time::ptime m_endTime;
30  // sampling interval in seconds
31  unsigned int m_samplingInterval;
32  bool m_endFill = true;
34  //for reading from relational database source
37  std::unique_ptr<LHCInfo> m_fillPayload;
38  std::shared_ptr<LHCInfo> m_prevPayload;
39  std::vector<std::pair<cond::Time_t,std::shared_ptr<LHCInfo> > > m_tmpBuffer;
40  std::vector<std::shared_ptr<LHCInfo> > m_payloadBuffer;
41  bool m_lastPayloadEmpty = false;
42  };
43 
44 #endif
bool getFillData(cond::persistency::Session &session, unsigned short fillId)
boost::posix_time::ptime m_startTime
bool getCTTPSData(cond::persistency::Session &session, const boost::posix_time::ptime &beginFillTime, const boost::posix_time::ptime &endFillTime)
size_t getLumiData(cond::persistency::Session &session, const boost::posix_time::ptime &beginFillTime, const boost::posix_time::ptime &endFillTime)
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
bool getDipData(cond::persistency::Session &session, const boost::posix_time::ptime &beginFillTime, const boost::posix_time::ptime &endFillTime)
std::vector< std::shared_ptr< LHCInfo > > m_payloadBuffer
unsigned long long Time_t
Definition: Time.h:16
boost::posix_time::ptime m_endTime
#define update(a, b)
std::string id() const override
std::vector< std::pair< cond::Time_t, std::shared_ptr< LHCInfo > > > m_tmpBuffer
bool getNextFillData(cond::persistency::Session &session, const boost::posix_time::ptime &targetTime, bool ended)
LHCInfoPopConSourceHandler(const edm::ParameterSet &pset)