Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef ONLINEDB_ECALCONDDB_FECONFIGODDWEIGHTDAT
0002 #define ONLINEDB_ECALCONDDB_FECONFIGODDWEIGHTDAT
0003 
0004 #include <vector>
0005 #include <stdexcept>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
0008 #include "OnlineDB/EcalCondDB/interface/FEConfigOddWeightInfo.h"
0009 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0010 
0011 class FEConfigOddWeightDat : public IDataItem {
0012 public:
0013   friend class EcalCondDBInterface;  // XXX temp should not need
0014   FEConfigOddWeightDat();
0015   ~FEConfigOddWeightDat() override;
0016 
0017   // User data methods
0018   inline std::string getTable() override { return "FE_CONFIG_WEIGHT2_DAT"; }
0019 
0020   inline void setWeightGroupId(int x) { m_group_id = x; }
0021   inline int getWeightGroupId() const { return m_group_id; }
0022 
0023 private:
0024   void prepareWrite() noexcept(false) override;
0025 
0026   void writeDB(const EcalLogicID* ecid, const FEConfigOddWeightDat* item, FEConfigOddWeightInfo* iconf) noexcept(false);
0027 
0028   void writeArrayDB(const std::map<EcalLogicID, FEConfigOddWeightDat>* data,
0029                     FEConfigOddWeightInfo* iconf) noexcept(false);
0030 
0031   void fetchData(std::map<EcalLogicID, FEConfigOddWeightDat>* fillMap, FEConfigOddWeightInfo* iconf) noexcept(false);
0032 
0033   // User data
0034   int m_group_id;
0035 };
0036 
0037 #endif