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() noexcept(false) override;
40 
41  void writeDB(const EcalLogicID* ecid, const RunDCSMagnetDat* item, RunIOV* iov) noexcept(false);
42 
43  void fetchData(std::map<EcalLogicID, RunDCSMagnetDat>* fillMap, RunIOV* iov) noexcept(false);
44 
45  void fetchLastData(std::map<EcalLogicID, RunDCSMagnetDat>* fillMap) noexcept(false);
46 
47  // User data
48  float m_current;
50 };
51 
52 #endif
Definition: start.py:1
std::string getMagnetAccount()
void fetchData(std::map< EcalLogicID, RunDCSMagnetDat > *fillMap, RunIOV *iov) noexcept(false)
float getMagnetCurrent() const
void fetchLastData(std::map< EcalLogicID, RunDCSMagnetDat > *fillMap) noexcept(false)
void setMagnetCurrent(float t)
oracle::occi::ResultSet ResultSet
#define noexcept
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