Re: How to create more than one output event in FairTask Exec()-function? [message #23793 is a reply to message #23789] |
Wed, 27 March 2019 12:32 |
C. A. Douma
Messages: 88 Registered: September 2015 Location: Groningen
|
continuous participant |
From: *kvi-cart.rug.nl
|
|
Dear Jan,
The ultimate goal of this exercise is to do my simulations in multi-thread mode.
To avoid the complicated C++ multithread programming, my thoughts went to using
a bash-script for running, say, 4 copies of r3b_sim.C in parallel (in different shells).
Then, I can run your digitizer afterwards (also 4x in different shells).
However, this will then produce 4 distinct .root-files, all with their own
digitizer output tree. Hence, I wanted to write another FairTask that does
nothing more then merging these 4 files into one. But since FairTask
runs Exec() ones per event and reads & writes one event at a time,
taking event 1 from 4 different files & writing them as event 1,2,3,4
does not seem possible withing Exec(). Hence my question: can I manually
call a write & reset function for the output TClonesArray?
In that Case, I can use AddFriend() on the 4 digitizer files, read one
event from each file during one Exec()-call and then call the write & reset
function 4 times to produce 4 output events within that same Exec()-call.
Christiaan.
|
|
|