#include "IonTrack.h" #include "ROOT/RDataFrame.hxx" #include "ROOT/RDataSource.hxx" #include #include "ROOT/RVec.hxx" #include using namespace std; using namespace ROOT; void CT_RDF(Int_t RunNr) { // TStopwatch ClockTime; // ClockTime.Reset(); // ClockTime.Start(); if (!TClass::GetDict("IonTrack")) { gROOT->ProcessLine(".L IonTrack.h++"); } string OriB_A[] = {"TP_X", "TP_Y", "TP_Theta", "TP_Phi", "Xf", "Yf", "Tf", "Pf", "Path", "Brho", "TMW1_XLor", "TMW2_XLor", "FPMW0_XLor", "FPMW1_XLor", "TMW1_YLor", "TMW2_YLor", "FPMW0_YLor", "FPMW1_YLor"}; std::vector OriB_V(std::begin(OriB_A), std::end(OriB_A)); string ITrackB_A[] = {"TP_X", "TP_Y", "TP_Theta", "TP_Phi", "Xf", "Yf", "Tf", "Pf", "Brho", "Path", "TMW1_XLor", "TMW2_XLor", "FPMW0_XLor", "FPMW1_XLor", "TMW1_YLor", "TMW2_YLor", "FPMW0_YLor", "FPMW1_YLor"}; std::vector ITrackB_V(std::begin(ITrackB_A), std::end(ITrackB_A)); RDataFrame d("TreeMaster", Form("RDF_input.root")); Char_t outfname[200]; sprintf(outfname, Form("RDF_output.root")); d.Define("ITrack", SetITrack, ITrackB_V).Snapshot("t2", outfname, {"ITrack"}); cout << "Create file : " << outfname << endl; // ClockTime.Stop(); // cout << "CPU time : " << ClockTime.CpuTime() << endl; // cout << "Real time : " << ClockTime.RealTime() << endl; }