00001
00002
00004 #ifndef __EventMap__
00005 #define __EventMap__
00006
00007 #include "GwollumPlot.h"
00008 #include "ReadTriggers.h"
00009 #include "TH2.h"
00010
00011
00012 #define NMAP 4 // number of maps
00013
00014 using namespace std;
00015
00016 class EventMap: public GwollumPlot, public ReadTriggers {
00017
00018 public:
00019
00020 EventMap(const string apattern, const string adirectory="",
00021 const int averbose=0);
00022 virtual ~EventMap(void);
00023
00024
00025 bool BuildMap(const int mapindex,const double gps);
00026 bool BuildClusterMap(const int mapindex, const int clst);
00027 TH2D* GetMap(const int mapindex);
00028 bool PrintMap(const int mapindex, const string outfile="NONE");
00029 bool LiveMap(const int mapindex, const double gps_start, const double gps_end, const string outfile="NONE");
00030 bool DisplayClusterMaps(const int mapindex, const double gps_start=-1, const double gps_end=1e20, const int speed=0, const string outfile="NONE");
00031
00032
00033 double GetMapLoudestSNR(const int mapindex);
00034 double GetMapLoudestTime(const int mapindex);
00035 double GetMapLoudestFrequency(const int mapindex);
00036
00037
00038 double GetMatch(const int mapindex1, const int mapindex2,
00039 const double SNRThr=0);
00040 bool NormalizeMap(const int mapindex);
00041
00042
00043 bool SetMapParameters(const int mapindex,
00044 const int TimeRes, const int FreqRes,
00045 const double FreqMin, const double FreqMax,
00046 const double Q_Min, const double Q_Max,
00047 const double TimeRange);
00048 bool SetMapResolution(const int mapindex,
00049 const int TimeRes, const int FreqRes);
00050 bool SetMapFrequencyRange(const int mapindex,
00051 const double FreqMin, const double FreqMax);
00052 bool SetMapTimeRange(const int mapindex,
00053 const double TimeRange);
00054 bool SetMapQRange(const int mapindex,
00055 const double Q_Min, const double Q_Max);
00056
00057 private:
00058
00059
00060 bool ResetMap(const int mapindex);
00061 TH2D *Map[NMAP];
00062 string MapName[NMAP];
00063 int Ntbins[NMAP];
00064 int Nfbins[NMAP];
00065 double Trange[NMAP];
00066 double Fmin[NMAP];
00067 double Fmax[NMAP];
00068 double Qmin[NMAP];
00069 double Qmax[NMAP];
00070 double *t_bin[NMAP];
00071 double *f_bin[NMAP];
00072 int Ntbins_0;
00073 int Nfbins_0;
00074 double Trange_0;
00075 double Fmin_0;
00076 double Fmax_0;
00077 double Qmin_0;
00078 double Qmax_0;
00079 double MapSNR[NMAP];
00080 double MapFreq[NMAP];
00081 double MapTime[NMAP];
00082 double MapLoudestTile[NMAP];
00083
00084
00085
00086
00087
00088
00089 ClassDef(EventMap,0)
00090 };
00091
00092 #endif
00093
00094