00001
00002
00003
00004 #ifndef FROOT_TFndSCCshowHistos
00005 #define FROOT_TFndSCCshowHistos
00006
00007 #include <Riostream.h>
00008 #include "TROOT.h"
00009 #include "TSystem.h"
00010 #include "TApplication.h"
00011
00012 #include "TFndGraphs.h"
00013
00017 #include "TThread.h"
00018
00019 #include "TFile.h"
00020 #include "TTree.h"
00021 #include "TCanvas.h"
00022 #include "TStyle.h"
00023 #include "TH2.h"
00024 #include "TH3F.h"
00025
00026 #include "TFndSCCMan.h"
00027
00028 #include "FROOT.h"
00029 using namespace FROOT;
00030
00031 class TFndSCCshowHistos: public TFndSCCMan{
00032
00033 public:
00034
00035 enum E_SCC_Power {
00036 E_SCC_PW_ON = 1,
00037 E_SCC_PW_OFF = 0,
00038 E_SCC_PW_DN = -1,
00039 };
00040
00041 enum E_SCC_status {
00042 E_SCC_status_ok = 1,
00043 E_SCC_status_warning = 2,
00044 E_SCC_status_error = 3,
00045 };
00046
00047 enum E_SCC_HisMod_VI {
00048 E_SccHisMod_Avail = 0,
00049 E_SccHisMod_PW = 1,
00050 E_SccHisMod_V = 2,
00051 E_SccHisMod_I = 3,
00052 E_SccHisMod_Trip = 4,
00053 E_SccHisMod_Stat = 5,
00054 E_SccHisMod_End = 6
00055 };
00056
00057 Int_t fCurNbins;
00058 Float_t fCurBinW;
00059
00060 protected:
00061
00062 TFndGraph *fHP_Tofi[E_SccHisMod_End][2][K_N_TOFINO_SLABS];
00063 TFndGraph *fHP_Tofo[E_SccHisMod_End][2][K_N_TOFONE_SLABS];
00064
00065
00066
00067 TFndGraph *fHP_Osim[E_SccHisMod_End][K_N_Sil_Modules][K_N_Sil_Sides][2];
00068 TFndGraph *fHP_Isim[E_SccHisMod_End][K_N_Sil_Modules-2][K_N_Sil_Sides][2];
00069
00070
00071 TFndGraph *fHP_LmdInn[E_SccHisMod_End][K_N_LMD_CHAMS_PER_LAYER][2];
00072 TFndGraph *fHP_LmdOut[E_SccHisMod_End][K_N_LMD_CHAMS_PER_LAYER][2];
00073
00074 TFndGraph *fHP_Stb[E_SccHisMod_End][192];
00075
00076
00077 TString GetHisMod(Int_t mod){
00078 switch (mod){
00079 case (Int_t)(E_SccHisMod_Avail): return "Available";
00080 case (Int_t)(E_SccHisMod_PW): return "Power";
00081 case (Int_t)(E_SccHisMod_V): return "Voltage";
00082 case (Int_t)(E_SccHisMod_I): return "Current";
00083 case (Int_t)(E_SccHisMod_Trip): return "Trip";
00084 case (Int_t)(E_SccHisMod_Stat): return "Status";
00085 default:
00086 Error("GetHisMod","Wrong call: mod \"%d\" not available",mod);
00087 return "??????";
00088 }
00089 return 0;
00090 }
00091
00092 private:
00093 void SetFndTimeGraphProperties(TFndGraph *prof,const Int_t &mod);
00094
00095 public:
00096
00097 TFndSCCshowHistos();
00098 ~TFndSCCshowHistos();
00099
00100
00101 virtual void ReceivedEvent(Int_t slow_det,Int_t part)
00102 {
00103 Error("ReceivedEvent","...should not read this message...check your code!");
00104 slow_det=0; part=0;
00105 }
00106
00107 virtual void ScheduledOperationPerformed(E_SCC_MAN_GuiComm_t oper,Bool_t UpdateTime = kFALSE)
00108 {
00109 Error("ScheduledOperationPerformed","...should not read this message...check your code!");
00110 oper= E_SCC_MAN_GuiComm_Idle; UpdateTime=0;
00111 }
00112
00113
00114 void InitHistos();
00115 void DeleteHistos();
00116 void ResetHistos(Bool_t recreate=kTRUE);
00117 void FillHistos(const UInt_t &stop_datime,Bool_t tofi=kFALSE,Bool_t tofo=kFALSE,Bool_t sil=kFALSE,Bool_t lmd=kFALSE,Bool_t stb=kFALSE,Bool_t gas=kFALSE,Bool_t mag=kFALSE);
00118
00119 void WriteHistosToFile(const TString &fnam,Bool_t tofi=kTRUE,Bool_t tofo=kTRUE,Bool_t sil=kTRUE,Bool_t lmd=kTRUE,Bool_t stb=kTRUE,Bool_t gas=kTRUE,Bool_t mag=kTRUE);
00120 void LoadHistosFromFile(const TString &fnam,Bool_t tofi=kTRUE,Bool_t tofo=kTRUE,Bool_t sil=kTRUE,Bool_t lmd=kTRUE,Bool_t stb=kTRUE,Bool_t gas=kTRUE,Bool_t mag=kTRUE);
00121
00122
00123 friend class TFndSCCshowGUI;
00124
00125 ClassDef(TFndSCCshowHistos,1)
00126 };
00127
00128
00129 #endif // FROOT_TFndSCCshowHistos