{ TFile f("aaa_0001.root", "Recreate"); TTree h11("h11", "h11"); Float_t x; h11.Branch("x", &x, "x/F"); TRandom *rand = new TRandom(); for(Int_t i=0; i<10000; i++) { x = rand->Gaus(1.0, 1.0); h11.Fill(); } h11.Write(); f.Close(); }