Is there a way to write a TBox to a ROOT file with a name I give it? I am having trouble finding information on this. I am creating multiple TBoxes in a loop and writing them to the same file, so I would like to be able to assign them different names for when I read them out again.
What I tried was:
TBox* tt = new TBox(xmin, fit_value-fit_error, xmax, fit_value+fit_error);
tt->SetFillColor(kRed);
tt->SetFillStyle(3001);
tt->SetName(Form(“BoxError_vtx_%i”,qtBin_ofInterest));
tt->Write();
I can use “SetName” with other ROOT objects like histograms and TLatex, but apparently not with TBox since I get the error: "error: no member named ‘SetName’ in ‘TBox’ ".
Please read tips for efficient and successful posting and posting code
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided