#include <TROOT.h>
#include <TSystem.h>
#include <iostream>
#include <TH1.h>
#include <TCanvas.h>

using namespace std;

void Processor() {
  gROOT->ProcessLine(".L HbtFitter.C+");
  gROOT->ProcessLine(".L FemtoUtils.h+");
  gROOT->ProcessLine(".L DataProcessing.cxx+");
  /*
    gSystem->Load("FemtoUtils_h.so");
    gSystem->Load("DataProcessing_cxx.so");
  */
  DataProcessing xxx;
  //xxx.SetExpFile("~/work/star/data/pp500/expMesonHBT_pp500_2012.root"); 
  xxx.SetExpFile("~/work/star/data/pp500/expMesonHbtFemtoDst_pp500_2011.root");
  xxx.SetMcFile("~/work/star/data/pp500/mcMesonHbtFemtoDst_pp500_tuneA.root");
  xxx.SetOutFile("~/work/star/soft/star_software/processing/pp/oMesonHBT.root");
  xxx.SetDetectorSelection(1);
  xxx.SetSourceFunction(0);
  xxx.SetNonFemtoFunction(1);
  xxx.SetDrawLegend(true);

  //xxx.OpenFiles();
  //xxx.ReadHistos();
  xxx.DoProcessing();

  //I should get summed histograms from the files

}
