How to redirect Print() output

I want to redirect the output of a bunch of Print() statements (some
are THns, some TTrees, etc), to an ostringstream. I have tried redirecting
cout by modifying the rdbuf(), but I see from the ROOT code that Print()
uses printf and not cout. Any suggestions?

                         Charles.

Hi,

There is no direct way to do so [We should update the Printf method so that it could be done]
The best you can do is to redirect to a file. It can as simple as:

Cheers,
Philippe.