Archive for April, 2010

How to disable the prompt to continue in TTree::Scan(..)

Posted on April 2, 2010. Filed under: Uncategorized | Tags: , , , |

I was recently wondering how to disable the periodic prompt:

Type <CR> to continue or q to quit ==>

when using TTree::Scan(…) in root. Disabling this can be useful when dumping a list of values into a file. By default, it seems that ROOT asks for a confirmation to continue every 25 rows.

After search quite a bit, I found that one can use

  tree->SetScanField(0)

where tree is an instance of the class TTree (or a descendant such as TNtuple) to disable this prompt. Setting it to a positive value n will stop every n rows.

Read Full Post | Make a Comment ( 4 so far )

Liked it here?
Why not try sites on the blogroll...