Message: ROOT histograms: cycle number and hadd. Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question ROOT histograms: cycle number and hadd. 

Forum: Analysis
Date: 23 Aug, 2016
From: Steve Quillin <Steve Quillin>

Greetings

I'm using G4AnalysisManager to save histogram data to ROOT files for multiple runs of my application. The histogram names and titles are identical for all runs although a new filename is generated in RunAction for each run. I write the data and close the files in RunAction::EndOfRunAction.

All works well except that I get a new cycle number added to each histogram with each run. In ROOT if I open the file from the first run (runO) and do run0file.ls(), I get:-

KEY: THD                    det0;1                 det0 

If I do the same with the file from the third run (run2) I get:-

KEY: THD                    det0;3                 det0
KEY: THD                    det0;2                 det0
KEY: THD                    det0;1                 det0

and so on.

My problem is that all the data is held under the lowest cycle number key with the remaining higher key number histograms containing no entries. 
If I run hadd on the root files generated by multiple runs of my application, it automatically loads the highest cycle number available and reports successfully combining the correct number of histograms. However, it is in effect just copying the data from run0. 
Does anyone have any advice on how to correctly combine the root data from many runs? Am I doing something wrong? 

Thanks 

Steve

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: ROOT histograms: cycle number and hadd.   (Ivana Hrivnacova - 23 Aug, 2016)
 Add Message Add Message
to: "ROOT histograms: cycle number and hadd."

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]