00001 #ifndef CHANNELSTOFILTER_H 00002 #define CHANNELSTOFILTER_H 00003 #include <iosfwd> 00004 #include <string> 00005 00006 #include "DatabaseInterface/DbiTableRow.h" 00007 #include "RawData/RawChannelId.h" 00008 #include "LeakChecker/Lea.h" 00009 00010 class DbiValidityRec; 00011 00012 class CandDigitHandle; 00013 00014 class ChannelsToFilter : public DbiTableRow 00015 { 00016 public: 00017 00018 // Constructors and destructors. 00019 ChannelsToFilter() : fEncoded(0), fRcid(0) { LEA_CTOR; } 00020 ChannelsToFilter(UInt_t encoded) 00021 : fEncoded(encoded), fRcid(encoded) 00022 { LEA_CTOR; } 00023 ChannelsToFilter(const RawChannelId& rcid) 00024 : fEncoded(rcid.GetEncoded()) , fRcid(rcid) 00025 { LEA_CTOR; } 00026 virtual ~ChannelsToFilter(){ LEA_DTOR; } 00027 00028 // State testing member functions 00029 00030 virtual DbiTableRow* CreateTableRow() const { 00031 return new ChannelsToFilter; } 00032 00033 UInt_t GetIndex(UInt_t /* defIndex */) const { return fEncoded; } 00034 UInt_t GetEncoded() const {return fEncoded;} 00035 RawChannelId GetRawChannelId() const {return fRcid;} 00036 bool IsSameChannel(const RawChannelId& rcid) const ; 00037 bool IsSameChannel(const CandDigitHandle* dig) const; 00038 virtual void Print(Option_t* option="") const; 00039 std::ostream& Print(std::ostream&, Option_t* option = "") const; 00040 // static member function to provide the table description 00041 // for temp table writing 00042 static std::string GetTableDesc() ; 00043 00044 // State changing member functions 00045 virtual void Fill(DbiResultSet& rs, 00046 const DbiValidityRec* vrec); 00047 virtual void Store(DbiOutRowStream& ors, 00048 const DbiValidityRec* vrec) const; 00049 00050 private: 00051 00052 ChannelsToFilter(const ChannelsToFilter& from) 00053 : DbiTableRow() { LEA_CTOR; *this = from; } 00054 00055 // Data members 00056 00057 00058 UInt_t fEncoded;// the channel's fEncoded member 00059 RawChannelId fRcid; // the channels raw channel id, made from fEncoded 00060 ClassDef(ChannelsToFilter,0) 00061 }; 00062 00063 std::ostream& operator<<(std::ostream&, const ChannelsToFilter&); 00064 00065 #endif
1.3.9.1