I am just curious to know if it is possible to save the canvas or histogram in a tree. I mean currently, I am writing the canvas (or histogram) directly in a root file, without creating a tree. Here is the pseudo-code of what I am doing,
TFile *f1 = new TFile("test.root", "RECREATE");
TCanvas *can = new TCanvas("can", "can", 750, 500);
// Add histogram to the canvas
can -> Write();
As you can notice, there is no TTree
in the code. It would be more organized if I can save this canvas in different branches of a tree.
Please suggest something. Because my analysis involves a lot of plots.
Thanks,
Divyang.