FileTimeStamp.hxx
Go to the documentation of this file.00001
00002
00003
00004
00005
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
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
00060
00061
00062