00001 
00002 
00004 #ifndef __TriggerPlot__
00005 #define __TriggerPlot__
00006 
00007 #include "GwollumPlot.h"
00008 #include "ReadTriggers.h"
00009 #include "TriggerSelect.h"
00010 #include "Date.h"
00011 #include "TF1.h"
00012 #include "TH1.h"
00013 #include "TH2.h"
00014 #include "TGraph.h"
00015 
00016 using namespace std;
00017 
00031 class TriggerPlot: public GwollumPlot, public ReadTriggers {
00032 
00033  public:
00034 
00047   TriggerPlot(const int aNcoll, const string aPattern, const string aDirectory="", const int aVerbose=0);
00048 
00052   virtual ~TriggerPlot(void);
00063   bool MakeCollections(const int aCollIndex=-1);
00064 
00072   bool PrintPlot(const string aPlotType, const int aCollIndex=0, const bool aFirst=true);
00073 
00082   bool PrintProcPlot(const string aPlotType, const string aProcType, const string aProcName, const vector<int> aCollIndexes, const bool aFirst=true);
00083 
00091   bool PrintPlots(const string aPlotType, const vector<int> aCollIndexes, const bool aFirst=true);
00092 
00098   bool PrintCollectionPlot(const string aPlotType);
00099 
00104   bool PrintCollectionPanel(void);
00105 
00113   TriggerSelect* GetCollectionSelection(const int aCollIndex=0);
00114 
00120   void SetDateFormat(const bool aDateFormat=true);
00121 
00128   bool SetCollectionLegend(const int aCollIndex, const string aLegend);
00129 
00135   bool SetCollectionColor(const int aCollIndex, const int aColorIndex);
00136 
00143   bool SetCollectionMarker(const int aCollIndex, const int aMarkerStyleIndex, const double aMarkerSizeIndex=1.0);
00144 
00145 
00157   bool SetCollectionUseClusters(const int aCollIndex, const int aUseClusters=1);
00158 
00163   int GetCollectionNClusters(const int aCollIndex);
00164 
00165  protected:
00166   
00167   
00168   TH2D   **Hfreqtime;                 
00169   TGraph **Gfreqtime;                 
00170   TGraph *Gfreqtimeloud;              
00171   TGraph *Gfreqtimeloud2;             
00172   TH2D   **Hsnrtime;                  
00173   TGraph **Gsnrtime;                  
00174   TH2D   **Hsnrfreq;                  
00175   TGraph **Gsnrfreq;                  
00176   TH1D   **Htime;                     
00177   TH1D   **Hfreq;                     
00178   TH1D   **Hsnr;                      
00179   TH1D   *Hproc;                      
00180  
00181   
00182   int Ncoll;                          
00183 
00184  private:
00185 
00186    
00187   void ResetCollection(const int aCollIndex);
00188 
00189   
00190   void ResetParameters(const int aCollIndex);
00191   TriggerSelect **CollectionParam;    
00192   int *Suseclusters;                  
00193   double TPlivetime;                  
00194 
00195   
00196   void ApplyStyle(const int aCollIndex);
00197   int    *TPcolor;                    
00198   double *TPmsize;                    
00199   int    *TPlsize;                    
00200   int    *TPmstyle;                   
00201   string *Slegend;                    
00202   bool Pusedate;                      
00203 
00204   TPave *SegBox;
00205   TPave **OnBox;
00206   int nonbox;
00207 
00208   ClassDef(TriggerPlot,0)  
00209 };
00210 
00211 #endif
00212 
00213