Drawing histograms from a root file with directories

From: Suvayu Ali <fatkasuvayu_at_gmail.com>
Date: Sat, 1 May 2010 17:43:07 -0700


Hi ROOT users,

I am not very well versed with ROOT and I am stuck with something very basic. I have a root file with lots of directories with lots of histograms. I want to plot all the TProfiles with their name starting with a certain string in my own style and then save these plots in a png file.

To achieve this I wrote the attached script. To navigate within the root file I took hints from $ROOTSYS/tutorials/io/readCode.C.

But I still can't seem to recurse through the directories and find my histograms. I had to replace the "key->IsFolder()" check with "key->InheritsFrom("TDirectory")" as my file contains a TTree with metadata in each folder, and the script tries to recurse into it.

Where am I going wrong?

Thanks for any help.

[1]<http://hep.phys.sfu.ca/~suvayu/mergedMonitor_collision_7TeV_153565_v3b.root>

-- 
Suvayu

Open source is the future. It sets us free.

Received on Sun May 02 2010 - 02:43:19 CEST

This archive was generated by hypermail 2.2.0 : Sun May 02 2010 - 17:50:01 CEST