Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:57:17

0001 #ifndef LMFRUNDAT_H
0002 #define LMFRUNDAT_H
0003 
0004 #include <cmath>
0005 
0006 /*
0007  Last updated by  Giovanni.Organtini@roma1.infn.it 2010
0008 */
0009 
0010 #include "OnlineDB/EcalCondDB/interface/LMFDat.h"
0011 
0012 /**
0013  *   LMF_RUN_DAT interface
0014  */
0015 class LMFRunDat : public LMFDat {
0016 public:
0017   LMFRunDat();
0018   LMFRunDat(EcalDBConnection *conn);
0019   LMFRunDat(oracle::occi::Environment *env, oracle::occi::Connection *conn);
0020   ~LMFRunDat() override {}
0021 
0022   int getEvents(const EcalLogicID &id) { return (int)rint(LMFDat::getData(id, "NEVENTS")); }
0023   int getEvents(int id) { return (int)rint(LMFDat::getData(id, "NEVENTS")); }
0024   int getQualityFlag(const EcalLogicID &id) { return (int)rint(LMFDat::getData(id, "QUALITY_FLAG")); }
0025   int getQualityFlag(int id) { return (int)rint(LMFDat::getData(id, "QUALITY_FLAG")); }
0026   LMFRunDat &setEvents(const EcalLogicID &id, int n) {
0027     LMFDat::setData(id, "NEVENTS", (float)n);
0028     return *this;
0029   }
0030   LMFRunDat &setQualityFlag(const EcalLogicID &id, int q) {
0031     LMFDat::setData(id, "QUALITY_FLAG", (float)q);
0032     return *this;
0033   }
0034   LMFRunDat &setData(const EcalLogicID &id, int n, int q) {
0035     LMFDat::setData(id, "NEVENTS", (float)n);
0036     LMFDat::setData(id, "QUALITY_FLAG", (float)q);
0037     return *this;
0038   }
0039   LMFRunDat &Data(const EcalLogicID &id, const std::vector<float> &v) {
0040     LMFDat::setData(id, v);
0041     return *this;
0042   }
0043 
0044 protected:
0045 };
0046 
0047 #endif