[Halld-offline] Issue with TChain in DSelector

Beni Zihlmann zihlmann at jlab.org
Thu Jan 24 13:37:34 EST 2019


Hi All,

I use the DSelector to analyze some trees.
The trees are put into a TChain object for every tree like this:
  chain.Add(f.c_str());
in my script where f is the tree file.

In my DSelector Init() method I open a file stream like this:
   OUTF.open("eta_event_list.dat", ios::out);

And in DSelector Process() method at the end of the method I write a 
string to the file
     OUTF<<ofline<<endl;

and In DSelector Finalize() method I close the file.

the issue I see is that only my first Tree ends up in the output file 
OUTF all other trees/files
do not. In other words writing to the output stream OUTF stops after the 
end of the first tree.

Any idea what I do wrong?
PS: The code is on the work disk at 
/w/halld-scifs17exp/halld2/home/zihlmann/HallD/work/tmp
The script that creates the chain and launches the DSelector is doanal.C
the DSelector files *.h and *.C are there too.

cheers,
Beni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jlab.org/pipermail/halld-offline/attachments/20190124/d9ca2dfd/attachment.html>


More information about the Halld-offline mailing list