Handling output file in PROOF (Saving text files and images)

Dear experts,

I’m trying to obtain text files and images (pdf, jpeg, whatever) using a PROOF session.

While there are no problems for obtaining a final TTree, I’ m experiencing problem with text files and images. My code (a TSelector) printouts and saves in a text file the number of events and several images. Since PROOF splits the job I have the following issues:

  • the printout (I can read it from PROOF log files) corresponds to the fraction of event processed in each worker (which, I suppose is expected)
  • the text file is not created
  • When trying to save plots I obtain the following error

Error in <TSelectorList::CheckDuplicateName>: an object with the same name: c_CR1e_metnoel_el_jet_dR_min is already in the list

How can I correctly obtain the final text files with all merged numbers (where “merged” in this case means added, not lined) and images?

Another question is on how to save output file in a specific directory. When running PROOF to produce ntuples I would like to save the outputs in a directory different with respect where my running macro is placed.

Thanks for the attention.

Best regards,

Lxplus setup
ROOT 6.10/04
x86_64-pc-linux-gnu, 6.2.0

Dear Francesco,

The PROOF worker processes redirect both standard output and standard error to the log file. You should find your printouts in there.
An alternative way to work with files is to use the TMacro class. You can create a TMacro in each worker, in SlaveBegin for example, and add it the output list; on return you will have one macro per worker in the final output list; to build a name unique for each worker you can use the variable

 #include "TProofServ.h"
 gProofServ->GetOrdinal()   // Ordinal in the form "0.0", "0.1", ... 

How do you create the text file? Did you check the worker sandboxes?

Could you please say more on what you mean by “saving plots”? Do you create separate images on workers? What would you expect in output? One image of the same the same type per worker?

Do you mean a local directory, wrt to where you start the ROOT session?

G Ganis

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.