TOF/TFndTofMonFrame.h

00001 // @(#)fROOT/TOF:$Name:  $:$Id: TFndTofMonFrame.h,v 1.11 2007/09/05 12:02:53 Diego_Faso Exp $
00002 // Revision Author: Diego Faso <mailto:faso@to.infn.it>, 2005/06/24
00003 // Original Author: Piergiorgio Cerello <mailto:cerello@to.infn.it>, 2000
00004 
00005 #ifndef FROOT_TFndTofMonFrame
00006 #define FROOT_TFndTofMonFrame
00007 
00009 //                                                //
00010 //               TFndTofMonFrame                  //
00011 //                                                //
00012 //  Class for the TOF monitoring GUI              //
00013 //  (see Gts relative class for descriptions)     //
00014 //                                                //
00015 //                                                //
00017 
00018 #include "FROOT.h"
00019 
00020 //#include <string.h>
00021 #include <Riostream.h>
00022 #include "TObject.h"
00023 //#include "TBrowser.h"
00024 #include "TString.h"
00025 #ifdef _FND_ONL_USE_MAP_FILES_
00026 #include "TMapFile.h"
00027 #endif
00028 #include "TFile.h"
00029 #include "TCanvas.h"
00030 #include "TButton.h"
00031 #include "TH2.h"
00032 #include "TH1.h"
00033 #include "TObjArray.h"
00034 
00035 #include "TFndMonFrame.h"
00036 
00037 class TFndTofMonFrame : public TFndMonFrame {
00038 
00039 private:
00040 
00041   Int_t fIO;
00042   Int_t fCurSlab;
00043   Int_t fNSlabs[2]; // depending on the layer: [inner(tofino),outer(tofone)]
00044 
00045 #if defined _FND_ONL_USE_MAP_FILES_
00046   TMapFile *fGenMapFile; // shared memory
00047   TMapFile *fAdcMapFile; // shared memory
00048   TMapFile *fTdcMapFile; // shared memory
00049 #elif defined _FND_ONL_USE_SHARED_FILES_
00050   TFile *fGenMapFile; // shared memory
00051   TFile *fAdcMapFile; // shared memory
00052   TFile *fTdcMapFile; // shared memory
00053 #endif
00054 
00055   TPad *fSlabPad[5]; // Pads for slab selection buttons
00056   TPad  *fAllPad[2]; // bottom pad (general histograms) - tofino only
00057 
00058   TButton *fSlabButton[84]; // first 12 for tofino
00059   TButton *fAllButton[9];   // tofino only
00060 
00061   TH1F *hists; // temporary histogram
00062   TH2F *h2;    // temporary histogram
00063 
00064   Int_t fWhichGroup; // needed by the automatic refresh
00065   Int_t fAllId; // needed by the automatic refresh
00066 
00067  private:
00068 
00069   void Init();
00070   void DrawButtons();
00071   void ResetFrameColors();
00072   void DrawHist(Int_t opt, Int_t flg=0, Char_t *DrawOpt="");
00073 
00074  public:
00075 
00076   TFndTofMonFrame(TString filename=0);
00077   ~TFndTofMonFrame();
00078   void Open();
00079   void Close();
00080   Bool_t ReloadMapFiles(); // return true if map-files were found
00081 
00082   Bool_t StartInterface(Int_t ring);
00083   void SelectSlab(Int_t s);
00084   void DisplayMaps();
00085   void DisplayHist();
00086   void DisplayAllHist(Int_t io, Int_t option);
00087   TButton *HighlightButtons(Int_t which_group,Int_t All_id=0);
00088   void RefreshSingleMonView();
00089   
00090   ClassDef(TFndTofMonFrame,0)  // GUI for the TOF monitor
00091 };
00092 #endif // FROOT_TFndTofMonFrame
00093 
00094 
00095 
00096 
00097 
00098 
00099 
00100 
00101 
00102 
00103 
00104 
00105 
00106 
00107 
00108 
00109 
00110 
00111 
00112 
00113 

Generated on Tue Oct 16 15:40:48 2007 by  doxygen 1.5.2