I have a root file including some canvases. Here I attached a code to print these canvas into a ps file according to the instruction of root web page. But a problem I met is: last canvas cannot be printed correctly into the file (just print one part of the canvas). I check the root file, it seems no problem for the last canvas. So I am wondering what’s up for my code here. I also attach my root file here (test.root). My root version is v04.04.
f = new TFile("test.root","READ");
TList *objlist = gDirectory->GetListOfKeys();
TIterator *can_itr = objlist->MakeIterator();
while ( (k2 = static_cast<TKey*>(can_itr->Next())) !=0 )
can = (TCanvas*)k2->ReadObj();
test.root (71.1 KB)