NumDetectors.hxx
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #ifndef NUMDETECTORS_H
00008 #define NUMDETECTORS_H
00009
00010 #include "DataMethod.hxx"
00011 #include "FitsFile.h"
00012
00018 template<typename DataType>
00019 class NumDetectors : public DataMethod<DataType>
00020 {
00021 public:
00023 NumDetectors(const FitsFile& aFile)
00024 : mNum(aFile.getNumHdus() - 1)
00025 { DataMethod<DataType>::methodName = "NumDetectors"; }
00026
00028 virtual ~NumDetectors() { }
00029
00031 void setSource(IntMap& tbls, IntMap& cols, StringMap units) { }
00032
00034 void setTarget(IntMap& cols, StringMap units) { colNo = cols[0]; }
00035
00037 void doit(TableData<DataType>& data, int row1, int row2)
00038 {
00039 for (int rowNo = row1; rowNo < row2; ++rowNo)
00040 {
00041 data.assign(colNo, rowNo, mNum);
00042 }
00043 }
00044
00045
00046 void doit2(TableData<DataType>& rawData, TableData<DataType>& data, int row1, int row2) { }
00047
00048 private:
00049 int colNo;
00050 int mNum;
00051 };
00052
00053 #endif
00054
00055
00056
00057
00058