Filling TH1F histo from file: possible?

Hi all,
can anybody tell me if it is possible filling a TH1F histo directly from a file (having one only column, of float numbers)?
Namely, does it exist anything like h1->Fill(“datafile.dat”) ?


Assuming a file test.dat containing one or more columns of data, create a small Tree and produce an histogram (see examples in $ROOTSYS/tutorials/tree)

void test() { //read one column from a text file and histogram it TTree T("T","test"); T.ReadFile("test.dat","x"); T.Draw("x"); }