File indexing completed on 2025-01-18 09:15:44
0001 #ifndef COMPARISONCALIB_H
0002 #define COMPARISONCALIB_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 ComparisonCalib{
0020
0021 public:
0022 ComparisonCalib(){
0023 rswptr=&rsw;
0024 calibptr=&calib;
0025 }
0026 ~ComparisonCalib(){}
0027
0028
0029 inline TString GetRootCalibInputName() const {return RootCalibInputName;};
0030 inline TString GetInputListName() const {return InputListName;};
0031 inline TString GetRootPedestalInputName() const {return RootPedestalInputName;};
0032 inline TString GetRootOutputName() const {return RootOutputName;};
0033 inline TString GetPlotOutputDir() const {return OutputNameDirPlots;};
0034
0035 inline TFile* GetRootCalibInput() {return RootCalibInput;}
0036 inline TFile* GetRootInput() {return RootInput;}
0037 inline TFile* GetRootPedestalInput() {return RootPedestalInput;}
0038 inline TFile* GetRootOutput() {return RootOutput;}
0039
0040 inline bool CanOverWrite(void) const {return Overwrite;};
0041
0042
0043
0044 inline void CanOverWrite(bool b) {Overwrite=b;};
0045 inline void EnableDebug(int i) {debug=i;};
0046
0047 inline void SetYear(int year) {yearData=year;};
0048 inline void SetRunListInput(TString name) {RunListInputName=name;};
0049 inline void SetRootCalibInput(TString name) {RootCalibInputName=name;};
0050 inline void SetInputList(TString name) {InputListName=name;};
0051 inline void SetRootPedestalInput(TString name) {RootPedestalInputName=name;};
0052 inline void SetRootOutput(TString name) {RootOutputName =name;};
0053 inline void SetRootOutputHists(TString name) {RootOutputNameHist =name;};
0054 inline void SetPlotOutputDir(TString name) {OutputNameDirPlots =name;};
0055
0056
0057 bool CreateOutputRootFile(void);
0058 bool CheckAndOpenIO(void);
0059 bool Process(void);
0060
0061
0062 TString RootOutputName;
0063 TString RootOutputNameHist;
0064 TString OutputNameDirPlots;
0065 TString InputListName;
0066 TString RootCalibInputName;
0067 TString RootPedestalInputName;
0068 TString RunListInputName;
0069 TFile* RootOutput =nullptr;
0070 TFile* RootOutputHist =nullptr;
0071 TFile* RootInput =nullptr;
0072 TFile* RootPedestalInput =nullptr;
0073 TFile* RootCalibInput =nullptr;
0074 bool Overwrite =false;
0075 int debug =0;
0076 int yearData =-1;
0077 RootSetupWrapper rsw;
0078 RootSetupWrapper* rswptr;
0079 Setup* setup;
0080 Calib calib;
0081 Calib* calibptr;
0082
0083 TTree* TsetupIn=nullptr;
0084 TTree* TcalibIn=nullptr;
0085
0086 protected:
0087
0088
0089 private:
0090
0091 };
0092
0093 #endif