Hi,<br><br>Really good job David !! This error has already caused too much problem but that's all now !<br>And this is probably the same thing in the GateToLMF class because some similar problem has already occurred and perhaps in other output classes.
<br>Thanks again.<br><br>Cheers<br>Simon<br><br><div><span class="gmail_quote">2007/7/25, David GUEZ <<a href="mailto:davguez@free.fr">davguez@free.fr</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div 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 type="cite"><div><span class="e" id="q_113faeb59b56f2a2_1">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 href="mailto:Paola.Solevi@mib.infn.it" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">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 href="mailto:roberta.matheoud@maggioreosp.novara.it" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">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 href="mailto:corinne.groiselle@sodern.fr" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">corinne.groiselle@sodern.fr</a>><br>
><br>
> To: <a href="mailto:gate-users@lists.healthgrid.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">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 href="mailto:ggerganov@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">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 href="mailto:corinne.groiselle@sodern.fr" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">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 href="mailto:corinne.groiselle@sodern.fr" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">corinne.groiselle@sodern.fr</a><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Gate-users mailing list<br>
> <a href="mailto:Gate-users@lists.healthgrid.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Gate-users@lists.healthgrid.org</a><br>
> <a href="http://lists.healthgrid.org/mailman/listinfo/gate-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.healthgrid.org/mailman/listinfo/gate-users</a>
<br>
><br>
><br>
><br>
><br>
> ________________________________<br>
><br>
><br>
> _______________________________________________<br>
> Gate-users mailing list<br>
> <a href="mailto:Gate-users@lists.healthgrid.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Gate-users@lists.healthgrid.org</a><br>
> <a href="http://lists.healthgrid.org/mailman/listinfo/gate-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.healthgrid.org/mailman/listinfo/gate-users</a><br>
><br>
><br>
_______________________________________________
<br>
Gate-users mailing list<br>
<a href="mailto:Gate-users@lists.healthgrid.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Gate-users@lists.healthgrid.org</a><br>
<a href="http://lists.healthgrid.org/mailman/listinfo/gate-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.healthgrid.org/mailman/listinfo/gate-users
</a><br>
<br>
</blockquote>
</div>
<br>
</span></div><pre><hr size="4" width="90%"><span class="q">
_______________________________________________<br>Gate-users mailing list<br><a href="mailto:Gate-users@lists.healthgrid.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Gate-users@lists.healthgrid.org
</a>
<a href="http://lists.healthgrid.org/mailman/listinfo/gate-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.healthgrid.org/mailman/listinfo/gate-users</a>
</span></pre>
</blockquote>
</div>
<br>_______________________________________________<br>Gate-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Gate-users@lists.healthgrid.org">Gate-users@lists.healthgrid.org</a>
<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.healthgrid.org/mailman/listinfo/gate-users" target="_blank">http://lists.healthgrid.org/mailman/listinfo/gate-users</a><br><br></blockquote>
</div><br>