NumDetectors.hxx

Go to the documentation of this file.
00001 
00002 
00003 
00004 //-----------------------------------------------------------------------------
00005 // CVS: $Revision: 4785 $, $Date: 2008-05-20 14:19:36 +0100 (Tue, 20 May 2008) $, $Author: RossCollins $
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   // No data from raw data included
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 // Change log:
00056 //
00057 // 27-May-2004,  IAB: Original version.
00058 //  7-Apr-2008, ETWS: Upgraded to use new detection table layout.
Generated on Mon Oct 4 10:38:34 2010 for WfcamSrc by  doxygen 1.6.3