File indexing completed on 2024-04-06 12:22:55
0001 #ifndef MODRUNIOV_H
0002 #define MODRUNIOV_H
0003
0004 #include <stdexcept>
0005 #include <iostream>
0006
0007 #include "OnlineDB/EcalCondDB/interface/IIOV.h"
0008 #include "OnlineDB/EcalCondDB/interface/RunIOV.h"
0009 #include "OnlineDB/EcalCondDB/interface/Tm.h"
0010
0011 typedef int subrun_t;
0012
0013 class MODRunIOV : public IIOV {
0014 public:
0015 friend class EcalCondDBInterface;
0016
0017 MODRunIOV();
0018 ~MODRunIOV() override;
0019
0020 void setID(int id);
0021 int getID() { return m_ID; };
0022
0023
0024 void setRunIOV(const RunIOV& iov);
0025 RunIOV getRunIOV();
0026 void setSubRunNumber(subrun_t subrun);
0027 run_t getSubRunNumber() const;
0028 void setSubRunStart(const Tm& start);
0029 Tm getSubRunStart() const;
0030 void setSubRunEnd(const Tm& end);
0031 Tm getSubRunEnd() const;
0032
0033
0034 int fetchID() noexcept(false) override;
0035 void setByID(int id) noexcept(false) override;
0036
0037
0038 inline bool operator==(const MODRunIOV& m) const {
0039 return (m_runIOV == m.m_runIOV && m_subRunNum == m.m_subRunNum && m_subRunStart == m.m_subRunStart &&
0040 m_subRunEnd == m.m_subRunEnd);
0041 }
0042
0043 inline bool operator!=(const MODRunIOV& m) const { return !(*this == m); }
0044
0045 private:
0046
0047 RunIOV m_runIOV;
0048 subrun_t m_subRunNum;
0049 Tm m_subRunStart;
0050 Tm m_subRunEnd;
0051
0052 int writeDB() noexcept(false);
0053 void fetchParentIDs(int* runIOVID) noexcept(false);
0054
0055 void setByRun(RunIOV* runiov, subrun_t subrun) noexcept(false);
0056 };
0057
0058 #endif