File indexing completed on 2026-07-24 08:25:50
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 "TChain.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 TsetupIn = new TChain("Setup");
0024 TcalibIn = new TChain("Calib");
0025 rswptr=&rsw;
0026 calibptr=&calib;
0027 }
0028 ~ComparisonCalib(){
0029 if(RootOutput) RootOutput->Close();
0030 }
0031
0032
0033 inline TString GetRootCalibInputName() const {return TcalibIn->GetFile()->GetName();};
0034 inline TString GetInputListName() const {return InputListName;};
0035 inline TString GetRootOutputName() const {return RootOutputName;};
0036 inline TString GetPlotOutputDir() const {return OutputNameDirPlots;};
0037 inline short GetExtPlotting(void) const {return ExtPlot;};
0038 inline bool GetIsHGCROC(void) const {return isHGCROC;};
0039 inline int GetExpandedList() const {return expandedList;}
0040 inline bool CanOverWrite(void) const {return Overwrite;};
0041
0042 inline TFile* GetRootOutput() {return RootOutput;}
0043
0044
0045
0046 inline void CanOverWrite(bool b) {Overwrite=b;};
0047 inline void EnableDebug(int i) {debug=i;};
0048 inline void ExpandedList(int i) {expandedList=i;};
0049
0050 inline void AddInputFile(TString name) {RootInputNames.push_back(name);};
0051 inline void SetInputList(TString name) {InputListName=name;};
0052 inline void SetRootOutput(TString name) {RootOutputName =name;};
0053 inline void SetPlotOutputDir(TString name) {OutputNameDirPlots =name;};
0054 inline void SetPlotExtension(TString name) {plotSuffix = name;};
0055 inline void SetExtPlotting(short b) {ExtPlot = b;};
0056 inline void SetTrendingAxis(int i) {Xaxis=i;};
0057 inline void SetRunListInput(TString name) {RunListInputName=name;};
0058 inline void SetMaxPlotLayer(int i) {maxLayerPlot=i;};
0059 inline void SetIsHGCROC(bool b) {isHGCROC=b;};
0060 inline void SetLegendLabelOpt(int i) {eoLabelOpt=i;};
0061 inline void SetCellList(TString name) {cellList=name;};
0062
0063 bool CreateOutputRootFile(void);
0064 bool CheckAndOpenIO(void);
0065 bool ProcessCalib(void);
0066
0067
0068 TString RootOutputName;
0069 std::vector<TString> RootInputNames;
0070
0071 TString OutputNameDirPlots;
0072 TString plotSuffix = "pdf";
0073 TString InputListName;
0074 TString RunListInputName;
0075 TString cellList = "";
0076 TFile* RootOutput =nullptr;
0077 bool Overwrite =false;
0078 int expandedList =0;
0079 int debug =0;
0080 short ExtPlot =0;
0081 int yearData =-1;
0082 int Xaxis =0;
0083 int maxLayerPlot =100;
0084 bool isHGCROC =false;
0085 int eoLabelOpt =1;
0086 RootSetupWrapper rsw;
0087 RootSetupWrapper* rswptr;
0088 Setup* setup;
0089 Calib calib;
0090 Calib* calibptr;
0091
0092 TChain* TsetupIn=nullptr;
0093 TChain* TcalibIn=nullptr;
0094
0095 protected:
0096
0097
0098 private:
0099
0100 };
0101
0102 #endif