Back to home page

EIC code displayed by LXR

 
 

    


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   //Getter methods
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   //setter methods
0043   //Overload method for boolean...or is it too dangerous?
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   //General methods
0057   bool CreateOutputRootFile(void);
0058   bool CheckAndOpenIO(void);
0059   bool Process(void);
0060 
0061   //Variable members
0062   TString RootOutputName;                 // file name of root output with tree
0063   TString RootOutputNameHist;             // file name of root output with additional histograms & fits
0064   TString OutputNameDirPlots;             // directory name of output for plots
0065   TString InputListName;                  // file name of input file list 
0066   TString RootCalibInputName;             // file name of calibration root file (mip calib)
0067   TString RootPedestalInputName;          // file name of pedestal root file (pedestal values)
0068   TString RunListInputName;               // file name run list 
0069   TFile* RootOutput         =nullptr;     // root file output tree
0070   TFile* RootOutputHist     =nullptr;     // root file output histos
0071   TFile* RootInput          =nullptr;     // root file input 
0072   TFile* RootPedestalInput  =nullptr;     // root file pedestal values
0073   TFile* RootCalibInput     =nullptr;     // root file calib values (mip)
0074   bool Overwrite              =false;     // Flag to overwrite outputs
0075   int debug                   =0;         // debug level 
0076   int yearData                =-1;        // data taking year externally set
0077   RootSetupWrapper rsw;                   // Wrapper singleton class for setup
0078   RootSetupWrapper* rswptr;               // Pointer to wrapper for singleton class for setup
0079   Setup* setup;                           // geometry setup
0080   Calib calib;                            // calibration object
0081   Calib* calibptr;                        // pointer to calib object
0082   
0083   TTree* TsetupIn=nullptr;
0084   TTree* TcalibIn=nullptr;
0085 
0086  protected:
0087 
0088 
0089  private:
0090    
0091 };
0092 
0093 #endif