Wednesday, March 21, 2007

ROOT: how to use Scan

In ROOT (http:root.cern.ch), if you wanna to open remote root file and browse its structure or data, it is very slow if using tree->Draw() method. So, you could use tree->Scan() to browse data:

 For example:
tree->Scan("a:b:c","","colsize=30 precision=3 col=::20.10:#x:5ld");
Will print 3 columns, the first 2 columns will be 30 characters long,
the third columns will be 20 characters long. The printing format used
for the columns (assuming they are numbers) will be respectively:
%30.3g %30.3g %20.10g %#x %5ld

No comments:

Locations of visitors to this page