CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
Comparator Class Reference

#include <Comparator.h>

Public Types

enum  Mode {
  NORMAL, SCALE, RATIO, GRAPH,
  EFF
}
 

Public Member Functions

 Comparator ()
 
 Comparator (const char *file0, const char *dir0, const char *file1, const char *dir1)
 
TDirectory * dir0 ()
 
TDirectory * dir1 ()
 
void Draw (const char *key, Mode mode)
 
void Draw (const char *key0, const char *key1, Mode mode)
 
void DrawGaussSigmaOverMeanSlice (const char *key, const char *key2, const int rebinFactor, Mode mode)
 
void DrawGaussSigmaOverMeanXSlice (const char *key, const int rebinFactor, const int binxmin, const int binxmax, const bool cst_binning, Mode mode)
 
void DrawGaussSigmaSlice (const char *key, const int rebinFactor, Mode mode)
 
void DrawGaussSigmaSlice (const char *key, const int rebinFactor, const int binxmin, const int binxmax, const bool cst_binning, Mode mode)
 
void DrawMeanSlice (const char *key, const int rebinFactor, Mode mode)
 
void DrawSigmaSlice (const char *key, const int rebinFactor, Mode mode)
 
void DrawSlice (const char *key, int binxmin, int binxmax, Mode mode)
 
TH1 * h0 ()
 
TH1 * h1 ()
 
TH1 * Histo (const char *key, unsigned dirIndex)
 
TLegend & Legend ()
 
const TLegend & Legend () const
 
void SetAxis (int rebin, float xmin, float xmax)
 
void SetAxis (int rebin)
 
void SetDirs (const char *file0, const char *dir0, const char *file1, const char *dir1)
 set the 2 files, and the directory within each file, in which the histograms will be compared More...
 
void SetStyles (Style *s0, Style *s1, const char *leg0, const char *leg1)
 

Private Member Functions

void Draw (TH1 *h0, TH1 *h1, Mode mode)
 

Private Attributes

TDirectory * dir0_
 
TDirectory * dir1_
 
TFile * file0_
 
TFile * file1_
 
TH1 * h0_
 
TH1 * h1_
 
TLegend legend_
 
int rebin_
 
bool resetAxis_
 
Styles0_
 
Styles1_
 
float xMax_
 
float xMin_
 

Detailed Description

Definition at line 15 of file Comparator.h.

Member Enumeration Documentation

Enumerator
NORMAL 
SCALE 
RATIO 
GRAPH 
EFF 

Definition at line 19 of file Comparator.h.

Constructor & Destructor Documentation

Comparator::Comparator ( )
inline

Definition at line 27 of file Comparator.h.

27  : rebin_(-1), xMin_(0), xMax_(0), resetAxis_(false),
28  s0_(0), s1_(0), legend_(0,0,1,1) {}
bool resetAxis_
Definition: Comparator.h:111
Style * s0_
Definition: Comparator.h:121
Style * s1_
Definition: Comparator.h:122
float xMin_
Definition: Comparator.h:109
float xMax_
Definition: Comparator.h:110
TLegend legend_
Definition: Comparator.h:124
Comparator::Comparator ( const char *  file0,
const char *  dir0,
const char *  file1,
const char *  dir1 
)
inline

Definition at line 30 of file Comparator.h.

References SetDirs().

33  :
34  rebin_(-1), xMin_(0), xMax_(0), resetAxis_(false),
35  s0_(0), s1_(0), legend_(0,0,1,1) {
36 
37  SetDirs( file0, dir0, file1, dir1);
38  }
TDirectory * dir1()
Definition: Comparator.h:97
bool resetAxis_
Definition: Comparator.h:111
TDirectory * dir0()
Definition: Comparator.h:96
Style * s0_
Definition: Comparator.h:121
void SetDirs(const char *file0, const char *dir0, const char *file1, const char *dir1)
set the 2 files, and the directory within each file, in which the histograms will be compared ...
Definition: Comparator.cc:18
Style * s1_
Definition: Comparator.h:122
float xMin_
Definition: Comparator.h:109
float xMax_
Definition: Comparator.h:110
TLegend legend_
Definition: Comparator.h:124

Member Function Documentation

TDirectory* Comparator::dir0 ( )
inline

Definition at line 96 of file Comparator.h.

References dir0_.

96 { return dir0_;}
TDirectory * dir0_
Definition: Comparator.h:114
TDirectory* Comparator::dir1 ( )
inline

Definition at line 97 of file Comparator.h.

References dir1_.

97 { return dir1_;}
TDirectory * dir1_
Definition: Comparator.h:116
void Comparator::Draw ( const char *  key,
Mode  mode 
)

Definition at line 293 of file Comparator.cc.

void Comparator::Draw ( const char *  key0,
const char *  key1,
Mode  mode 
)

Definition at line 304 of file Comparator.cc.

void Comparator::Draw ( TH1 *  h0,
TH1 *  h1,
Mode  mode 
)
private

Definition at line 360 of file Comparator.cc.

void Comparator::DrawGaussSigmaOverMeanSlice ( const char *  key,
const char *  key2,
const int  rebinFactor,
Mode  mode 
)

Definition at line 261 of file Comparator.cc.

void Comparator::DrawGaussSigmaOverMeanXSlice ( const char *  key,
const int  rebinFactor,
const int  binxmin,
const int  binxmax,
const bool  cst_binning,
Mode  mode 
)

Definition at line 194 of file Comparator.cc.

void Comparator::DrawGaussSigmaSlice ( const char *  key,
const int  rebinFactor,
Mode  mode 
)

Definition at line 119 of file Comparator.cc.

void Comparator::DrawGaussSigmaSlice ( const char *  key,
const int  rebinFactor,
const int  binxmin,
const int  binxmax,
const bool  cst_binning,
Mode  mode 
)

Definition at line 142 of file Comparator.cc.

void Comparator::DrawMeanSlice ( const char *  key,
const int  rebinFactor,
Mode  mode 
)

Definition at line 85 of file Comparator.cc.

void Comparator::DrawSigmaSlice ( const char *  key,
const int  rebinFactor,
Mode  mode 
)

Definition at line 102 of file Comparator.cc.

void Comparator::DrawSlice ( const char *  key,
int  binxmin,
int  binxmax,
Mode  mode 
)

Definition at line 47 of file Comparator.cc.

TH1* Comparator::h0 ( )
inline

Definition at line 82 of file Comparator.h.

References h0_.

82 {return h0_;}
TH1 * h0_
Definition: Comparator.h:118
TH1* Comparator::h1 ( )
inline

Definition at line 83 of file Comparator.h.

References h1_.

83 {return h1_;}
TH1 * h1_
Definition: Comparator.h:119
TH1 * Comparator::Histo ( const char *  key,
unsigned  dirIndex 
)

Definition at line 341 of file Comparator.cc.

TLegend& Comparator::Legend ( )
inline

Definition at line 85 of file Comparator.h.

References legend_.

85 {return legend_;}
TLegend legend_
Definition: Comparator.h:124
const TLegend& Comparator::Legend ( ) const
inline

Definition at line 86 of file Comparator.h.

References legend_.

86 {return legend_;}
TLegend legend_
Definition: Comparator.h:124
void Comparator::SetAxis ( int  rebin,
float  xmin,
float  xmax 
)
inline

Definition at line 47 of file Comparator.h.

References rebin_, resetAxis_, hlt_dqm_clientPB-live_cfg::xmax, xMax_, hlt_dqm_clientPB-live_cfg::xmin, and xMin_.

49  {
50  rebin_ = rebin;
51  xMin_ = xmin;
52  xMax_ = xmax;
53  resetAxis_ = true;
54  }
bool resetAxis_
Definition: Comparator.h:111
float xMin_
Definition: Comparator.h:109
float xMax_
Definition: Comparator.h:110
void Comparator::SetAxis ( int  rebin)
inline

Definition at line 57 of file Comparator.h.

References rebin_, and resetAxis_.

57  {
58  rebin_ = rebin;
59  resetAxis_ = false;
60  }
bool resetAxis_
Definition: Comparator.h:111
void Comparator::SetDirs ( const char *  file0,
const char *  dir0,
const char *  file1,
const char *  dir1 
)

set the 2 files, and the directory within each file, in which the histograms will be compared

Definition at line 18 of file Comparator.cc.

Referenced by Comparator().

void Comparator::SetStyles ( Style s0,
Style s1,
const char *  leg0,
const char *  leg1 
)

Definition at line 35 of file Comparator.cc.

Member Data Documentation

TDirectory* Comparator::dir0_
private

Definition at line 114 of file Comparator.h.

Referenced by dir0().

TDirectory* Comparator::dir1_
private

Definition at line 116 of file Comparator.h.

Referenced by dir1().

TFile* Comparator::file0_
private

Definition at line 113 of file Comparator.h.

TFile* Comparator::file1_
private

Definition at line 115 of file Comparator.h.

TH1* Comparator::h0_
private

Definition at line 118 of file Comparator.h.

Referenced by h0().

TH1* Comparator::h1_
private

Definition at line 119 of file Comparator.h.

Referenced by h1().

TLegend Comparator::legend_
private

Definition at line 124 of file Comparator.h.

Referenced by Legend().

int Comparator::rebin_
private

Definition at line 108 of file Comparator.h.

Referenced by SetAxis().

bool Comparator::resetAxis_
private

Definition at line 111 of file Comparator.h.

Referenced by SetAxis().

Style* Comparator::s0_
private

Definition at line 121 of file Comparator.h.

Style* Comparator::s1_
private

Definition at line 122 of file Comparator.h.

float Comparator::xMax_
private

Definition at line 110 of file Comparator.h.

Referenced by SetAxis().

float Comparator::xMin_
private

Definition at line 109 of file Comparator.h.

Referenced by SetAxis().