[gate-users] Maximum file size exceeded problem

Giovanni Santin giovanni.santin at cern.ch
Mon Sep 27 13:10:35 CEST 2004

dear amarnath

here it is
I attach a small patch to the existing distribution, I think it contains 
all the necessary files.
Please note that this is not an official release of the code, so I just 
hope that it's working properly and not creating problems ;-)
(it will probably come out in the next release, anyway)

Below you can find the documentation that will come out in the 
next release regarding these changes.

Best regards,
Giovanni Santin
Space Environments and Effects Analysis
Keplerlaan 1, 2200 AG Noordwijk, Netherlands
e-mail: giovanni.santin at esa.int
Tel: +31 71 565 6267
Fax: +31 71 565 4999

Selection of the variables in Singles$/$Coincidences ASCII output

The user can select with a macro command which variables he/she wants in 
the ASCII file. 
The mechanism is based on a mask with a mask, i.e. a series of
0/1, one for each variable. By default all variables are enabled, but one
can choose to enable only some of the variables listed before.
One example is:

/gate/output/ascii/setCoincidenceMask 1 0 1 0 1 1
/gate/output/ascii/setSingleMask 0 0 1 1

Note: the VolumeID variables are enabled/disabled together, as a group. 
The component of the 
3D vectors, instead, like the positions (components x,y,z), are 
enabled/disabled one by one.

Large files: automatic file swap for the ASCII output

When a user defined limit is reached by the Coincidence or Single ASCII
output file, by default Gate closes the file and opens another one with
the same name but a suffix \_1 (and then \_2, and so on).
By default the file limit is fixed to 2000000000 bytes.
One can change the number of bytes with a command like

/gate/output/ascii/setOutFileSizeLimit 30000

If the value is < 10000, no file swapping is made (to avoid creating
thousands of files by mistake).

For example, if one doesn't have a limit in the Operating System, he/she 
can put the number to 0, and there will be only one large (large) file in 
the end.

In case of high statistics applications, one might consider enabling only 
the ROOT output, which contains the same information as the ASCII one, 
but automatically compressed (and, in addition, ready for analysis).

On Fri, 24 Sep 2004, Amarnath Srinivasan wrote:

> Hello Mr. Santin
> I would like to have the modified files for gate that you wrote about in
> the 
> previous mail. Could you please send a copy of that.
> Also can someone tell me the gate source file that takes care of writing
> out 
> the ascii outputs. I would like to do some modifications on it.
> Thankyou
> amarnath
> >>> giovanni.santin at cern.ch 09/19/04 3:38 AM >>>
> Dear Amarnath
> I was not aware of any solution to this problem via compilation flags.
> It sounds interesting. 
> Nevertheless, in the last days I wrote a few modifications to Gate to
> have 
> an automatic file swap when the file size exceeds a user defined limit. 
> The old file fileCoincidences.dat is then closed and a new one 
> fileCoincidences_1.dat is opened.
> This should work for both Coincidences and Singles.
> The file size limit is set to 2GB by default, and the user can set it to
> a 
> different value, or to zero (in this case no file swap is done).
> In addition, there will be the possibility to choose the variables to 
> include in Coincidences and Singles ASCII files, with a mask.
> I hope the new additions will come out soon in the next release, but we
> still need to wait for some validation feedback as usual before
> releasing 
> the code.
> If the release will wait, I'll make the single modified files available 
> for testing.
> Best regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GateASCIIModifs.tgz
Type: application/x-gzip
Size: 10031 bytes
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20040927/c73ec47c/attachment.bin>

More information about the Gate-users mailing list