Collections in PROOF


I would like to get some expert advice on which is the best way to have a collection of objects filled in PROOF. The use case here is that I would like to store the run and event numbers (plus probably some other information) of those events selected in my analysis. At the end of the processing I would write them to the screen and also store them to a file.

Ideally I would like to have std::vector, but since this is not a TObject I cannot added to fOutput so it will be merged at the end.

I have tried myself to build a template “TProofCollection” inheriting from both TNamed and std::vector. However I am having some problems with that solution not related to PROOF. I have posted this problems in:

[url]Using templates, inheritance and ACLIC



Hi Isidro,

Your TProofCollection example can be fixed as suggested by Axel in your other thread.
For full std::vector functionality you have to add also pragmas for the iterators (see attachment).

Is this class fitting your needs?

The alternative could be to fill a simple TTree with the information that you want.

Cheers, Gerri

Sorry, forgot the attachment.
iglez-proofcollection.1.tar.gz (2.75 KB)

Hi Gerry,

This is exactly what I was looking for and on my few checks it works. Thanks a lot for your hint on the pragmas needed. I would not have found those tricks myself.