Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef LMFCORRCOEFDATCOMPONENT_H
0002 #define LMFCORRCOEFDATCOMPONENT_H
0003 
0004 /*
0005  Last updated by  Giovanni.Organtini@roma1.infn.it 2010
0006 
0007  This class represent a block of channels that share the same LMR_SUB_IOV_ID
0008  It is then modeled as a standard DAT table
0009 
0010  It is used as a component of the LMF_CORR_COEF_DAT block of records
0011  It should never been instantiated by a user
0012 
0013  */
0014 
0015 #include <vector>
0016 
0017 #include "OnlineDB/EcalCondDB/interface/LMFDat.h"
0018 #include "OnlineDB/EcalCondDB/interface/LMFLmrSubIOV.h"
0019 #include "OnlineDB/EcalCondDB/interface/LMFSeqDat.h"
0020 
0021 class LMFCorrCoefDatComponent : public LMFDat {
0022 public:
0023   friend class EcalCondDBInterface;
0024 
0025   LMFCorrCoefDatComponent();
0026   LMFCorrCoefDatComponent(EcalDBConnection *c);
0027   LMFCorrCoefDatComponent(oracle::occi::Environment *env, oracle::occi::Connection *conn);
0028   ~LMFCorrCoefDatComponent() override{};
0029 
0030   LMFCorrCoefDatComponent &setLMFLmrSubIOV(const LMFLmrSubIOV &iov);
0031   LMFCorrCoefDatComponent &setP123(const EcalLogicID &id, float p1, float p2, float p3);
0032   LMFCorrCoefDatComponent &setP123(const EcalLogicID &id, float p1, float p2, float p3, float p1e, float p2e, float p3e);
0033   LMFCorrCoefDatComponent &setP123Errors(const EcalLogicID &id, float p1e, float p2e, float p3e);
0034   LMFCorrCoefDatComponent &setFlag(const EcalLogicID &id, int flag);
0035   LMFCorrCoefDatComponent &setSequence(const EcalLogicID &id, int seq_id);
0036   LMFCorrCoefDatComponent &setSequence(const EcalLogicID &id, const LMFSeqDat &seq);
0037 
0038   LMFLmrSubIOV getLMFLmrSubIOV() const;
0039   int getLMFLmrSubIOVID() const;
0040   friend class LMFUnique;
0041   using LMFUnique::getParameters;
0042   std::vector<float> getParameters(const EcalLogicID &id);
0043   std::vector<float> getParameterErrors(const EcalLogicID &id);
0044   std::vector<float> getParameters(int id);
0045   std::vector<float> getParameterErrors(int id);
0046   int getFlag(const EcalLogicID &id);
0047   int getSeqID(const EcalLogicID &id);
0048   int getSeqID(int id);
0049   LMFSeqDat getSequence(const EcalLogicID &id);
0050 
0051   std::string foreignKeyName() const override;
0052   std::string getTableName() const override;
0053   std::string getIovIdFieldName() const override;
0054   int writeDB() noexcept(false) override;
0055 
0056 private:
0057   void init();
0058 };
0059 
0060 #endif