<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello, <br>
finally, I found the solution to this problem.<br>
This is due to transient string object created within a function and
returned with no copy...<br>
so, to solve the problem, one just have to replace, in
include/GateToRoot.hh the line<br>
<br>
<tt> const char* GetFilePath() { return
(m_fileName+".root").c_str();};</tt><br>
<br>
by<br>
<br>
<tt> const char* GetFilePath() { static char fp[512];
strncpy(fp,(m_fileName+".root").c_str(),511); return fp;};</tt><br>
<br>
and recompile, and all will be ok... (in the first version,
(m_filename+".root") is a new transiant object, deleted at the end of
the function, so its "c_str() member will not be valid outside of the
function itsef...)<br>
<br>
<br>
Thanks to all,<br>
<br>
cheers<br>
<br>
Simon Stute a écrit :
<blockquote
cite="mid:38e368330707190759i38dc3fcs180fba4d5435302@mail.gmail.com"
type="cite">Hi all,<br>
<br>
I remember I already had this problem on Suse10.2 and Ubuntu Dapper
6.0.6, but it appeared only few times and then it disappeared ...<br>
So I did not pay attention on the number or the type of characters
used. <br>
One thing is sure : this bug is very strange ...<br>
<br>
Simon<br>
<br>
<div><span class="gmail_quote">2007/7/19, Paola Solevi <<a
moz-do-not-send="true" href="mailto:Paola.Solevi@mib.infn.it">Paola.Solevi@mib.infn.it</a>>:</span>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi
corinne,<br>
I'm running GATE on scientific linux @ cern and I have the same problem<br>
for root file name longer than 10 characters (>10).<br>
<br>
paola<br>
<br>
On Thu, 19 Jul 2007, GROISELLE corinne wrote:<br>
<br>
> Concerning the problem we have with the root output file names
(replacing the predefined file name by a question mark), I'd like to
know if other people have the same problem when using the last version
of RH Enterprise.
<br>
We just tried on another system running Ubuntu 7.04 and everything
works fine!!!...<br>
><br>
><br>
><br>
> Sure, we could rename the files at the end of the simulation but
when running on a cluster or on multiprocessor systems, we would have
to create multiple directories to store these files all sharing the
same name.
<br>
><br>
><br>
><br>
> Corinne<br>
><br>
> ________________________________<br>
><br>
> De : Roberta Matheoud [mailto:<a moz-do-not-send="true"
href="mailto:roberta.matheoud@maggioreosp.novara.it">roberta.matheoud@maggioreosp.novara.it
</a>]<br>
> Envoyé : jeudi 19 juillet 2007 11:14<br>
> À : GROISELLE corinne<br>
> Objet : Re: [Gate-users] benchmarkPET<br>
><br>
><br>
><br>
> Hi,<br>
><br>
><br>
><br>
> I had the same problem when I named the *.root file using number
and '_'. When your simulation will end, you can rename the '?' file
using the name you want, i.e. test.root, and analyze it with Root.<br>
><br>
><br>
><br>
> Bye<br>
><br>
><br>
><br>
> Roberta<br>
><br>
> ----- Original Message -----<br>
><br>
> From: GROISELLE corinne <mailto:
<a moz-do-not-send="true" href="mailto:corinne.groiselle@sodern.fr">corinne.groiselle@sodern.fr</a>><br>
><br>
> To: <a moz-do-not-send="true"
href="mailto:gate-users@lists.healthgrid.org">gate-users@lists.healthgrid.org</a><br>
><br>
> Sent: Thursday, July 19, 2007 10:57 AM
<br>
><br>
> Subject: RE: [Gate-users] benchmarkPET<br>
><br>
><br>
><br>
> I haven't changed anything in the macro files and the
default name for the root output was set to 'benchmarkPET' in '
benchmarkPET.mac'.<br>
><br>
> It's 12 characters long!<br>
><br>
><br>
><br>
> Corinne<br>
><br>
><br>
><br>
><br>
> ________________________________<br>
><br>
><br>
> De : Georgi Gerganov [mailto:
<a moz-do-not-send="true" href="mailto:ggerganov@gmail.com">ggerganov@gmail.com</a>]<br>
> Envoyé : jeudi 19 juillet 2007 10:48<br>
> À : GROISELLE corinne<br>
> Cc :<br>
> Objet : Re: [Gate-users] benchmarkPET<br>
><br>
><br>
><br>
> Hi,<br>
><br>
> I think you should check what is the root-output filename
set to. Open the 'benchmarkPET.mac':<br>
><br>
> ...<br>
> /gate/output/root/setFileName [somename]
<br>
> ...<br>
><br>
> [somename] should be at least 12 characters long. Otherwise
the "?"-file is generated.<br>
> Hope this helps you. Good luck!<br>
><br>
> Georgi<br>
><br>
> On 7/19/07, GROISELLE corinne <<a moz-do-not-send="true"
href="mailto:corinne.groiselle@sodern.fr">corinne.groiselle@sodern.fr</a>
> wrote:<br>
><br>
> Hello,<br>
><br>
> I just installed gate on a new system and I wanted to run
benchmarkPET to verify the installation was correct.
<br>
><br>
> I just ran "Gate" from the benchmarkPET directory and a file
named "?" that seems to be the root output was generated.<br>
><br>
> The file size is growing and the simulation seems to be
running correctly.
<br>
><br>
> Did someone already encounter this problem?<br>
><br>
> Thanks,<br>
><br>
> Corinne Groiselle<br>
><br>
><br>
><br>
><br>
><br>
> Direction de l'Ingénierie et des Moyens Industriels Communs
<br>
><br>
> Département Etudes Systèmes Neutroniques<br>
><br>
> 20, avenue Descartes 94451 Limeil Brévannes Cedex, France<br>
><br>
> Tel : + 33 (0) 1 45 95 70 00 poste 7708<br>
><br>
> Courriel : <a moz-do-not-send="true"
href="mailto:corinne.groiselle@sodern.fr">corinne.groiselle@sodern.fr</a><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Gate-users mailing list<br>
> <a moz-do-not-send="true"
href="mailto:Gate-users@lists.healthgrid.org">Gate-users@lists.healthgrid.org</a><br>
> <a moz-do-not-send="true"
href="http://lists.healthgrid.org/mailman/listinfo/gate-users">http://lists.healthgrid.org/mailman/listinfo/gate-users</a>
<br>
><br>
><br>
><br>
><br>
> ________________________________<br>
><br>
><br>
> _______________________________________________<br>
> Gate-users mailing list<br>
> <a moz-do-not-send="true"
href="mailto:Gate-users@lists.healthgrid.org">
Gate-users@lists.healthgrid.org</a><br>
> <a moz-do-not-send="true"
href="http://lists.healthgrid.org/mailman/listinfo/gate-users">http://lists.healthgrid.org/mailman/listinfo/gate-users</a><br>
><br>
><br>
_______________________________________________
<br>
Gate-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:Gate-users@lists.healthgrid.org">Gate-users@lists.healthgrid.org</a><br>
<a moz-do-not-send="true"
href="http://lists.healthgrid.org/mailman/listinfo/gate-users">http://lists.healthgrid.org/mailman/listinfo/gate-users
</a><br>
<br>
</blockquote>
</div>
<br>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Gate-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gate-users@lists.healthgrid.org">Gate-users@lists.healthgrid.org</a>
<a class="moz-txt-link-freetext" href="http://lists.healthgrid.org/mailman/listinfo/gate-users">http://lists.healthgrid.org/mailman/listinfo/gate-users</a>
</pre>
</blockquote>
</body>
</html>