Message: How to output data in files by incrementing its name Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None How to output data in files by incrementing its name 

Forum: Run Management
Date: 07 Oct, 2014
From: Pierre <Pierre>

Hi G4users,

I would like to increment two variables in my application : the energy and the name of the output file.

For example :

1.0 MeV -> "Data_1.0MeV.txt" 1.1 MeV -> "Data_1.1MeV.txt" ...

I have found how to implement easily the energy in a macro with the command :

/control/loop macro.mac {energycounter} 'i' 'j' 'step'.

with the macro.mac :

/gun/energy {energycounter} MeV

But not for the output.

My idea is to do the same thing for the file name with something like :

/output macro.mac {filenamecounter} ...

And here is where I block.

Do you have some idea ?

Thanks for helpful discussions

 Add Message Add Message
to: "How to output data in files by incrementing its name"

 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 ]