Re: multiple histos with the same name

From: Brett Viren <bv_at_bnl.gov>
Date: Wed, 08 Jun 2005 13:57:16 -0400


Hi Rene,

We had a similar issue with histogram name clashes. In our case it was triggered by multiple instances of the same analysis modules (each configured differently) wanting to write the same named histograms in one job.

We overcame this by developing a little class (HistMan) that helps organize histograms in a hierarchy of TFolders which can optionally be rooted in the "//root/ROOT Memory" folder, thus visible from a TBrowser. SetDirectory(0) is called as in your example to detach the histogram from ROOT's bookkeeping. Each analysis module is then assigned a unique path in the hierarchy thus allowing same-named histograms to exist and be kept separate.

This class also provides a simple Book/Fill and I/O interface. It's only dependent on ROOT and the code is here if anyone is interested:

http://minos.phy.bnl.gov/software/hm/HistMan/

This talk gives some description:

http://minos.phy.bnl.gov/~bviren/talks/collaboration/ely2005/histman/histman.pdf

(You get to see the talk a week before my collaborators <grin>).

Regards,
-Brett. Received on Wed Jun 08 2005 - 20:03:43 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:09 MET