CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HistoCompare.h
Go to the documentation of this file.
1 #ifndef RecoB_HistoCompare_h
2 #define RecoB_HistoCompare_h
3 
17 #include "TFile.h"
18 #include "TH1.h"
19 #include "TString.h"
20 
21 #include <iostream>
22 #include <string>
23 #include <vector>
24 
25 class HistoCompare {
26 
27  public:
28  HistoCompare();
29  HistoCompare(TString refFilename);
30 
31  ~HistoCompare();
32 
33  TH1* Compare(TH1* h, TString hname);
34 
37  //if (refFile_) delete refFile_;
38  refFile_ = new TFile(refFilename_);
39  if (refFile_->IsZombie()) {
40  std::cout << " Error openning file " << refFilename_ << std::endl;
41  std::cout << " we will not compare histograms. " << std::endl;
42  do_nothing_ = true;
43  }
44  std::cout << " open file" << std::endl;
45  };
46 
47  void SetChi2Test(bool test=true) {
49  };
50 
51  void SetKGTest(bool test=true) {
52  setKGTest_ = test;
53  };
54 
55  double GetResult() { return result_; };
56 
57  private:
58 
59  bool setChi2Test_;
60  bool setKGTest_;
61  double result_;
63 
64  TH1 *resHisto_;
65  TH1 *refHisto_;
66  TFile *refFile_;
67 
68  TString refFilename_;
69 
70  //std::map<std::string, TH1*> histomap_;
71 
72 };
73 
74 #endif
double result_
Definition: HistoCompare.h:61
TH1 * resHisto_
Definition: HistoCompare.h:64
bool do_nothing_
Definition: HistoCompare.h:62
TH1 * refHisto_
Definition: HistoCompare.h:65
double GetResult()
Definition: HistoCompare.h:55
void SetKGTest(bool test=true)
Definition: HistoCompare.h:51
TString refFilename_
Definition: HistoCompare.h:68
void SetReferenceFilename(TString filename)
Definition: HistoCompare.h:35
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
void SetChi2Test(bool test=true)
Definition: HistoCompare.h:47
tuple filename
Definition: lut2db_cfg.py:20
tuple cout
Definition: gather_cfg.py:121
bool setChi2Test_
Definition: HistoCompare.h:55
TH1 * Compare(TH1 *h, TString hname)
Definition: HistoCompare.cc:44
TFile * refFile_
Definition: HistoCompare.h:66