mtugood.cpp

Go to the documentation of this file.
00001 #include <iostream>
00002 #include "MtuFormat.h"
00003 #include "Util.h"
00004 
00005 using namespace std;
00006 using namespace gplib;
00007 
00008 string version = "$Id: mtugood.cpp 1816 2009-09-07 11:28:35Z mmoorkamp $";
00009 
00010 /*!
00011  * \addtogroup UtilProgs Utility Programs
00012  *@{
00013  * \file
00014  * Remove the "bad" flag from all records of a Phoenix mtu time-series. 
00015  */
00016 
00017 void WriteInfoAndAsk(string &infilename, string &outfilename)
00018   {
00019     cout << "This is mtugood: mark all records of  Phoenix time series as good"
00020         << endl << endl;
00021     cout << " Usage: mtugood infilename outfilename ! " << endl;
00022     cout
00023         << " If no outfilename given ending '.good'  will be automatically appended to infilename"
00024         << endl << endl;
00025     cout << " This is Version: " << version << endl << endl;
00026     infilename = AskFilename("Infilename: ");
00027     outfilename = infilename + ".good";
00028   }
00029 
00030 int main(int argc, char *argv[])
00031   {
00032     string infilename, outfilename;
00033     switch (argc)
00034       {
00035     case 2:
00036       infilename = argv[1];
00037       outfilename = string(argv[1]) + ".good";
00038       break;
00039     case 3:
00040       infilename = argv[1];
00041       outfilename = argv[2];
00042       break;
00043     default:
00044       WriteInfoAndAsk(infilename, outfilename);
00045       break;
00046       }
00047     MtuFormat Data;
00048     Data.GetData(infilename);
00049     Data.MakeGood();
00050     Data.WriteData(outfilename);
00051   }
00052 /*@}*/

Generated on Tue May 4 16:52:14 2010 for GPLIB++ by  doxygen 1.5.8