[Gate-users] Bug in GateToRoot

Hannes Hofmann opengate at f00f.de
Mon Dec 3 13:03:43 CET 2007


Attached is a patch file that works fine for me (gate 3.1.1).
Produces file names my1.root and my1Voxels.root

Please check whether it's useful for others.

Kind regards,
Hannes


On 26/11 15:14, Hannes Hofmann wrote:
> Hi,
> 
> I noticed a bug when running a simulation with a voxelized phantom on a
> cluster.
> As you know Gate writes a file called gateVoxels.root when using a
> voxelized phantom. This file seems to be written at the time when the
> phantom is read. In the default macro from benchmarkSPECT the filename
> for root output gets set after that, so all jobs try writing to the same
> file with the default name gateVoxels.root which results in stale NFS
> handles in my case.
> First i tryed setting the filename at the beginning of the macro, which
> resolves part of the problem. But the file then get called
> benchmarkSPECT1.rootVoxels.root which is ugly and inconsistent to the
> main root file (called benchmarkSPECT1.root).
> The cause is that GateToRoot::SetFileName as defined in
> include/GateToRoot.hh appends ".root" to the filename and
> GateToRoot::RecordVoxels in src/GateToRoot.cc appends "Voxels.root" to
> that. Furthermore m_fileName gets initialized with "gate".
> 
> I suggest to
> - Initialize m_fileName with "gate" (no change)
> - Not append ".root" in SetFileName
> - Instead append ".root" in GetFileName/GetFilePath
> - Directly use m_fileName in RecordVoxels and append "Voxels.root" (no
>   change)
> - Use GetFileName/GetFilePath everywhere else
> - Move /gate/output/root/setFileName somewhere before the phantom
>   definition
> 
> That way each job would create its own benchmarkSPECT1Voxels.root
> 
> Looking forward to your comments,
> Hannes
> 
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.healthgrid.org
> http://lists.healthgrid.org/mailman/listinfo/gate-users
> 



More information about the Gate-users mailing list