00001 00002 00003 00004 //----------------------------------------------------------------------------- 00005 // SVN: $Id: MergeTable.h 5600 2009-03-27 17:57:30Z RossCollins $ 00006 //----------------------------------------------------------------------------- 00007 #ifndef MERGETABLE_H 00008 #define MERGETABLE_H 00009 00010 #include <string> 00011 //----------------------------------------------------------------------------- 00013 00017 class MergeTable 00018 { 00019 public: 00024 MergeTable(int aNumPb, const std::string& aFileName); 00025 00027 ~MergeTable() { delete[] mPbDetectionAry; } 00028 00030 int getNumPassbands() const { return mNumPb; } 00031 00033 int getNumRecords() const { return mNumRecords; } 00034 00037 int getEntry(int aRecNo, int aPbNo) const 00038 { 00039 return mPbDetectionAry[aRecNo * mNumPb + aPbNo]; 00040 } 00041 00042 private: 00044 int* mPbDetectionAry; 00045 00047 int mNumPb; 00048 00050 int mNumRecords; 00051 00053 void read(const std::string& aFileName); 00054 }; 00055 //----------------------------------------------------------------------------- 00056 #endif