My PC has 4 processors - how do I use them all?

Hi all,

I use root to read in a large number of particle physics events, apply a load of cuts and then draw some histograms. I do this using the MakeClass method and then putting my cuts inside the Loop() method. I prefer to complie my program rather than run things in cint.

I work on a pc with 4 processors and would like to 1/4 my running time by sharing the load. To start with I would be happy to get 2 processors going. How do I go about doing this? I have looked at PROOF documentation but figure it out.

Can anyone tell me how to do a MakeClass sytle Loop() over all my events but using multiple processors?

Thanks in advance

Yes. The solution is to use PROOF. For the user code instead of MakeClass you need to use MakeSelector (you can compile the code of course :slight_smile: ).


Is there any chance you could post a simple program that will do a “Loop()” over a set of events in the TSelector, multi processor way?

It’s always easier to copy/follow an example than spend hours hacking around with the code and lost in the documentation.


See for example.
Essentially the only difference with using a TSelector (see the User’s Guide) is to call the proper TProof::Connect.