00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00012
00013 #ifndef CALSTRIPTOSTRIP_H
00014 #define CALSTRIPTOSTRIP_H
00015
00016 #include "DatabaseInterface/DbiTableRow.h"
00017 #include "DatabaseInterface/DbiValidityRec.h"
00018 #include "LeakChecker/Lea.h"
00019 #include "Plex/PlexStripEndId.h"
00020
00021 class DbiValidityRec;
00022
00023 class CalStripToStrip : public DbiTableRow
00024 {
00025
00026 public:
00027
00028
00029 CalStripToStrip() { LEA_CTOR; }
00030
00031 CalStripToStrip( const PlexStripEndId& seid, Float_t resp, Float_t respErr )
00032 : fSEIdEncoded(seid.GetEncoded()),
00033 fResponse(resp),
00034 fResponseErr(respErr),
00035 fSEIdKey(seid.BuildPlnStripEndKey())
00036 { LEA_CTOR; }
00037
00038 CalStripToStrip( Int_t seid_enc, Float_t resp, Float_t respErr )
00039 : fSEIdEncoded(seid_enc),
00040 fResponse(resp),
00041 fResponseErr(respErr),
00042 fSEIdKey(PlexStripEndId(seid_enc).BuildPlnStripEndKey())
00043 { LEA_CTOR; }
00044
00045 virtual ~CalStripToStrip(){ LEA_DTOR; };
00046
00047
00048 Bool_t CanL2Cache() const { return kTRUE; }
00049 UInt_t GetIndex(UInt_t) const { return fSEIdKey; }
00050 PlexStripEndId GetStripEndId() const { return PlexStripEndId(fSEIdEncoded); }
00051 UInt_t GetSEIDkey() const { return fSEIdKey; }
00052 Float_t GetResponse() const { return fResponse; };
00053 Float_t GetResponseErr() const { return fResponseErr; };
00054
00055 virtual DbiTableRow* CreateTableRow() const { return new CalStripToStrip; }
00056
00057
00058 virtual void Fill(DbiResultSet& rs,
00059 const DbiValidityRec* vrec);
00060 virtual void Store(DbiOutRowStream& ors,
00061 const DbiValidityRec* vrec) const;
00062
00063
00064 private:
00065
00066 CalStripToStrip(const CalStripToStrip& from)
00067 : DbiTableRow(from) { LEA_CTOR; *this = from; }
00068
00069
00070 Int_t fSEIdEncoded;
00071 Float_t fResponse;
00072 Float_t fResponseErr;
00073
00074
00075 UInt_t fSEIdKey;
00076 ClassDef(CalStripToStrip,0)
00077 };
00078
00079
00080 #endif // CALSTRIPTOSTRIP_H
00081
00082
00083
00084
00085