LMD/TFndLmdMonFrame.h

00001 // @(#)fROOT/LMD:$Name:  $:$Id: TFndLmdMonFrame.h,v 1.10 2007/09/05 10:00:29 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>
00004 
00005 #ifndef FROOT_TFndLmdMonFrame
00006 #define FROOT_TFndLmdMonFrame
00007 
00009 //     GUI Monitor frame for the FINUDA Low Mass Drift Chambers' monitoring                //
00010 //                                                                                         //
00011 //                                                                                         //
00012 //  - Both online and offline mode are available (se constructors)                         //
00013 //  - Shared memories (TMapFile) are used for the online monitoring, while the "offline"   //
00014 //    histogram filling reads files directly (files are produced by the "geb2hdt" macro).  //
00015 //                                                                                         //
00016 //   (see GTS relative class for descriptions)                                             //
00017 //                                                                                         //
00019 
00020 #include "FROOT.h"
00021 
00022 #include <string.h>
00023 #include <Riostream.h>
00024 #include "TObject.h"
00025 #include "TBrowser.h"
00026 #include "TString.h"
00027 #ifdef _FND_ONL_USE_MAP_FILES_
00028 #include "TMapFile.h"
00029 #endif
00030 #include "TFile.h"
00031 #include "TButton.h"
00032 #include "TH1.h"
00033 #include "TH2.h"
00034 #include "TFndMonFrame.h"
00035 
00036 class TCanvas;
00037 class TPad;
00038 
00039 class TFndLmdMonFrame : public TFndMonFrame {
00040 
00041 private:
00042 
00043   Int_t fNWires; // current number of wires (depending on the selected chamber)
00044   Int_t fIO;     // Layer (0:inner ; 1:outer)
00045   Int_t fdch;    // Drift CHamber number [1,8]
00046   Int_t fwir;    // Wire number [1,12] or [1,22] (depending on the layer)
00047   
00048 #if defined _FND_ONL_USE_MAP_FILES_
00049   TMapFile *maps;
00050   TMapFile *iadc;
00051   TMapFile *itdc;
00052   TMapFile *oadc;
00053   TMapFile *otdc;
00054 #elif defined _FND_ONL_USE_SHARED_FILES_
00055   TFile *maps;
00056   TFile *iadc;
00057   TFile *itdc;
00058   TFile *oadc;
00059   TFile *otdc;
00060 #endif
00061 
00062   TPad     *fInnPad;    // Pad for inner layer chamber selection buttons
00063   TPad     *fOutPad;    // Pad for outer layer chamber selection buttons
00064   TPad     *fMultPad;   // Pad for pedestal buttons (bottom-left)
00065   TPad     *fWirePad;   // Pad for wire selection buttons
00066   TPad     *fAllPad;    // Pad for general histograms buttons (bottom)
00067 
00068   TButton  *fChSelBut[16];
00069   TButton  *fAllButton[11];
00070 
00071   TButton  *fWireBut[23];
00072   TButton  *zoombutton[4];
00073 
00074   TH1F *fhists; 
00075   TH2F *h2; 
00076   TH1D *sly; 
00077 
00078   Int_t fWhichGroup; // needed by the automatic refresh
00079   Int_t fAllId; // needed by the automatic refresh
00080   
00081   // ---
00082   
00083   void ResetFrameColors();
00084   void DrawButtons();
00085   void DrawHist(Int_t opt, Int_t flg=0,Char_t *DrawOpt="");
00086 
00087  private:
00088   void Init();
00089 
00090  public:
00091 
00092   TFndLmdMonFrame(TString filename=0);
00093   ~TFndLmdMonFrame();
00094   void Open();
00095   void Close();
00096   Bool_t ReloadMapFiles(); // return true if map-files were found
00097 
00098   Bool_t StartInterface();
00099   TButton *HighlightButtons(Int_t which_group,Int_t All_id=0);
00100   void RefreshSingleMonView();
00101 
00102   void RebuildWirePad();
00103   void DrawWirePad();
00104   void SelectWire(Int_t w){ fwir=w; }
00105   void SelectChamber(Int_t io, Int_t d);
00106   
00107   void DisplayMaps();
00108   void DisplayHist();
00109   void DisplayAllHist(Int_t io, Int_t option);
00110   
00111   ClassDef(TFndLmdMonFrame,0)    // Module Histograms
00112 };
00113 #endif // FROOT_TFndLmdMonFrame

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