00001
00002
00004 #ifndef __TriggerPlot__
00005 #define __TriggerPlot__
00006
00007 #include "GwollumPlot.h"
00008 #include "ReadTriggers.h"
00009 #include "Date.h"
00010 #include "TH1.h"
00011 #include "TH2.h"
00012 #include "TGraph.h"
00013
00014 #define NPLOTMAX 10
00015
00016 using namespace std;
00017
00019 class TriggerPlot: public GwollumPlot, public ReadTriggers {
00020
00021 public:
00022
00023 TriggerPlot(const string apattern, const string adirectory="", const int averbose=0);
00024 virtual ~TriggerPlot(void);
00025
00026
00027 bool Plot(const string PlotType, const string PlotIndexes="0", const string outfile="NONE", bool aPlotLegend = false);
00028 bool OmicronPlot(const string PlotType, const int aTMin=-1, const int aTMax=-1, const string outfile="NONE");
00029 TObject* GetPlot(const string PlotType, const int index);
00030
00031 void TriggersHaveChanged(void);
00032
00033
00034 int GetNTrigPlot(const int index);
00035 double GetSNRMaxPlot(const int index);
00036 double GetSNRMinPlot(const int index);
00037 double GetFreqMaxPlot(const int index);
00038 double GetFreqMinPlot(const int index);
00039 double GetTimeSNRMaxPlot(const int index);
00040 double GetFreqSNRMaxPlot(const int index);
00041
00042
00043
00044 bool SetTriggerParameters(const int index,
00045 const double aFreqMin, const double aFreqMax,
00046 const int aTMin, const int aTMax,
00047 const double aSNRThr, const int aUseCluster);
00048 bool SetTriggerFrequencyRange(const int index,
00049 const double aFreqMin, const double aFreqMax);
00050 bool SetTriggerTimeRange(const int index,
00051 const int aTMin, const int aTMax);
00052 bool SetTriggerSNRThr(const int index, const double aSNRThr);
00053 bool SetUseCluster(const int index, const int aUseCluster);
00054 bool SetTitlePrefix(const string aPrefix);
00055 bool SetDateFormat(const int index, const bool aDate);
00056 bool SetLegend(const int index, const string aLegend);
00057
00058 private:
00059
00060
00061 bool MakePlots(const int index);
00062 int Wcolors[NPLOTMAX];
00063 double Wsizes[NPLOTMAX];
00064
00065
00066 string SegName[NPLOTMAX];
00067 TH1I *SegPlot[NPLOTMAX];
00068
00069
00070 string RateName[NPLOTMAX];
00071 TH1D *Rate[NPLOTMAX];
00072
00073
00074 string DistName[NPLOTMAX];
00075 TH1D *H_freq[NPLOTMAX];
00076 TH1D *H_snr[NPLOTMAX];
00077 TH1D *H_snrcumul[NPLOTMAX];
00078 TH1D *H_dur[NPLOTMAX];
00079
00080
00081 string MapName[NPLOTMAX];
00082 TH2D *HMap[NPLOTMAX];
00083 TGraph *Map[NPLOTMAX];
00084 TGraph *Map2[NPLOTMAX];
00085
00086
00087 TH2D *HSNRFreq[NPLOTMAX];
00088 TGraph *SNRFreq[NPLOTMAX];
00089 TGraph *SNRFreq2[NPLOTMAX];
00090
00091
00092 TH2D *HSNRDur[NPLOTMAX];
00093 TGraph *SNRDur[NPLOTMAX];
00094 TGraph *SNRDur2[NPLOTMAX];
00095
00096
00097 TH2D *HSNRTime[NPLOTMAX];
00098 TGraph *SNRTime[NPLOTMAX];
00099 TGraph *SNRTime2[NPLOTMAX];
00100
00101
00102 bool ResetPlot(const int index);
00103 int Ntbins;
00104 int Nfbins;
00105 int Nsbins;
00106 double *t_bin;
00107 double *f_bin[NPLOTMAX];
00108 double *s_bin[NPLOTMAX];
00109 bool newpara[NPLOTMAX];
00110 bool dateformat;
00111 double OmSNR[4];
00112 string s_OmSNR[4];
00113
00114
00115 string legends[NPLOTMAX];
00116 string titleprefix;
00117
00118
00119 int Tmin;
00120 int Tmax;
00121 string sTmin;
00122 string TminDate;
00123 int TminOffset;
00124 double Fmin[NPLOTMAX];
00125 double Fmax[NPLOTMAX];
00126 double SnrThr[NPLOTMAX];
00127 int usecl[NPLOTMAX];
00128
00129
00130
00131
00132
00133 int p_n[NPLOTMAX];
00134 double p_snrmax[NPLOTMAX];
00135 double p_snrmin[NPLOTMAX];
00136 double p_freqmax[NPLOTMAX];
00137 double p_freqmin[NPLOTMAX];
00138 double p_timesnrmax[NPLOTMAX];
00139 double p_freqsnrmax[NPLOTMAX];
00140
00141 ClassDef(TriggerPlot,0)
00142 };
00143
00144 #endif
00145
00146