Message: Re: Set number of events Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Set number of events 

Forum: Event and Track Management
Re: None Set number of events (Vlasios Vasileiou)
Date: 24 Apr, 2004
From: Tom Roberts <Tom Roberts>

When I don't know how many events are in an input file, what I do is call runManger->BeamOn(999999999), and simply read the file one event at a time inside UserGeneratePrimaries(), and when the read() returns EOF I do this:

        // RunManager cannot abort the event from inside
        // UserGeneratePrimaries(), so we do a soft abort
        // to the RunManager, and abort the event ourself.
        // The result is the same as a hard abort.
        // set internal variables as needed

The result is the run ends when the input file ends.

(Note this is geant4 5.2p02; I don't know if v6 changed any of this.)

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

 Add Message Add Message
to: "Re: Set number of events"

 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 ]