Message: Re: Memory use by ROOT histograms Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Memory use by ROOT histograms 

Forum: Analysis
Re: Question Memory use by ROOT histograms (Alexander Zyazin)
Re: None Re: Memory use by ROOT histograms (Andreas Pfeiffer)
Re: None Re: Memory use by ROOT histograms (Ivana Hrivnacova)
Re: None Re: Memory use by ROOT histograms (Alexander Zyazin)
Date: 27 May, 2014
From: Ivana Hrivnacova <Ivana Hrivnacova>

Hi Alexander,

If you fill your histograms per event it is not very wise to create them all at once and keep in memory for the whole run. You could better create them at BeginOfEvent and write them in a file at the EndOfEvent, then clear the object and reuse the same histogram in the next event. g4tools supports writing the same object in a file several times, so this is already feasible with the analysis code in Geant4 10.00.p01 (just one fix in G4RootFileManager is needed for this).

However this can be used only in sequential mode, as it is not possible from the user code to inactivate merging the histograms from threads to the master. To support such mode would require adding an option to G4AnalysisManager::Write(G4bool), which could be used in the user code to inactivate this merge.

Just to get a better idea about your application, could you let us know, how many fills do you call per histogram and event in average? Did you consider to use ntuple instead of histograms? The ntuples are produced per threads and are not merged to the master file.

Best regards,

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

1 None: Re: Memory use by ROOT histograms   (Alexander Zyazin - 28 May, 2014)
 Add Message Add Message
to: "Re: Memory use by ROOT histograms"

 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 ]