Message: How to close file after G4RootAnalysisReader Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None How to close file after G4RootAnalysisReader 

Forum: Analysis
Date: 29 Aug, 2017
From: Linlin Zhang <Linlin Zhang>


Recently, there is one problem. When using MPI, every thread will generate one root file. After run action, I will merge the root files by reading each thread root file through G4RootAnalysisReader. After merge, I want to delete the thread files at the endofRunAction, but failed.

After testing, the reason is that files read by G4RootAnalysisReader are not closed. G4RootAnalysisReader does not provide close file member function. Maybe I did not find the correct method to close file.

Does anyone know how to close the file?

Temporally, I added one closeFile() member function in G4RootAnalysisReader to solve the problem. But it will be good if this can be done in official version.

Thanks, Linlin

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

1 None: Re: How to close file after G4RootAnalysisReader   (Ivana Hrivnacova - 30 Aug, 2017)
(_ None: Re: How to close file after G4RootAnalysisReader   (Linlin Zhang - 30 Aug, 2017)
 Add Message Add Message
to: "How to close file after G4RootAnalysisReader"

 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 ]