Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MONRUNDAT_H
0002 #define MONRUNDAT_H
0003 
0004 #include <vector>
0005 #include <stdexcept>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
0008 #include "OnlineDB/EcalCondDB/interface/MonRunIOV.h"
0009 #include "OnlineDB/EcalCondDB/interface/MonRunOutcomeDef.h"
0010 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0011 
0012 class MonRunDat : public IDataItem {
0013 public:
0014   friend class EcalCondDBInterface;
0015   MonRunDat();
0016   ~MonRunDat() override;
0017 
0018   // User data methods
0019   inline std::string getTable() override { return "MON_RUN_DAT"; }
0020 
0021   inline void setNumEvents(int num) { m_numEvents = num; }
0022   inline int getNumEvents() const { return m_numEvents; }
0023 
0024   inline void setMonRunOutcomeDef(const MonRunOutcomeDef& outcomeDef) { m_outcomeDef = outcomeDef; }
0025   inline MonRunOutcomeDef getMonRunOutcomeDef() const { return m_outcomeDef; }
0026 
0027   inline void setRootfileName(std::string name) { m_rootfileName = name; }
0028   inline std::string getRootfileName() const { return m_rootfileName; }
0029 
0030   inline void setTaskList(int list) { m_taskList = list; }
0031   inline int getTaskList() const { return m_taskList; }
0032 
0033   inline void setTaskOutcome(int outcome) { m_taskOutcome = outcome; }
0034   inline int getTaskOutcome() const { return m_taskOutcome; }
0035 
0036 private:
0037   void prepareWrite() noexcept(false) override;
0038 
0039   void writeDB(const EcalLogicID* ecid, const MonRunDat* item, MonRunIOV* iov) noexcept(false);
0040 
0041   void fetchData(std::map<EcalLogicID, MonRunDat>* fillMap, MonRunIOV* iov) noexcept(false);
0042 
0043   // User data
0044   int m_numEvents;
0045   MonRunOutcomeDef m_outcomeDef;
0046   std::string m_rootfileName;
0047   int m_taskList;
0048   int m_taskOutcome;
0049 };
0050 
0051 #endif