Print histogram to asci file

Hello,
Could you help me with printing values of histogram to file?
Now I use string


h2->Print(“all”);


and it print values to the screen. But due to large amount of data (about 10000 point) it is not so comfortable. Is it possible to print data directly to the file using some format staitment?

Thank you in advance,
Sergey ISAEV,
IPN, France

Do:

h2->Print(“all”); >file.txt

Rene