Main Page
Namespaces
Classes
Package Documentation
src
Validation
RecoB
interface
HistoCompare.h
Go to the documentation of this file.
1
#ifndef RecoB_HistoCompare_h
2
#define RecoB_HistoCompare_h
3
15
#include "TFile.h"
16
#include "TH1.h"
17
#include "TString.h"
18
19
#include <iostream>
20
#include <string>
21
#include <vector>
22
23
class
HistoCompare
{
24
public
:
25
HistoCompare
();
26
HistoCompare
(
const
TString &refFilename);
27
28
~HistoCompare
();
29
30
TH1 *
Compare
(TH1 *
h
,
const
TString &hname);
31
32
void
SetReferenceFilename
(
const
TString &
filename
) {
33
refFilename_
=
filename
;
34
// if (refFile_) delete refFile_;
35
refFile_
=
new
TFile(
refFilename_
);
36
if
(
refFile_
->IsZombie()) {
37
std::cout
<<
" Error openning file "
<<
refFilename_
<< std::endl;
38
std::cout
<<
" we will not compare histograms. "
<< std::endl;
39
do_nothing_
=
true
;
40
}
41
std::cout
<<
" open file"
<< std::endl;
42
};
43
44
void
SetChi2Test
(
bool
test
=
true
) {
setChi2Test_
=
test
; };
45
46
void
SetKGTest
(
bool
test
=
true
) {
setKGTest_
=
test
; };
47
48
double
GetResult
() {
return
result_
; };
49
50
private
:
51
bool
setChi2Test_
;
52
bool
setKGTest_
;
53
double
result_
;
54
bool
do_nothing_
;
55
56
TH1 *
resHisto_
;
57
TH1 *
refHisto_
;
58
TFile *
refFile_
;
59
60
TString
refFilename_
;
61
62
// std::map<std::string, TH1*> histomap_;
63
};
64
65
#endif
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition:
L1TUtmAlgorithmRcd.h:4
HistoCompare::SetReferenceFilename
void SetReferenceFilename(const TString &filename)
Definition:
HistoCompare.h:32
corrVsCorr.filename
filename
Definition:
corrVsCorr.py:123
test
Definition:
SmallWORMDict.h:13
HistoCompare
Definition:
HistoCompare.h:23
HistoCompare::result_
double result_
Definition:
HistoCompare.h:53
HistoCompare::resHisto_
TH1 * resHisto_
Definition:
HistoCompare.h:56
HistoCompare::do_nothing_
bool do_nothing_
Definition:
HistoCompare.h:54
HistoCompare::refHisto_
TH1 * refHisto_
Definition:
HistoCompare.h:57
PFTauMVAInputDiscriminatorTranslator_cfi.test
test
Definition:
PFTauMVAInputDiscriminatorTranslator_cfi.py:95
HistoCompare::GetResult
double GetResult()
Definition:
HistoCompare.h:48
HistoCompare::SetKGTest
void SetKGTest(bool test=true)
Definition:
HistoCompare.h:46
HistoCompare::refFilename_
TString refFilename_
Definition:
HistoCompare.h:60
HistoCompare::~HistoCompare
~HistoCompare()
Definition:
HistoCompare.cc:37
HistoCompare::HistoCompare
HistoCompare()
Definition:
HistoCompare.cc:16
HistoCompare::SetChi2Test
void SetChi2Test(bool test=true)
Definition:
HistoCompare.h:44
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
HistoCompare::setChi2Test_
bool setChi2Test_
Definition:
HistoCompare.h:48
HistoCompare::refFile_
TFile * refFile_
Definition:
HistoCompare.h:58
HistoCompare::setKGTest_
bool setKGTest_
Definition:
HistoCompare.h:52
HistoCompare::Compare
TH1 * Compare(TH1 *h, const TString &hname)
Definition:
HistoCompare.cc:39
Generated for CMSSW Reference Manual by
1.8.11