Problem when writing TCanvas into root file

I was using CMSSW_1_1_0 and planing to put some TCanvas in a root file.
I found that it works sometimes, not always.

My observation suggests that when running over a few hundreds event, then it works. But if runing over a few thousand, no TCanvas was written. However, all histograms are there in all cases. It’s quite strange for me. Anyone met the same problem?


I am afraid that you will have to provide more info if you want a solution
to this problem.



I may found the reason.
If I was reading more than 1 file from castor, then no TCanvas can be written.
So after I copy and combine the files, it works no matter how many events there.

Could be something wrong with castor instead of root?