I am trying to create a subdirectory ( a directory inside another directory) and write data to it. I am not sure what i am doing wrong:
- Code: Select all
TFile *file = fChain->GetCurrentFile();
file->cd();
file->mkdir("Thermal/");
file->cd("Thermal/");
AnalysisResultTuple.Write("",TObject::kOverwrite);
file->cd();
file->mkdir("Thermal/Zdepth");
file->cd("/Thermal/Zdepth/");
thermal_depthSlicesHist->Write("",TObject::kOverwrite);
thermal_depthSliceEkinHist->Write("",TObject::kOverwrite);
thermal_depthSliceEdepHist->Write("",TObject::kOverwrite);
Using a TBrowser, files are not written in the proper subdirectory. They are written at the file.root:/ level directory. What am I doing wrong??
Thxs,