FileTimeStamp.hxx

Go to the documentation of this file.
00001 
00002 
00003 
00004 //-----------------------------------------------------------------------------
00005 // CVS: $Revision: 6286 $, $Date: 2009-11-06 09:47:45 +0000 (Fri, 06 Nov 2009) $, $Author: EckhardSutorius $
00006 //-----------------------------------------------------------------------------
00007 #ifndef FILETIMESTAMP_H
00008 #define FILETIMESTAMP_H
00009 
00010 #include <string>
00011 
00012 #include "DataMethod.hxx"
00013 #include "DataOps.h"
00014 #include "FitsFile.h"
00015 //-----------------------------------------------------------------------------
00017 template<typename DataType>
00018 class FileTimeStamp : public DataMethod<DataType>
00019 {
00020 public:
00022   FileTimeStamp(const FitsFile& aFile)
00023   {
00024     DataMethod<DataType>::methodName = "FileTimeStamp";
00025     mTimeStamp = DataOps::getFileTimeStamp(aFile);
00026   }
00027 
00029   virtual ~FileTimeStamp() {}
00030 
00032   void setSource(IntMap& tbls, IntMap& cols, StringMap units) { }
00033 
00035   void setTarget(IntMap& cols, StringMap units)
00036   {
00037     colNo = cols[0];
00038   }
00039 
00041   void doit(TableData<DataType>& data, int row1, int row2)
00042   {
00043     for (int rowNo = row1; rowNo < row2; ++rowNo)
00044     {
00045       data.assign(colNo, rowNo, mTimeStamp);
00046     }
00047   }
00048 
00049   // No data from raw data included
00050   void doit2(TableData<DataType>& rawData, TableData<DataType>& data, int row1, int row2) { }
00051 
00052 private:
00053   int colNo;
00054   std::string mTimeStamp;
00055 };
00056 //-----------------------------------------------------------------------------
00057 #endif
00058 //-----------------------------------------------------------------------------
00059 // Change log:
00060 //
00061 // 21-Apr-2005, ETWS: Original version.
00062 //  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