<div dir="ltr"><div class="gmail_default" style="font-family:comic sans ms,sans-serif;font-size:small">Dear Gaters,<br><br>My version of GATE not allow me to use the output format in ascii, so I have my data only in ROOT and then through a macro generate in ascii .<br>The following code passes a histogram to ascii:<br><br>void ascii(){<br>const Int_t foutPrecision=14;<br>int i;<br>// Make an ofstream object<br>ofstream fout ("OUTPUT_ASCII.txt");<br>//count << "Writing ascii file" << pAsciiFileName << "..."<<endl;<br>fout.precision(foutPrecision);<br> for (i=0; i<<4092; i++){<br> fout << NAME_HISTOGRAM->GetBinContent(i)<<"";<br> }<br>fout.close();<br>}<br><br>My problem is that I need to use the histograms of the branches of the tree-coincidences and if I change variable,it gives me an error. <br>I do not know if it would have to put, for example :<br>TTree *Coincidences = (TTree*)gDirectory->Get("Coincidences");<br>or<br>Coincidences->SETBranchAddress ("sourcePosX1",&sourcePosX1)<br><br>Any idea on what I can do?<br><br>Cheers, <br>Lorena<br clear="all"></div><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><pre>LORENA VÁZQUEZ CANELAS<br>-- <br>LRI - Datación (Despacho Técnicos)<br>Calle Espejo, s/n, 37008 - Salamanca (Spain)<br>TEL: +34 923 294930 ext:4932 email: <a href="mailto:lorena.vazquez@usal.es" target="_blank">lorena.vazquez@usal.es</a><br>web: <a href="http://campus.usal.es/%7Elri/" target="_blank">http://campus.usal.es/~lri/</a></pre></div></div></div></div></div></div></div></div></div></div>
</div>