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