Hi, I have the following code
TObjArray plotList(0);
TH2F *plot = new TH2F(“plot name”, “plot title”, 10, 1, 10, 10, 1, 10);
plotList.Add(plot);
/// here goes part generating x,y,z
for (…)
{
plot->Fill(x,y,z);
}
TFile f(“test.root”, “recreate”);
plot.Write();
f.Close();
Now I would like to somehow add custom point with TMarker on top of the TH2F, so that it gets written into .root file
The tutorials that I found instantiate TMarker, then proceed with calling the Draw() method, but I did not find how to store the TMarker into .root file