Message: A small question found in exampleB1 Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question A small question found in exampleB1 

Forum: Documentation and Examples
Date: 22 Aug, 2016
From: Huagang Yan <Huagang Yan>

I found that in the actual code of exampleB1, the action initialization is implemented with

runManager->SetUserInitialization(new B1ActionInitialization());

in class B1ActionInitialization, there is a method called Build() uses SetUserAction.

In contrast, the code in the Geant4 user's guide application developers(for a modified exampleB1) is

runManager->SetUserAction(new B1PrimaryGeneraatorAction());

runManager->SetUserAction(new B1SteppingAction());

runManager->SetUserAction(new B1EventAction());

runManager->SetUserAction(new B1RunAction());

I am surprised because the method Build() in B1ActionInitialization seems never called while the single command "runManager->SetUserInitialization(new B1ActionInitialization())" still works.

I just wonder there is any difference, or the code in the guide might be an obsolete version?

Any help on this issue is appreciated.


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

1 None: Re: A small question found in exampleB1   (Makoto Asai - 22 Aug, 2016)
 Add Message Add Message
to: "A small question found in exampleB1"

 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 ]