CMS 3D CMS Logo

DrawIteration.h
Go to the documentation of this file.
1 #ifndef DrawIteration_h
2 #define DrawIteration_h
3 
4 
5 
6 #include <vector>
7 #include <map>
8 
9 #include "TString.h"
10 #include "TFile.h"
11 #include "TGraph.h"
12 
13 
14 
16  public:
17  DrawIteration(unsigned int =0, const bool =false);
19 
20  void yAxisFixed(const bool yAxis){yAxisFixed_ = yAxis;}
21 
22  void drawIteration(unsigned int =0, unsigned int =99999);
23  void drawResult();
24 
25  void addSystematics();
26  void addCmsText(const TString&);
27 
28  void addInputFile(const TString&, const TString&);
29  void outputDirectory(const TString&);
30 
31  private:
32  struct ExtremeValues{
33  ExtremeValues(const double minApe, const double maxApe, const double maxAbsCorr):
34  minimumApe(minApe), maximumApe(maxApe), maxAbsCorrection(maxAbsCorr){}
35  const double minimumApe;
36  const double maximumApe;
37  const double maxAbsCorrection;
38  };
39 
40  struct SectorValues{
42  std::map<unsigned int, std::string*> m_sectorName;
43  std::map<unsigned int, std::vector<double> > m_sectorValueX;
44  std::map<unsigned int, std::vector<double> > m_sectorValueY;
45  };
46 
48  ExtremeValues getGraphs(const std::string, unsigned int, unsigned int);
49  void drawCorrections(const std::string&, const ExtremeValues&, const std::string&);
50  void printFinalValues(unsigned int, unsigned int);
51  void clear();
52 
53  std::vector<std::vector<std::string> > arrangeHists();
54  std::vector<std::string> pixelHist();
55  std::vector<std::string> barrelHist();
56  std::vector<std::string> tibHist();
57  std::vector<std::string> tobHist();
58  std::vector<std::string> endcapHist();
59  std::vector<std::string> tidHist();
60  std::vector<std::string> tecHist();
61  TString associateLabel(const std::string&);
62  unsigned int sectorNumber(const std::string&);
63  void drawFinals(const std::string&);
64  bool createResultHist(TH1*&, const std::vector<std::string>&, const std::string&, SectorValues&, unsigned int);
65 
66  const TString* outpath_;
67  TFile* file_;
68  const bool overlayMode_;
70 
72 
73  std::vector<TGraph*> v_graphApeX_;
74  std::vector<TGraph*> v_graphCorrectionX_;
75  std::vector<TGraph*> v_graphApeY_;
76  std::vector<TGraph*> v_graphCorrectionY_;
77 
78  std::vector<std::vector<std::string> > v_resultHist_;
80  TString cmsText_;
81 
82  struct Input{
83  Input(TString name, TString legend): fileName(name), legendEntry(legend), file(0){}
84 
85  TString fileName;
86  TString legendEntry;
87  TFile* file;
88 
90  };
91 
92  std::vector<Input*> v_input_;
93 };
94 
95 
96 
97 
98 
99 #endif
100 
101 
102 
103 
DrawIteration::tobHist
std::vector< std::string > tobHist()
DrawIteration::createResultHist
bool createResultHist(TH1 *&, const std::vector< std::string > &, const std::string &, SectorValues &, unsigned int)
DrawIteration::tibHist
std::vector< std::string > tibHist()
DrawIteration
Definition: DrawIteration.h:15
DrawIteration::arrangeHists
std::vector< std::vector< std::string > > arrangeHists()
DrawIteration::v_graphApeY_
std::vector< TGraph * > v_graphApeY_
Definition: DrawIteration.h:75
DrawIteration::sectorValues_
SectorValues sectorValues_
Definition: DrawIteration.h:71
DrawIteration::pixelHist
std::vector< std::string > pixelHist()
DrawIteration::Input::sectorValues
SectorValues sectorValues
Definition: DrawIteration.h:89
DrawIteration::getGraphs
ExtremeValues getGraphs(const std::string, unsigned int, unsigned int)
DrawIteration::v_resultHist_
std::vector< std::vector< std::string > > v_resultHist_
Definition: DrawIteration.h:78
DrawIteration::DrawIteration
DrawIteration(unsigned int=0, const bool=false)
DrawIteration::ExtremeValues::maxAbsCorrection
const double maxAbsCorrection
Definition: DrawIteration.h:37
DrawIteration::drawCorrections
void drawCorrections(const std::string &, const ExtremeValues &, const std::string &)
DrawIteration::Input::file
TFile * file
Definition: DrawIteration.h:87
DrawIteration::file_
TFile * file_
Definition: DrawIteration.h:67
DrawIteration::v_graphCorrectionY_
std::vector< TGraph * > v_graphCorrectionY_
Definition: DrawIteration.h:76
DrawIteration::ExtremeValues
Definition: DrawIteration.h:32
DrawIteration::v_graphApeX_
std::vector< TGraph * > v_graphApeX_
Definition: DrawIteration.h:73
DrawIteration::SectorValues::m_sectorName
std::map< unsigned int, std::string * > m_sectorName
Definition: DrawIteration.h:42
DrawIteration::tidHist
std::vector< std::string > tidHist()
DrawIteration::ExtremeValues::ExtremeValues
ExtremeValues(const double minApe, const double maxApe, const double maxAbsCorr)
Definition: DrawIteration.h:33
DrawIteration::addInputFile
void addInputFile(const TString &, const TString &)
DrawIteration::clear
void clear()
DrawIteration::yAxisFixed
void yAxisFixed(const bool yAxis)
Definition: DrawIteration.h:20
DrawIteration::v_graphCorrectionX_
std::vector< TGraph * > v_graphCorrectionX_
Definition: DrawIteration.h:74
DrawIteration::outpath_
const TString * outpath_
Definition: DrawIteration.h:66
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DrawIteration::systematics_
bool systematics_
Definition: DrawIteration.h:79
DrawIteration::SectorValues::m_sectorValueY
std::map< unsigned int, std::vector< double > > m_sectorValueY
Definition: DrawIteration.h:44
DrawIteration::SectorValues::m_sectorValueX
std::map< unsigned int, std::vector< double > > m_sectorValueX
Definition: DrawIteration.h:43
DrawIteration::printFinalValues
void printFinalValues(unsigned int, unsigned int)
DrawIteration::Input::legendEntry
TString legendEntry
Definition: DrawIteration.h:86
DrawIteration::addSystematics
void addSystematics()
DrawIteration::outputDirectory
void outputDirectory(const TString &)
DrawIteration::~DrawIteration
~DrawIteration()
HLT_FULL_cff.yAxis
yAxis
Definition: HLT_FULL_cff.py:46156
listHistos.legend
legend
Definition: listHistos.py:41
DrawIteration::SectorValues
Definition: DrawIteration.h:40
DrawIteration::v_input_
std::vector< Input * > v_input_
Definition: DrawIteration.h:92
DrawIteration::yAxisFixed_
bool yAxisFixed_
Definition: DrawIteration.h:69
DrawIteration::endcapHist
std::vector< std::string > endcapHist()
DrawIteration::drawFinals
void drawFinals(const std::string &)
DrawIteration::sectorNumber
unsigned int sectorNumber(const std::string &)
DrawIteration::overlayMode_
const bool overlayMode_
Definition: DrawIteration.h:68
DrawIteration::Input
Definition: DrawIteration.h:82
DrawIteration::tecHist
std::vector< std::string > tecHist()
DrawIteration::Input::Input
Input(TString name, TString legend)
Definition: DrawIteration.h:83
DrawIteration::SectorValues::SectorValues
SectorValues()
Definition: DrawIteration.h:41
DrawIteration::ExtremeValues::maximumApe
const double maximumApe
Definition: DrawIteration.h:36
DrawIteration::drawIteration
void drawIteration(unsigned int=0, unsigned int=99999)
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
DrawIteration::drawResult
void drawResult()
DrawIteration::ExtremeValues::minimumApe
const double minimumApe
Definition: DrawIteration.h:35
DrawIteration::getSectorValues
SectorValues getSectorValues(TFile *)
DrawIteration::cmsText_
TString cmsText_
Definition: DrawIteration.h:80
DrawIteration::associateLabel
TString associateLabel(const std::string &)
DrawIteration::addCmsText
void addCmsText(const TString &)
DrawIteration::Input::fileName
TString fileName
Definition: DrawIteration.h:85
DrawIteration::barrelHist
std::vector< std::string > barrelHist()