PandaRoot
PndMultiCanvasCreator.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
24 #ifndef TOOLS_PndMultiCanvasCreator_H_
25 #define TOOLS_PndMultiCanvasCreator_H_
26 
27 #include <TString.h>
28 #include <TCanvas.h>
29 #include <vector>
30 
31 class PndMultiCanvasCreator : public TObject {
32  public:
34  virtual ~PndMultiCanvasCreator();
35 
36  void SelectPad(int padNumber);
37  void SaveCanvasses();
38 
39  void SetDimensions(int x = 800, int y = 600)
40  {
41  fDimX = x;
42  fDimY = y;
43  }
44  void SetPicPerCan(int val) { fPicPerCan = val; }
45  void SetPrefix(TString val) { fCanPrefix = val; }
46  void SetOutputDir(TString val) { fOutputDir = val; }
47  void SetOutputFormat(TString val) { fOutputFormat = val; } //< defines the output format of the saved canvasses. See root's TPad::SaveAs for possible options
48 
52  std::vector<TString> GetOutputFileNames() { return fOutputFileNames; }
53 
54  protected:
55  TCanvas *createCanvas();
56 
57  private:
58  std::vector<TCanvas *> fCanvasses;
59  std::vector<TString> fOutputFileNames;
60  TString fCanPrefix = "Can";
61  TString fOutputDir = ".";
62  TString fOutputFormat = "gif";
63  Int_t fPicPerCan = 9;
64  Int_t fDimX = 0;
65  Int_t fDimY = 0;
66  ClassDef(PndMultiCanvasCreator, 1);
67 };
68 
69 #endif /* TOOLS_PndMultiCanvasCreator_H_ */
void SetOutputFormat(TString val)
void SetDimensions(int x=800, int y=600)
TCanvas * createCanvas()
void SetOutputDir(TString val)
virtual ~PndMultiCanvasCreator()
Creates new canvasses once the number of histograms per canvas exceeds a setable threshold Automatic...
void SetPrefix(TString val)
void SelectPad(int padNumber)
std::vector< TString > GetOutputFileNames()