00001 // $Id: DbuVaChipPeds.h,v 1.4 2008/03/12 15:01:40 rhatcher Exp $ 00002 00003 #ifndef DBUVACHIPPEDS_H 00004 #define DBUVACHIPPEDS_H 00005 00007 // DbuVaChipPeds 00008 // 00009 // Package: DatabaseUpdater 00010 // 00011 // Concept: 00012 // 00013 // 00014 // R. Hatcher 2002-04-19 00016 00017 #include "DatabaseInterface/DbiTableRow.h" 00018 #include "LeakChecker/Lea.h" 00019 00020 #include "Validity/VldContext.h" 00021 #include "RawData/RawChannelId.h" 00022 #include <iosfwd> 00023 00024 class DbiValidityRec; 00025 00026 class DbuVaChipPeds; 00027 std::ostream& operator<<(std::ostream& os, const DbuVaChipPeds& drs); 00028 00029 class DbuVaChipPeds : public DbiTableRow 00030 { 00031 00032 public: 00033 00034 // Constructors and destructors. 00035 00036 DbuVaChipPeds() : 00037 fRawChannelId() 00038 { LEA_CTOR; for (int i=0; i<22; ++i) fChanPed[i] = -1; } 00039 00040 DbuVaChipPeds(const RawChannelId& rcid) : 00041 fRawChannelId(rcid) 00042 { LEA_CTOR; fRawChannelId.SetVaChannel(0); 00043 for (int i=0; i<22; ++i) fChanPed[i] = -1; } 00044 00045 DbuVaChipPeds(const RawChannelId& rcid, Short_t* chanpeds) : 00046 fRawChannelId(rcid) 00047 { LEA_CTOR; fRawChannelId.SetVaChannel(0); 00048 for (int i=0; i<22; ++i) fChanPed[i] = chanpeds[i]; } 00049 00050 virtual ~DbuVaChipPeds(){ LEA_DTOR; }; 00051 00052 // State testing member functions 00053 00054 virtual Int_t GetAggregateNo() const { return fRawChannelId.GetCrate(); } 00055 00056 // UInt_t GetIndex(UInt_t defIndex) const; 00057 00058 virtual DbiTableRow* CreateTableRow() const { return new DbuVaChipPeds; } 00059 00060 // I/O member functions 00061 00062 virtual void Fill(DbiResultSet& rs, 00063 const DbiValidityRec* vrec); 00064 virtual void Store(DbiOutRowStream& ors, 00065 const DbiValidityRec* vrec) const; 00066 00067 static const char* GetTableDescr(); 00068 00069 private: 00070 00071 // Constructors and destructors. 00072 00073 DbuVaChipPeds(const DbuVaChipPeds& from) 00074 : DbiTableRow() { LEA_CTOR; *this = from; } 00075 00076 // Data members 00077 00078 public: // !!!!!!! for now! 00079 00080 RawChannelId fRawChannelId; 00081 Short_t fChanPed[22]; // pedestal values for each channel 00082 00083 ClassDef(DbuVaChipPeds,0) 00084 00085 }; 00086 00087 #endif // DBUVACHIPPEDS_H
1.3.9.1