FileName.hxx

Go to the documentation of this file.
00001 
00002 
00003 
00004 //-----------------------------------------------------------------------------
00005 // CVS: $Revision: 4695 $, $Date: 2008-04-09 16:18:42 +0100 (Wed, 09 Apr 2008) $, $Author: EckhardSutorius $
00006 //-----------------------------------------------------------------------------
00007 #ifndef FILENAME_H
00008 #define FILENAME_H
00009 
00010 #include <string>
00011 
00012 #include "DataMethod.hxx"
00013 #include "FitsFile.h"
00014 #include "Options.h"
00015 //-----------------------------------------------------------------------------
00017 template<typename DataType>
00018 class FileName : public DataMethod<DataType>
00019 {
00020 public:
00022   FileName(const FitsFile& aFile)
00023   {
00024     DataMethod<DataType>::methodName = "FileName";
00025     Options options;
00026     mFileName = options.getServerName() + ":" + aFile.getFileName();
00027   }
00028 
00030   virtual ~FileName() { }
00031 
00033   void setSource(IntMap& tbls, IntMap& cols, StringMap units) { }
00034 
00036   void setTarget(IntMap& cols, StringMap units)
00037   {
00038     colNo = cols[0];
00039   }
00040 
00042   void doit(TableData<DataType>& data, int row1, int row2)
00043   {
00044     for (int rowNo = row1; rowNo < row2; ++rowNo)
00045     {
00046       data.assign(colNo, rowNo, mFileName);
00047     }
00048   }
00049 
00050   // No data from raw data included
00051   void doit2(TableData<DataType>& rawData, TableData<DataType>& data, int row1, int row2) { }
00052 
00053 private:
00054   int colNo;
00055   std::string mFileName;
00056 };
00057 //-----------------------------------------------------------------------------
00058 #endif
00059 //-----------------------------------------------------------------------------
00060 // Change log:
00061 //
00062 // 27-May-2004,  IAB: Original version.
00063 //  7-Apr-2008, ETWS: Upgraded to use new detection table layout.

Generated on Thu Apr 2 21:52:16 2009 for WfcamSrc by  doxygen 1.5.2