How many processes run wrt my input files?

Hi,

I usually create a tchain and then add my files to it.

file.1.root file.2.root file.3.root file.4.root file.5.root file.6.root ... file.N.root

Then I call TChain::Process and get output objects. Since my files are independant. Could it be better to generate N tchain and then call N times TChain::Process or create one tchain and call one time TChain::Process ?

I ask the question because then I need to split the output objects anyway and store them into :

output.1.root ... output.N.root

I am still a little bit puzzled, trying to correctly arrange my output object with respect to my input tree, in the case I process 1 time the N files. I was thinking to get a TTree with the following branches : run:spill:hist1:hist2:hist3
Then I will have anyway have to re-read the tree and split by run and spill.

What would be the best solution ?

Hi,

I think the best way to tackle the issue given that you need to have different results for different trees is to treat the N trees independently.
You could even resort to the TProcPool::Map utility (ROOT::TProcessExecutor in the master and forthcoming 6.08) to treat this processing in parallel.
See root.cern.ch/doc/master/mp001__ … os_8C.html

Cheers,
D