00001 #ifndef BFLDDBICOILSTATE_H 00002 #define BFLDDBICOILSTATE_H 00003 00004 #include "Rtypes.h" 00005 #include "DatabaseInterface/DbiTableRow.h" 00006 #include "DatabaseInterface/DbiOutRowStream.h" 00007 #include "DatabaseInterface/DbiResultSet.h" 00008 #include "CoilStatus.h" 00009 //#include "LeakChecker/Lea.h" 00010 00011 class DbiValidityRec; 00012 00013 class BfldDbiCoilState : public DbiTableRow 00014 { 00015 00016 using TObject::Compare; // So won't be hidden 00017 00018 public: 00019 // Constructors and destructors. 00020 BfldDbiCoilState() { } 00021 BfldDbiCoilState(const BfldDbiCoilState& from) : DbiTableRow(from) { *this = from; } 00022 BfldDbiCoilState(Float_t a, UInt_t b, UInt_t c) : 00023 fCurrent(a), iStatus(b), iSupermod(c) { } 00024 virtual ~BfldDbiCoilState(){ }; 00025 00026 00027 // State testing member functions 00028 Bool_t CanL2Cache() const { return kTRUE; } 00029 Bool_t Compare(const BfldDbiCoilState& that ) const { 00030 return fCurrent == that.fCurrent 00031 && iStatus == that.iStatus 00032 && iSupermod == that.iSupermod; } 00033 00034 UInt_t GetIndex(UInt_t /* defIndex */) const { return iSupermod; } 00035 Float_t GetCurrent() const { return fCurrent; } 00036 UInt_t GetStatus() const { return iStatus; } 00037 Int_t GetSupermodule() const { return iSupermod; } 00038 Int_t GetAggregateNo() const { return iSupermod; } 00039 Bool_t IsOK() const { if (iStatus & CoilStatus::kBad) 00040 return false; 00041 else return true;} 00042 00043 // I/O member functions 00044 virtual void Fill(DbiResultSet& rs, const DbiValidityRec* vrec); 00045 virtual void Store(DbiOutRowStream& ors, const DbiValidityRec* vrec) const; 00046 00047 virtual DbiTableRow* CreateTableRow() const { return new BfldDbiCoilState; } 00048 00049 private: 00050 00051 // Data members 00052 00053 Float_t fCurrent; 00054 UInt_t iStatus; 00055 Int_t iSupermod; 00056 00057 ClassDef(BfldDbiCoilState,0) 00058 00059 }; 00060 00061 #endif // BFLDDBICOILSTATE_H
1.3.9.1