Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:52

0001 #ifndef DCUIOV_H
0002 #define DCUIOV_H
0003 
0004 #include <stdexcept>
0005 #include <iostream>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/IIOV.h"
0008 #include "OnlineDB/EcalCondDB/interface/DCUTag.h"
0009 #include "OnlineDB/EcalCondDB/interface/Tm.h"
0010 
0011 typedef int run_t;
0012 
0013 class DCUIOV : public IIOV {
0014 public:
0015   friend class EcalCondDBInterface;
0016 
0017   DCUIOV();
0018   ~DCUIOV() override;
0019 
0020   // Methods for user data
0021   void setSince(const Tm& since);
0022   Tm getSince() const;
0023   void setTill(const Tm& till);
0024   Tm getTill() const;
0025   void setDCUTag(const DCUTag& tag);
0026   DCUTag getDCUTag() const;
0027 
0028   // Methods from IUniqueDBObject
0029   int getID() { return m_ID; };
0030   int fetchID() noexcept(false) override;
0031   void setByID(int id) noexcept(false) override;
0032 
0033   // Operators
0034   inline bool operator==(const DCUIOV& m) const {
0035     return (m_dcuTag == m.m_dcuTag && m_since == m.m_since && m_till == m.m_till);
0036   }
0037 
0038   inline bool operator!=(const DCUIOV& m) const { return !(*this == m); }
0039 
0040 private:
0041   // User data for this IOV
0042   Tm m_since;
0043   Tm m_till;
0044   DCUTag m_dcuTag;
0045 
0046   int writeDB() noexcept(false);
0047   void setByTm(DCUTag* tag, const Tm& time) noexcept(false);
0048 };
0049 
0050 #endif