00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00012
00013 #ifndef CALPULSERFIT_H
00014 #define CALPULSERFIT_H
00015
00016 #include "Rtypes.h"
00017 #include "TF1.h"
00018 #include "DatabaseInterface/DbiResultSet.h"
00019 #include "DatabaseInterface/DbiTableRow.h"
00020 #include "DatabaseInterface/DbiValidityRec.h"
00021
00022 class DbiValidityRec;
00023
00024 class CalPulserFits: public DbiTableRow
00025 {
00026 public:
00027 CalPulserFits();
00028 virtual ~CalPulserFits();
00029
00030
00031 CalPulserFits(Int_t aggNo, Int_t seid, Int_t npfit, Double_t slope, Double_t slopeerr, Double_t xoffset, Double_t chisq);
00032
00033 CalPulserFits(Int_t aggNo, Int_t seid, Int_t ftype, TF1* fit, Double_t meanres, Double_t maxres, Double_t adcmax);
00034
00035
00036 void SetAggregateNo(Int_t aggno) {fAggregateNo = aggno;}
00037 void SetStripEnd(Int_t seid) {fStripEnd = seid;}
00038 void SetFitType(Int_t ftype) {fFitType = ftype;}
00039 void SetNPFit(Int_t numpoints) {fNPFit = numpoints;}
00040 void SetSlope(Double_t slope) {fSlope = slope;}
00041 void SetSlopeErr(Double_t err) {fSlopeErr = err;}
00042 void SetXOffset(Double_t off) {fXOffset = off;}
00043 void SetPar1(Double_t par) {fPar1 = par;}
00044 void SetPar2(Double_t par) {fPar2 = par;}
00045 void SetPar3(Double_t par) {fPar3 = par;}
00046 void SetPar4(Double_t par) {fPar4 = par;}
00047 void SetChisq(Double_t chisq) {fChisq = chisq;}
00048 void SetMeanRes(Double_t res) {fMeanRes = res;}
00049 void SetMaxRes(Double_t res) {fMaxRes = res;}
00050 void SetAdcMax(Double_t adcmax) {fAdcMax = adcmax;}
00051 void SetXtra1(Double_t xtra) {fXtra1 = xtra;}
00052 void SetXtra2(Double_t xtra) {fXtra2 = xtra;}
00053
00054 UInt_t GetIndex(UInt_t ) const {return fStripEnd;}
00055 Int_t GetAggregateNo() const { return fAggregateNo; }
00056 Int_t GetStripEnd() const { return fStripEnd; }
00057 Int_t GetFitType() const { return fFitType; }
00058 Int_t GetNPFit() const {return fNPFit;}
00059 Double_t GetSlope() const {return fSlope;}
00060 Double_t GetSlopeErr() const {return fSlopeErr;}
00061 Double_t GetXOffset() const {return fXOffset;}
00062 Double_t GetPar1() const {return fPar1;}
00063 Double_t GetPar2() const {return fPar2;}
00064 Double_t GetPar3() const {return fPar3;}
00065 Double_t GetPar4() const {return fPar4;}
00066 Double_t GetChisq() const {return fChisq;}
00067 Double_t GetMeanRes() const {return fMeanRes;}
00068 Double_t GetMaxRes() const {return fMaxRes;}
00069 Double_t GetAdcMax() const {return fAdcMax;}
00070 Double_t GetXtra1() const {return fXtra1;}
00071 Double_t GetXtra2() const {return fXtra2;}
00072
00073 virtual DbiTableRow* CreateTableRow() const { return new CalPulserFits;}
00074 virtual void Fill(DbiResultSet& rs,
00075 const DbiValidityRec* vrec);
00076 virtual void Store(DbiOutRowStream& ors,
00077 const DbiValidityRec* vrec) const;
00078
00079
00080 private:
00081
00082 Int_t fAggregateNo;
00083 Int_t fStripEnd;
00084 Int_t fFitType;
00085 Int_t fNPFit;
00086 Double_t fSlope;
00087 Double_t fSlopeErr;
00088 Double_t fXOffset;
00089 Double_t fPar1;
00090 Double_t fPar2;
00091 Double_t fPar3;
00092 Double_t fPar4;
00093 Double_t fChisq;
00094 Double_t fMeanRes;
00095 Double_t fMaxRes;
00096 Double_t fAdcMax;
00097 Double_t fXtra1;
00098 Double_t fXtra2;
00099
00100 ClassDef(CalPulserFits,0)
00101 };
00102
00103 #endif // CALPULSERFIT_H