TSelector in PAR package


I would have a question about using PAR packages. I’m writing some simple test code at the moment, trying to figure out how to construct a “higher level” analysis framework above PROOF.

One of the first things that I would like to do is to use a slightly more complicated TSelector than what I get using TTree::MakeSelector(…). I’m thinking about writing a layer above TSelector that would make writing certain types of analysis algorithms faster. Since in the end I expect that my analysis selectors are going to be pretty complicated, I don’t want to leave it up to ACLiC to compile the code. So as a first try I created a PAR package with my code that compiles two source files and creates the dictionary for my selector class. After I load the library locally, I can instantiate my newly defined class in CINT in the usual way:

As I wrote before, TestCycle inherits from TSelector. Just running locally, TTree::Process(…) can use this cycle object correctly.

Now the question: How do I use this TestCycle selector on remote machines? I tested that I can distribute the PAR package to the worker nodes, it compiles successfully on each of them, but I can’t figure out the syntax of how I should be calling TDSet::Process(…) (or any of the Process(…) functions) so that it would know that it has to use an object of TestCycle on all the nodes.

Is what I’m trying to do in any way supported? I would really like to be able to just load the shared library of my package on all the nodes, and run the analysis code defined in it.

Any insights much appreciated!



It seems experimenting pays off… Apparently PROOF works better than how it is documented. :stuck_out_tongue:

So I’ve been playing a bit, and it turns out that at least the TProof::Process(TDSet* tdset, const char* selector, …) function does what I wanted. After uploading and enabling my PAR package on all the nodes, I could execute

and it seems to have done what I expected. At least from the log files I see that my TestCycle printed the expected output on both of my nodes.

So the answer seems to be that the TSelector code does not need to be in a local .C,.h file pair after all.


P.S. I’m doing my tests under 5.20.

Dear Attila,

Documentation is unfortunately often behind … :wink:

Yes, the argument in TProof::Process can just indicate the name of a derivation of TSelector already known to the system (for example via a PAR package or TProof::Load(…)).