Dear Chinmay,
Sorry for the late reply.
Using system(), actually gSystem->Exec(), is what I intented to suggest.
PROOF is multiprocess, so, as far as the processes (workers/slaves) are not writing ti the same file, I do not see problems with your way of doing. Do I understand correctly that you have an output file per event, i.e. per call to TSelector::Process()?
Sorry for the broken link: I will remove it; however, getCollection.C would have not give you much help, I am afraid.
The tutorial ‘dataset’ in tutorials/proof/runProof.C shows how to generate automatically a dataset out of the files you generate. I have extracted the essential parts into the macro attached (this is the way the tutorials will be provided in the future). The selector used is tutorials/proof/ProofNtuple.h,.C . It shows out to create TProofOutputFiles that automatically create a dataset. In your case you gave probably to create the TProofOutputFile in SlaveTerminate, because they are created in Process.
This said, if you have a list of the files you can create a TFileCollection (which is the way ROOT describes datasets) by putting them into a text file, for example mydatasetfiles.txt, one per line
$ cat mydatasetfiles.txt
# These are the files in my dataset
/path/to/file/one/f1.root
# The file path can be a url
root://some.serv.er//path/to/file/two/f2.root
and do
TFileCollection *fc = new TFileCollection("MyDataset", "", "mydatasetfiles.txt")
Then you can use it in PROOF:
proof->Process(fc, "MySelector.C+", ...)
G Ganis
prf007_dataset.C (4.89 KB)