DegToH.hxx

Go to the documentation of this file.
00001 
00002 
00003 
00004 //-----------------------------------------------------------------------------
00005 // CVS: $Revision: 6327 $, $Date: 2009-11-10 18:05:07 +0000 (Tue, 10 Nov 2009) $, $Author: EckhardSutorius $
00006 //-----------------------------------------------------------------------------
00007 #ifndef DEGTOH_H
00008 #define DEGTOH_H
00009 
00010 #include <string>
00011 
00012 #include "Constants.h"
00013 #include "DataMethod.hxx"
00014 //-----------------------------------------------------------------------------
00016 template<typename DataType>
00017 class DegToH : public DataMethod<DataType>
00018 {
00019 public:
00021   DegToH(){ DataMethod<DataType>::methodName = "DegToH"; }
00022 
00024   virtual ~DegToH() { }
00025 
00027   void setSource(IntMap& tbls, IntMap& cols, StringMap units)
00028   {
00029     raColNo = cols[0];
00030     if (raColNo < 0)
00031     {
00032       throw DataMethodException("DegToH method. Couldn't source");
00033     }
00034   }
00035 
00037   void setTarget(IntMap& cols, StringMap units) { mColNo = cols[0]; }
00038 
00040   void doit(TableData<DataType>& data, int row1, int row2)
00041   {
00042     for (int rowNo = row1; rowNo < row2; ++rowNo)
00043     {
00044       double radeg;
00045       data.value(raColNo, rowNo, radeg);
00046       double rah = radeg/15.;
00047       
00048       data.assign(mColNo, rowNo, rah);
00049     }
00050   }
00051 
00052   // No data from raw data included
00053   void doit2(TableData<DataType>& rawData, TableData<DataType>& data, int row1, int row2) { }
00054 
00055 private:
00056   int raColNo;
00057   int mColNo;
00058 };
00059 //-----------------------------------------------------------------------------
00060 #endif
00061 //-----------------------------------------------------------------------------
00062 // Change log:
00063 //
00064 // 05-Nov-2009,  ETWS: Original version.
Generated on Mon Oct 4 10:38:34 2010 for WfcamSrc by  doxygen 1.6.3