TIMBER  beta
Tree Interface for Making Binned Events with RDataFrame
HistLoader.h
1 #ifndef _TIMBER_HISTLOADER
2 #define _TIMBER_HISTLOADER
3 #include <string>
4 #include "TFile.h"
5 #include "TH1.h"
6 #include "TH2.h"
7 #include "TH3.h"
8 
13 class HistLoader {
14  private:
15  TFile *file;
16  int dim;
17 
26  void checkDim(int x, int y, int z);
27  public:
28  TH1 *hist;
29 
39  HistLoader(std::string filename, std::string histname);
48  std::vector<float> eval_bybin(int binx, int biny = 0, int binz = 0);
57  std::vector<float> eval(float xval, float yval = 0., float zval = 0.);
58 
59 };
60 #endif
TH1 * hist
Histogram object.
Definition: HistLoader.h:28
std::vector< float > eval(float xval, float yval=0., float zval=0.)
Evaluate by axis value.
Definition: HistLoader.cc:52
HistLoader()
Empty constructor.
Definition: HistLoader.h:32
std::vector< float > eval_bybin(int binx, int biny=0, int binz=0)
Evaluate by bin numbers.
Definition: HistLoader.cc:28
C++ class. Generic histogram loader with methods to return bin values.
Definition: HistLoader.h:13