Message: Re: read from input in PrimaryGeneratoraction and get event no Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: read from input in PrimaryGeneratoraction and get event no 

Forum: Event and Track Management
Re: Question read from input in PrimaryGeneratoraction and get event no (Tapasi Ghosh)
Date: 07 Jan, 2009
From: Gumplinger Peter <Gumplinger Peter>

Hi Tapasi,

You need to open your file in IcalPrimaryGeneratorAction(). - GeneratePrimaries() is called for every event so you don't want a while loop. Instead, you need to write protection that when the file has reach its end, it'll close gracefully, or rewind. Alternatively, since you know the number of lines # in the file, you may just issue: /run/beamOn #.

Peter

 Add Message Add Message
to: "Re: read from input in PrimaryGeneratoraction and get event no"

 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 ]