CMS 3D CMS Logo

RunDCSMagnetDat.h
Go to the documentation of this file.
1 #ifndef RUNDCSMAGNET_H
2 #define RUNDCSMAGNET_H
3 
4 #include <vector>
5 #include <stdexcept>
6 
14 
15 class RunDCSMagnetDat : public IDataItem {
16  public:
17  typedef oracle::occi::ResultSet ResultSet;
18 
19  friend class EcalCondDBInterface;
21  ~RunDCSMagnetDat() override;
22 
23  // User data methods
24  inline std::string getTable() override { return "CMSFWMAGNET_LV"; }
25  inline std::string getMagnetAccount() { return "CMS_DCS_ENV_PVSS_COND"; }
26  inline void setMagnetCurrent(float t) { m_current = t; }
27  inline float getMagnetCurrent() const { return m_current; }
28 
29  void setTime(const Tm& start);
30  Tm getTime() const;
31 
32  private:
33  ResultSet* getMagnetRset();
34 
35  int nowMicroseconds();
36 
37  void fillTheMap(ResultSet *, std::map< EcalLogicID, RunDCSMagnetDat >* );
38 
39  void prepareWrite()
40  noexcept(false) override;
41 
42  void writeDB(const EcalLogicID* ecid, const RunDCSMagnetDat* item, RunIOV* iov )
43  noexcept(false);
44 
45  void fetchData(std::map< EcalLogicID, RunDCSMagnetDat >* fillMap, RunIOV* iov)
46  noexcept(false);
47 
48  void fetchLastData(std::map< EcalLogicID, RunDCSMagnetDat >* fillMap)
49  noexcept(false);
50 
51 
52  // User data
53  float m_current;
55 
56 };
57 
58 #endif
Definition: start.py:1
std::string getMagnetAccount()
void fetchData(std::map< EcalLogicID, RunDCSMagnetDat > *fillMap, RunIOV *iov) noexcept(false)
#define noexcept
float getMagnetCurrent() const
void fetchLastData(std::map< EcalLogicID, RunDCSMagnetDat > *fillMap) noexcept(false)
void setMagnetCurrent(float t)
oracle::occi::ResultSet ResultSet
void writeDB(const EcalLogicID *ecid, const RunDCSMagnetDat *item, RunIOV *iov) noexcept(false)
void fillTheMap(ResultSet *, std::map< EcalLogicID, RunDCSMagnetDat > *)
void prepareWrite() noexcept(false) override
ResultSet * getMagnetRset()
void setTime(const Tm &start)
~RunDCSMagnetDat() override
Definition: RunIOV.h:13
Definition: Tm.h:13
Tm getTime() const
std::string getTable() override