File indexing completed on 2025-12-16 09:28:19
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 inline void PlotHGCROC_ADCData() {plotHGCROC = true; dataTypeHGCROC = 0; }
0058 inline void PlotHGCROC_ADCwPedData() {plotHGCROC = true; dataTypeHGCROC = 1; }
0059 inline void PlotHGCROC_TOTData() {plotHGCROC = true; dataTypeHGCROC = 2; }
0060
0061
0062 bool CheckAndOpenIO(void);
0063 bool Process(void);
0064
0065
0066 TString OutputNameDirPlots;
0067 TString RootInputName;
0068 TString RunListInputName;
0069 TString plotSuffix = "pdf";
0070 TFile* RootOutput =nullptr;
0071 TFile* RootOutputHist =nullptr;
0072 TFile* RootInput =nullptr;
0073 bool RunQA = false;
0074 bool SaveCalibToFile =false;
0075 short ExtPlot =0;
0076 bool Overwrite =true;
0077 int debug =0;
0078 int yearData =-1;
0079 RootSetupWrapper rsw;
0080 RootSetupWrapper* rswptr;
0081 Setup* setup;
0082 Calib calib;
0083 Calib* calibptr;
0084 Event event;
0085 Event* eventptr;
0086 int plotEvt = 0;
0087 int nEvts = 1;
0088 bool plotMuonEvts = false;
0089 int minTilesHit = 0;
0090 bool plotHGCROC = false;
0091 int dataTypeHGCROC = 0;
0092
0093 TTree* TsetupIn=nullptr;
0094 TTree* TdataIn=nullptr;
0095 TTree* TcalibIn=nullptr;
0096
0097 protected:
0098
0099
0100 private:
0101 bool Plot();
0102 };
0103
0104
0105 #endif