#ifndef HistoCollector3D_h
#define HistoCollector3D_h

#include <TFile.h>
#include <TSystem.h>
#include <TH3.h>
#include <TString.h>
#include <TAttMarker.h>
#include <iostream>
#include <vector>

using namespace std;

//_________________
class HistoCollector3D {

 public:
  HistoCollector3D();
  ~HistoCollector3D();
  
  void SetQinvBins(int qInvBins, double qInvLo, double qInvHi) {mQinvBins=qInvBins;mQinvLo=qInvLo;mQinvHi=qInvHi;}
  void SetPartType(int type) {mPartType=type;}
  //void SetCentBins(int bins) {mCentBins=bins;}
  void SetKtBins(int bins) {mKtBins=bins;}
  void SetFileName(const char *name) {mFileName = name;}
  void LoadData();
  TH3F *BuildKt3DNum(int charge, int binLo, int binHi);
  TH3F *BuildKt3DDen(int charge, int binLo, int binHi);
  TH3F *BuildKt3DQinv(int charge, int binLo, int binHi);

 private:

  void OpenFile();
  void ReadHistograms();
  TFile *mFile;

  int mKtBins;
  const char *mFileName;
  int    mQinvBins;
  double mQinvLo;
  double mQinvHi;

  int mPartType;

  std::vector<TH3F *> h3DNum;
  std::vector<TH3F *> h3DDen;
  std::vector<TH3F *> h3DQinv;
};

#endif
