> TFile *f = new TFile("d:\\data\\basic.root","RECREATE");
  Just a small comment:
  One can use "right" slash as well, like this:
   TFile *f = new TFile("d:/data/basic.root","RECREATE");
or even
  gSystem.cd("d:/");
  TFile *f = new TFile("/data/basic.root","RECREATE");
 Just to make code more "portable" across platforms.
                          Valery
Dr. Valeri Faine (Valery Fine)
    ------------ -------------   Phone: +41 22 767 4921
CERN                             FAX  : +41 22 767 7155
CH-1211 Geneva, 23               mailto:fine@mail.cern.ch 
Switzerland                      http://nicewww.cern.ch/~fine