Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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