File indexing completed on 2025-07-14 08:14:51
0001 #ifndef EventDisplay_H
0002 #define EventDisplay_H
0003
0004 #include <iostream>
0005 #include <fstream>
0006 #include "TString.h"
0007 #include "TFile.h"
0008 #include "TTree.h"
0009 #include "TObjString.h"
0010
0011 #include "Setup.h"
0012 #include "RootSetupWrapper.h"
0013 #include "Calib.h"
0014 #include "Event.h"
0015 #include "Tile.h"
0016 #include "HGCROC.h"
0017 #include "Caen.h"
0018
0019 class EventDisplay{
0020
0021 public:
0022 EventDisplay(){
0023 eventptr=&event;
0024 rswptr=&rsw;
0025 calibptr=&calib;
0026 }
0027 ~EventDisplay(){}
0028
0029
0030 inline TString GetRootInputName() const {return RootInputName;};
0031 inline TString GetPlotOutputDir() const {return OutputNameDirPlots;};
0032
0033 inline TFile* GetRootInput() {return RootInput;}
0034 inline TFile* GetRootOutput() {return RootOutput;}
0035
0036 inline bool CanOverWrite(void) const {return Overwrite;};
0037 inline bool IsCalibSaveToFile(void) const {return SaveCalibToFile;};
0038 inline short GetExtPlotting(void) const {return ExtPlot;};
0039 inline bool IsToRunQA(void) const {return RunQA;};
0040
0041
0042
0043 inline void CanOverWrite(bool b) {Overwrite=b;};
0044 inline void IsCalibSaveToFile(bool b) {SaveCalibToFile=b;};
0045 inline void SetExtPlotting(short b) {ExtPlot = b;};
0046 inline void EnableDebug(int i) {debug=i;};
0047
0048 inline void SetYear(int year) {yearData=year;};
0049 inline void SetRunListInput(TString name) {RunListInputName=name;};
0050 inline void SetRootInput(TString name) {RootInputName=name;};
0051 inline void SetPlotOutputDir(TString name) {OutputNameDirPlots =name;};
0052 inline void SetPlotExtension(TString name) {plotSuffix = name;};
0053 inline void SetEventToPlot(int e) {plotEvt = e;};
0054 inline void SetNumberOfEventsToPlot(int n) {nEvts = n;};
0055 inline void PlotMuonTriggeredEvents(bool y) {plotMuonEvts=y;};
0056 inline void SetMinTilesHit(int n) {minTilesHit = n;};
0057
0058
0059 bool CheckAndOpenIO(void);
0060 bool Process(void);
0061
0062
0063 TString OutputNameDirPlots;
0064 TString RootInputName;
0065 TString RunListInputName;
0066 TString plotSuffix = "pdf";
0067 TFile* RootOutput =nullptr;
0068 TFile* RootOutputHist =nullptr;
0069 TFile* RootInput =nullptr;
0070 bool RunQA = false;
0071 bool SaveCalibToFile =false;
0072 short ExtPlot =0;
0073 bool Overwrite =true;
0074 int debug =0;
0075 int yearData =-1;
0076 RootSetupWrapper rsw;
0077 RootSetupWrapper* rswptr;
0078 Setup* setup;
0079 Calib calib;
0080 Calib* calibptr;
0081 Event event;
0082 Event* eventptr;
0083 int plotEvt = 0;
0084 int nEvts = 1;
0085 bool plotMuonEvts = false;
0086 int minTilesHit = 0;
0087
0088 TTree* TsetupIn=nullptr;
0089 TTree* TdataIn=nullptr;
0090 TTree* TcalibIn=nullptr;
0091
0092 protected:
0093
0094
0095 private:
0096 bool Plot();
0097 };
0098
0099
0100 #endif