Message: Re: Data file is re-written by all the threads in RunAction Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Data file is re-written by all the threads in RunAction 

Forum: Multithreading
Re: Question Data file is re-written by all the threads in RunAction (Abhijit Bhattacharyya)
Re: Feedback Re: Data file is re-written by all the threads in RunAction (Jonathan Madsen)
Date: 24 Aug, 2018
From: Abhijit Bhattacharyya <Abhijit Bhattacharyya>

Hi!

Thanks.

I already have both NeutRun::RecordEvent() and NeutRun::Merge(). The question is whether shall I save inside if(ISMaster()){...} loop or outside it within NeutRunAction::EndOfRunAction().

Best

Abhijit

On Fri, 24 Aug 2018 02:09:28 GMT, Jonathan Madsen wrote:

> If your derived NeutRun on the master thread does not have the correct
> number of events set, you are probably failing to call
> G4Run::Merge(const G4Run*) in NeutRun::Merge(const G4Run*)
> 
>   void NeutRun::Merge(const G4Run* aRun)
>   {
>       // include this function call
>       G4Run::Merge(aRun);
> 
>       // do the rest of the merge
>       fNeutron_Leak += aRun->GetNeutLeakingFlux();
>       fProton_Flux += aRun->fProton_Flux;
>   }
> 

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

1 Feedback: Re: Data file is re-written by all the threads in RunAction   (Jonathan Madsen - 24 Aug, 2018)
(_ Agree: Re: Data file is re-written by all the threads in RunAction   (Abhijit Bhattacharyya - 27 Aug, 2018)
 Add Message Add Message
to: "Re: Data file is re-written by all the threads in RunAction"

 Subscribe Subscribe

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