#include <string>
#include <iostream>
#include <TTree.h>
#include <TFile.h>

using namespace std;

void Recoizer(string rootfile_name){

  string run_number = rootfile_name.substr(15,4);

  // Sets the reco file name
  string recofile_name = "../RootData/Run" + run_number + "_reco.root";

  // Creates a reco file using Offset_Settings.txt
  TFile file0(rootfile_name.c_str());
  TTree* t = dynamic_cast<TTree*>(file0.Get("rd51tb"));
  t->Process("Reco2d_ps.C+",recofile_name.c_str());

}
