00001
00002
00004 #ifndef __ffl__
00005 #define __ffl__
00006
00007 #include "ReadAscii.h"
00008 #include "GwollumPlot.h"
00009 #include "Segments.h"
00010 #include "TGraph.h"
00011 #include "FrameL.h"
00012 #include "FrVect.h"
00013
00014 using namespace std;
00015
00033 class ffl {
00034
00035 public:
00036
00048 ffl(const string aFrameFileList, const string aPlotStyle="GWOLLUM", const int aVerbosity=0);
00049
00053 virtual ~ffl(void);
00063 void SetName(const string aName);
00064
00072 bool DefineTmpDir(const string aTmpDirPath=".");
00073
00082 bool LoadFrameFile(void);
00083
00099 double* GetData(int &aSize, const string channel_name, const double gps_start, const double gps_end);
00100
00109 bool PrintAsciiData(const string channel_name, const double gps_start, const double gps_end, string outputfilename);
00110
00118 TGraph* PlotData(const string channel_name, const double gps_start, const double gps_end);
00119 TGraph* PlotData2(const string channel_name1, const string channel_name12, const double gps_start, const double gps_end);
00120
00128 TGraph* PlotDerivative(const string channel_name, const double gps_start, const double gps_end);
00129
00136 string Convert2Ffl(void);
00137
00144 bool ExtractChannels(const int gps=0);
00145
00153 int GetChannelSampling(const string channel_name);
00154
00159 inline Segments* GetSegments(void){ return seg; }
00160
00164 void Reset(void);
00165
00173 inline void PrintChannels(const int gps=0){
00174 LoadFrameFile();
00175 ExtractChannels(gps);
00176 for(int l=0; l<(int)channels.size(); l++) cout<<channels[l]<<" "<<sampling[l]<<endl;
00177 };
00181 inline string GetInputFfl(void){ return fInFrameFile; };
00182
00183 private:
00184
00185 bool status_OK;
00186 string fInFrameFile;
00187 string fWoFrameFile;
00188 string fFormat;
00189 int fVerbosity;
00190 string tmpdir;
00191 string srandint;
00192
00193 vector<double> start;
00194 vector<double> stop;
00195 vector<string> ffile;
00196 Segments *seg;
00197 FrFile *frfile;
00198 vector <string> channels;
00199 vector <int> sampling;
00200
00201
00202 GwollumPlot *GP;
00203 TGraph *G;
00204
00205 bool CheckFFL(void);
00206
00207 ClassDef(ffl,0)
00208
00209 };
00210
00211 #endif
00212
00213