]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/macros/PhysSelQA/AliPSQAVisualization.h
end-of-line normalization
[u/mrichter/AliRoot.git] / ANALYSIS / macros / PhysSelQA / AliPSQAVisualization.h
index 563db07387eefa12e045149b7733aa4da226d586..f58cf0a9cb5c1901a9d701468e0f91e9f0827cc7 100644 (file)
-/////////////////////////////////////\r
-// Created by: Kevin McDermott     //\r
-// email: kmcderm3@nd.edu          //\r
-// CERN Summer Student 2012        //\r
-// University of Notre Dame du Lac //\r
-//                                 // \r
-// Revision: 1.0                   //\r
-// Created on: August 6, 2012      //\r
-/////////////////////////////////////\r
-\r
-#ifndef ALIPSQAVISUALIZATION_H\r
-#define ALIPSQAVISUALIZATION_H\r
-\r
-#if !defined(__CINT__) || defined(__MAKECINT__)\r
-#include "TCanvas.h"\r
-#include "TH1D.h"\r
-#include "TGraphErrors.h"\r
-#include "TFile.h"\r
-#include <Riostream.h>\r
-#include "TGaxis.h"\r
-#include "TStyle.h"\r
-#include "TLegend.h"\r
-#include "TSystem.h"\r
-#endif\r
-\r
-class AliPSQAVisualization : public TObject\r
-{\r
- public:\r
-  AliPSQAVisualization();\r
-  virtual ~AliPSQAVisualization();\r
-\r
-  void InitializeSelectedPlots(const Char_t * listOfPlots);\r
-  void InitializeColorArray(const Char_t * listOfColors); // called only if fUseColorArray == kTRUE\r
-  \r
-  void PostProcessQA(); // First call of macro\r
-  void ScaleMinAndMax(); // called only if fScaleAuto == kTRUE\r
-  void MakeDir(TString dir); // called if anything is to be saved, first check to make sure directory exists.\r
-  void ImportRunAndFillInfo(const Char_t * listOfRunsAndFills); // import info on run and fill number\r
-  void DrawSelected(Int_t iplot);\r
-  Int_t MatchGoodRunToFillNumber(Int_t runnumber); // match run number to fill number\r
-  Int_t MatchGoodRunToStats(Int_t runnumber); // match run number to it's stats\r
-  void ConvertTGraphErrorsToTH1Ds();\r
-  TString SetDrawSelectedYTitle(TString TGEtitle);\r
-  void SavePDFs(Int_t iplot);\r
-  void DrawSameTriggerOnSameCA(Int_t iplot);\r
-  void DrawOverPlotCA(Int_t iplot);\r
-  void DrawOverPlotNoCA(Int_t iplot);\r
-  void SaveToPDFSeparately(Int_t iplot);\r
-  void SaveOverPlotPDF();\r
-  void SaveOverPlotEPS();\r
-\r
-  // Getters and setters from the macro\r
-\r
-  void     SetInDirectory(TString indir){fInDirectory = indir;};\r
-  TString  GetInDirectory(){return fInDirectory;};\r
-\r
-  void     SetROOTInput(TString RI){fROOTInput = RI;};\r
-  TString  GetROOTInput(){return fROOTInput;};\r
-    \r
-  void     SetSavePDFs(Bool_t pdf){fSavePDFs = pdf;};\r
-  Bool_t   GetSavePDFs(){return fSavePDFs;};\r
-  \r
-  void     SetSaveOverPlotPDF(Bool_t pdf){fSaveOverPlotPDF = pdf;};\r
-  Bool_t   GetSaveOverPlotPDF(){return fSaveOverPlotPDF;};\r
-\r
-  void     SetOutPDFName(TString name){fOutPDFName = name;};\r
-  TString  GetOutPDFName(){return fOutPDFName;};\r
-\r
-  void     SetSaveOverPlotEPS(Bool_t eps){fSaveOverPlotEPS = eps;};\r
-  Bool_t   GetSaveOverPlotEPS(){return fSaveOverPlotEPS;};\r
-  \r
-  void     SetOutEPSName(TString name){fOutEPSName = name;};\r
-  TString  GetOutEPSName(){return fOutEPSName;};\r
-\r
-  void     SetOutDirectory(TString out){fOutDirectory = out;};\r
-  TString  GetOutDirectory(){return fOutDirectory;};  \r
-\r
-  void     SetDrawSelected(Bool_t select){fDrawSelected = select;};\r
-  Bool_t   GetDrawSelected(){return fDrawSelected;};\r
-\r
-  void     SetUseColorArray(Bool_t ca){fUseColorArray = ca;};\r
-  Bool_t   GetUseColorArray(){return fUseColorArray;};\r
-\r
-  void     SetDrawOverPlot(Bool_t op){fDrawOverPlot = op;};\r
-  Bool_t   GetDrawOverPlot(){return fDrawOverPlot;};\r
-\r
-  void     SetOverPlotTitle(TString opt){fOverPlotTitle = opt;};\r
-  TString  GetOverPlotTitle(){return fOverPlotTitle;};\r
-\r
-  void SetPlotOnSameCanvas(Bool_t plot){fSetPlotOnSameCanvas=plot;}\r
-\r
-  // Scaling Options\r
-\r
-  void     SetScaleAuto(Bool_t sa){fScaleAuto = sa;};\r
-  Bool_t   GetScaleAuto(){return fScaleAuto;};\r
-\r
-  void     SetScaleAutoDivMin(Double_t div_min){fDivMin = div_min;};\r
-  Double_t GetScaleAutoDivMin(){return fDivMin;};\r
-\r
-  void     SetScaleAutoMultMax(Double_t mult_max){fMultMax = mult_max;};\r
-  Double_t GetScaleAutoMultMax(){return fMultMax;};\r
-\r
-  void     SetScaleManMin(Double_t min){fMinimum = min;};\r
-  Double_t GetScaleManMin(){return fMinimum;};\r
-\r
-  void     SetScaleManMax(Double_t max){fMaximum = max;};\r
-  Double_t GetScaleManMax(){return fMaximum;};\r
-\r
- private:\r
-\r
-  // Input variables\r
-  TString * fSelectedPlots; // List of plots to be turned from tragphs to th1ds\r
-  Int_t     fNSelectedPlots; // number of plots to be turned from tgraphs to th1ds\r
-  TString   fInDirectory; // input directory of root file, most likely the one just analyzed from AliPSQA\r
-  TString   fROOTInput; // name of root file specified by user\r
-  TString   fRunFillFile;// name of file containing info on various fills\r
-  TFile *   fRootFile; // Root file to be used to produce plots\r
-\r
-  // Save DrawSelected\r
-  Bool_t  fDrawSelected;\r
-  Bool_t fSetPlotOnSameCanvas; // plot histos on same canvas\r
-\r
-  // Save PDF variables\r
-\r
-  Bool_t  fSavePDFs; // if kTRUE, save pdfs of th1ds\r
-  TString fOutDirectory; // save pdfs to this directory\r
-  TString fOutPDFName; // common pdf name, group pdf files together\r
-\r
-  // Overplot variables\r
-\r
-  Bool_t  fDrawOverPlot; // if kTrue, save overplot of all the th1ds\r
-  TString fOverPlotTitle; // title specified by user for overplot, most likely the name of the trigger mask, channel, and logic\r
-  Bool_t    fSaveOverPlotPDF; //if ktrue, save overplot to pdf file\r
-  TCanvas   fOverCanvas; // Overplot canvas\r
-  TLegend * fOverLegend; // Overplot legend\r
-  Bool_t    fSaveOverPlotEPS; // if ktrue, save overplot eps file\r
-  TString   fOutEPSName; // eps file name for overplot together\r
-\r
-  // Overplot color array variables\r
-\r
-  Bool_t    fUseColorArray; // if ktrue, use colorarray specified in a list file\r
-  Color_t * fColors; // set in a list file, using enums of colors (just use AliRoot and type in the color, e.g. root [0] kBlue returns (const enum EColor)600)\r
-  Int_t fNColors; // number of colors used\r
-\r
-  // Overplot Scaling Variables\r
-\r
-  Bool_t   fScaleAuto; // If kTRUE, set scaling automatically with GetMinAndMax()\r
-  Double_t fMultMax; // Auto scaling factor, multiply the max\r
-  Double_t fDivMin; // Auto scaling factor, divide the min\r
-\r
-  Double_t fMinimum; // Maximum val in selected tgraphs, used for setting range for overplot\r
-  Double_t fMaximum; // Minimum val in selected tgraphs, used for setting range for overplot\r
-\r
-  // Plotting variables needed\r
-\r
-  TCanvas * fCanvas; // new array in InitializeDrawSelected with the amount of fNDrawSelected\r
-  TH1D *  fDrawPlot; // new array in InitializeDrawSelected with the amount of fNDrawSelected\r
-  TLine ** fFillSeparationLine; // double array of Tlines - for each plot and for each change of fill number\r
-    \r
-  Int_t *fRunNumbers; // Runs to be used in macro\r
-  Int_t *fFillNumbers; // Fill numbers to be associated to macro\r
-  Int_t *fRawRunNumbers; // raw run numbers - taken from logbook\r
-  Int_t *fRawFillNumbers;// raw fill numbers corresponding to runs - taken from logbook\r
-  Int_t *fRawRunStats; //  raw stats for each run number - taken from logbook\r
-\r
-  Int_t *fNDiffFills; // array of integers containing info\r
-  Int_t *fBinArray; // array of histo bins corresponding to different RUNS\r
-\r
-  Int_t fNRuns; // Number of Runs used in macro\r
-  Int_t fNRawRuns; // Number of raw Runs in macro\r
-\r
-  ClassDef(AliPSQAVisualization, 2)\r
-};\r
-\r
-#endif\r
+/////////////////////////////////////
+// Created by: Kevin McDermott     //
+// email: kmcderm3@nd.edu          //
+// CERN Summer Student 2012        //
+// University of Notre Dame du Lac //
+//                                 // 
+// Revision: 1.0                   //
+// Created on: August 6, 2012      //
+/////////////////////////////////////
+
+#ifndef ALIPSQAVISUALIZATION_H
+#define ALIPSQAVISUALIZATION_H
+
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include "TCanvas.h"
+#include "TH1D.h"
+#include "TGraphErrors.h"
+#include "TFile.h"
+#include <Riostream.h>
+#include "TGaxis.h"
+#include "TStyle.h"
+#include "TLegend.h"
+#include "TSystem.h"
+#endif
+
+class AliPSQAVisualization : public TObject
+{
+ public:
+  AliPSQAVisualization();
+  virtual ~AliPSQAVisualization();
+
+  void InitializeSelectedPlots(const Char_t * listOfPlots);
+  void InitializeColorArray(const Char_t * listOfColors); // called only if fUseColorArray == kTRUE
+  
+  void PostProcessQA(); // First call of macro
+  void ScaleMinAndMax(); // called only if fScaleAuto == kTRUE
+  void MakeDir(TString dir); // called if anything is to be saved, first check to make sure directory exists.
+  void ImportRunAndFillInfo(const Char_t * listOfRunsAndFills); // import info on run and fill number
+  void DrawSelected(Int_t iplot);
+  Int_t MatchGoodRunToFillNumber(Int_t runnumber); // match run number to fill number
+  Int_t MatchGoodRunToStats(Int_t runnumber); // match run number to it's stats
+  void ConvertTGraphErrorsToTH1Ds();
+  TString SetDrawSelectedYTitle(TString TGEtitle);
+  void SavePDFs(Int_t iplot);
+  void DrawSameTriggerOnSameCA(Int_t iplot);
+  void DrawOverPlotCA(Int_t iplot);
+  void DrawOverPlotNoCA(Int_t iplot);
+  void SaveToPDFSeparately(Int_t iplot);
+  void SaveOverPlotPDF();
+  void SaveOverPlotEPS();
+
+  // Getters and setters from the macro
+
+  void     SetInDirectory(TString indir){fInDirectory = indir;};
+  TString  GetInDirectory(){return fInDirectory;};
+
+  void     SetROOTInput(TString RI){fROOTInput = RI;};
+  TString  GetROOTInput(){return fROOTInput;};
+    
+  void     SetSavePDFs(Bool_t pdf){fSavePDFs = pdf;};
+  Bool_t   GetSavePDFs(){return fSavePDFs;};
+  
+  void     SetSaveOverPlotPDF(Bool_t pdf){fSaveOverPlotPDF = pdf;};
+  Bool_t   GetSaveOverPlotPDF(){return fSaveOverPlotPDF;};
+
+  void     SetOutPDFName(TString name){fOutPDFName = name;};
+  TString  GetOutPDFName(){return fOutPDFName;};
+
+  void     SetSaveOverPlotEPS(Bool_t eps){fSaveOverPlotEPS = eps;};
+  Bool_t   GetSaveOverPlotEPS(){return fSaveOverPlotEPS;};
+  
+  void     SetOutEPSName(TString name){fOutEPSName = name;};
+  TString  GetOutEPSName(){return fOutEPSName;};
+
+  void     SetOutDirectory(TString out){fOutDirectory = out;};
+  TString  GetOutDirectory(){return fOutDirectory;};  
+
+  void     SetDrawSelected(Bool_t select){fDrawSelected = select;};
+  Bool_t   GetDrawSelected(){return fDrawSelected;};
+
+  void     SetUseColorArray(Bool_t ca){fUseColorArray = ca;};
+  Bool_t   GetUseColorArray(){return fUseColorArray;};
+
+  void     SetDrawOverPlot(Bool_t op){fDrawOverPlot = op;};
+  Bool_t   GetDrawOverPlot(){return fDrawOverPlot;};
+
+  void     SetOverPlotTitle(TString opt){fOverPlotTitle = opt;};
+  TString  GetOverPlotTitle(){return fOverPlotTitle;};
+
+  void SetPlotOnSameCanvas(Bool_t plot){fSetPlotOnSameCanvas=plot;}
+
+  // Scaling Options
+
+  void     SetScaleAuto(Bool_t sa){fScaleAuto = sa;};
+  Bool_t   GetScaleAuto(){return fScaleAuto;};
+
+  void     SetScaleAutoDivMin(Double_t div_min){fDivMin = div_min;};
+  Double_t GetScaleAutoDivMin(){return fDivMin;};
+
+  void     SetScaleAutoMultMax(Double_t mult_max){fMultMax = mult_max;};
+  Double_t GetScaleAutoMultMax(){return fMultMax;};
+
+  void     SetScaleManMin(Double_t min){fMinimum = min;};
+  Double_t GetScaleManMin(){return fMinimum;};
+
+  void     SetScaleManMax(Double_t max){fMaximum = max;};
+  Double_t GetScaleManMax(){return fMaximum;};
+
+ private:
+
+  // Input variables
+  TString * fSelectedPlots; // List of plots to be turned from tragphs to th1ds
+  Int_t     fNSelectedPlots; // number of plots to be turned from tgraphs to th1ds
+  TString   fInDirectory; // input directory of root file, most likely the one just analyzed from AliPSQA
+  TString   fROOTInput; // name of root file specified by user
+  TString   fRunFillFile;// name of file containing info on various fills
+  TFile *   fRootFile; // Root file to be used to produce plots
+
+  // Save DrawSelected
+  Bool_t  fDrawSelected;
+  Bool_t fSetPlotOnSameCanvas; // plot histos on same canvas
+
+  // Save PDF variables
+
+  Bool_t  fSavePDFs; // if kTRUE, save pdfs of th1ds
+  TString fOutDirectory; // save pdfs to this directory
+  TString fOutPDFName; // common pdf name, group pdf files together
+
+  // Overplot variables
+
+  Bool_t  fDrawOverPlot; // if kTrue, save overplot of all the th1ds
+  TString fOverPlotTitle; // title specified by user for overplot, most likely the name of the trigger mask, channel, and logic
+  Bool_t    fSaveOverPlotPDF; //if ktrue, save overplot to pdf file
+  TCanvas   fOverCanvas; // Overplot canvas
+  TLegend * fOverLegend; // Overplot legend
+  Bool_t    fSaveOverPlotEPS; // if ktrue, save overplot eps file
+  TString   fOutEPSName; // eps file name for overplot together
+
+  // Overplot color array variables
+
+  Bool_t    fUseColorArray; // if ktrue, use colorarray specified in a list file
+  Color_t * fColors; // set in a list file, using enums of colors (just use AliRoot and type in the color, e.g. root [0] kBlue returns (const enum EColor)600)
+  Int_t fNColors; // number of colors used
+
+  // Overplot Scaling Variables
+
+  Bool_t   fScaleAuto; // If kTRUE, set scaling automatically with GetMinAndMax()
+  Double_t fMultMax; // Auto scaling factor, multiply the max
+  Double_t fDivMin; // Auto scaling factor, divide the min
+
+  Double_t fMinimum; // Maximum val in selected tgraphs, used for setting range for overplot
+  Double_t fMaximum; // Minimum val in selected tgraphs, used for setting range for overplot
+
+  // Plotting variables needed
+
+  TCanvas * fCanvas; // new array in InitializeDrawSelected with the amount of fNDrawSelected
+  TH1D *  fDrawPlot; // new array in InitializeDrawSelected with the amount of fNDrawSelected
+  TLine ** fFillSeparationLine; // double array of Tlines - for each plot and for each change of fill number
+    
+  Int_t *fRunNumbers; // Runs to be used in macro
+  Int_t *fFillNumbers; // Fill numbers to be associated to macro
+  Int_t *fRawRunNumbers; // raw run numbers - taken from logbook
+  Int_t *fRawFillNumbers;// raw fill numbers corresponding to runs - taken from logbook
+  Int_t *fRawRunStats; //  raw stats for each run number - taken from logbook
+
+  Int_t *fNDiffFills; // array of integers containing info
+  Int_t *fBinArray; // array of histo bins corresponding to different RUNS
+
+  Int_t fNRuns; // Number of Runs used in macro
+  Int_t fNRawRuns; // Number of raw Runs in macro
+
+  ClassDef(AliPSQAVisualization, 2)
+};
+
+#endif