#ifndef flag_TCustomizedBrowser #define flag_TCustomizedBrowser //void run(); // General includes #include "TFile.h" #include "TTree.h" #include "TString.h" // #include "TBranch.h" #include "TCanvas.h" // #include "TPad.h" #include "TGaxis.h" #include "TStyle.h" #include "TH1D.h" #include "TH2D.h" #include "TH3D.h" #include "TF1.h" #include "TRandom.h" #include "TString.h" // #include "TGraph.h" // #include "TLegend.h" // #include "TPaveText.h" #include "TArrayI.h" #include "TArrayD.h" // Specific includes of the Browser #include "TGClient.h" #include "TGButton.h" #include "TGFrame.h" #include "TGTextEntry.h" #include "TRootEmbeddedCanvas.h" #include "RQ_OBJECT.h" #include "TROOT.h" //#include "Pedestal.hh" class TCustomizedBrowser : public TGMainFrame { private: TString filename; // after_pede_subtr after; // // General data. // //TRestConfig *conf; ///< Pointer to the config file. // Int_t fNFile; ///< File number. Int_t fNStrips; ///< Number of strips Int_t fNEvent; ///< Event number. Int_t fCurrentEvent; // Int_t fIfCompress; ///< If data is compressed. Int_t fNEventsInFile; ///< Number of events in the file. // Int_t fIfPulses; ///< If pulses are plotted. // // Int_t fNBins; ///< Number of bins for 2D histogrammes. // TArrayI f2DOrder; ///< ASiC order in 2D plots. // // Double_t fThreshold; ///< Threshold to plot a pulse. // TArrayI fDecode; ///< Decoding array. // // // List options. // Int_t fNListValues; ///< Number of list values. Int_t fListPos; ///< Actual list position. // Int_t fListValue; ///< Actual list value. Int_t fIfList; ///< If list of events is loaded. Int_t fIfChangeList; ///< If a change in list option was made. Int_t fListStart; ///< First event of the actual file. Int_t fListEnd; ///< Last event of the actual file. // // // Data loaded from each event TFile *fXY; ///< XY events file. // TFile *flist; ///< Analysis list file. TTree *treeXY; ///< Tree for loading XY events. // TTree *treelist; ///< Tree of an analysis list. TBranch *branXY; ///< Branch for loading X events. // TBranch *branlist; ///< Branch of an analysis list. // T2KEvent *t2kev; ///< A T2K event. // T2KCEvent *t2kcev; ///< A compressed T2K event. // // // Browser variables. TRootEmbeddedCanvas *fEcanvas; ///< Browser canvas. TGHorizontalFrame *fHFrame; ///< Horizontal frame. // TGTextEntry *fEntRun; ///< Run number. // TGTextEntry *fEntFile; ///< File number. TGTextEntry *fEntEven; ///< Event number. // TGTextEntry *fEntThre; ///< Pulse threshold. TGTextButton *fButList; ///< Analysis list button. TGTextButton *fButPrev; ///< Previous event button. TGTextButton *fButNext; ///< Next event button. TGTextButton *fButDraw; ///< Draw button. TGTextButton *fButExit; ///< Exit button. // // // Canvas and graphs. TCanvas *fCanvas; //! ///< Canvas TCanvas **ca; // TCanvas **c2d; //! ///< 2D canvas. // TGraph **fa; //! ///< Graphs with the strips. //TH2D **h2d; //! ///< 2D histogrammes. TH1D *hx; TH1D *hy; TH1D *hx1; TH1D *hy1; float x_p[500]; float y_p[500]; float zz[2]; // public: // char *rootname; // TString filename; /// Constructor. TCustomizedBrowser(TString); /// Destructor ~TCustomizedBrowser(); // // // Files management. void LoadFile(TString); ///< A root file is loaded. void CloseFile(); ///< A T2K events file is closed. // void LoadAnaListFile(); ///< An analysis list file is loaded. // void CloseAnaListFile(); ///< An analysis list file is closed. // // // Browser methods. void CreateCanvas(); ///< Canvas is created. void DefineButtons(); ///< Buttons are defined. // void CheckAction(); ///< It is check if analysis must be loaded. void PrevAction(); ///< Set previous event. // void NextAction(); ///< Set next event. // void DrawAction(); ///< Draw according user. void PlotEvent(int); ///< Plot event. void Initialize(); /// < Initialize the pedestal values // void PlotT2KCEvent(); ///< Plot T2K compressed event. // ClassDef(TCustomizedBrowser,1); ///< TCustomizeBrowser dictionary }; // // Structures for reading T2K events. //_____________________________________________________________________________ /// Event header structure. struct after_pede_subtr{ float gamma_flash_time; int segment; int idelev; int num_TH; float mesh_time; float mesh_width; float mesh_amp; float mesh_area; float mesh_baseline; float mesh_sigma_baseline; float X_time_start; float X_time_end; float Y_time_start; float Y_time_end; float X_amp_ps[500]; float X_amp_offset[500]; float X_amp_offset_th[500]; float Y_amp_ps[500]; float Y_amp_offset[500]; float Y_amp_offset_th[500]; int X_strip_nb[500]; int Y_strip_nb[500]; int mult_X_above_th; int mult_Y_above_th; float X_mean_bef; float Y_mean_bef; float X_mean_aft; float Y_mean_aft; }; //after_pede_subtr after; #endif