Re: TDSet::Process(TSelector * selector) missing

From: Antonio Bulgheroni <antonio.bulgheroni_at_gmail.com>
Date: Mon, 15 Jan 2007 11:17:26 +0100


Thanks Maarten and Constantin for your answers.

For Maarten,

        This is actually what I'm doing. TAnalysisSelector is the name of my TSelector class (not a macro). Of course I've uploaded a PAR file with a library containing TAnalysisSelector definition on each slave of the proof cluster.

The point is the following: the tree analysis is steered by many parameters that are stored in a TConfiguration object (another user-defined object inheriting from a TObject) and one of the data members of the TAnalsysSelector is a pointer to such TConfiguration object. In the normal way of operation w/o PROOF, I do the following:

TConfiguration * conf = new TConfiguration(); conf->LoadFromConfFile(confFileName);
TAnalysisSelector * selector = new TAnalysisSelector(); selector->SetConfiguration(conf);
tree->Process(selector); // note I'm passing a reference to TAnalysisSelector
...

This can be done because TTree has a method Process(TSelector *). But when running on PROOF, this is not available and PROOF wants to create an instance of TAnalysisSelector and processes it immediately without giving the user the chance to call any other method of the newly created TAnalysisSelector.

The only (maybe not elegant) way out is to make declare a global TConfiguration * gConf and use it inside the TAnalysisSelector. Do you think is it going to work?

For Constantin,

        I've read on the PROOF Twiki (
http://root.cern.ch/twiki/bin/view/ROOT/PROOF) that developing your own TSelector derived class (using MakeSelector) is the first step. That's why I did it!

Thanks again for your help,

Antonio

-- 
Antonio Bulgheroni, PhD
INFN - Sez. Rome III



On 1/12/07, Maarten Ballintijn <maartenb_at_mit.edu> wrote:

>
> Hello Antonio,
>
> You can pass the name of your class, rather then a the name of a
> macro, e.g.
>
> dset->Process("TAnalsysSelector")
>
> This requires that the class is know in the client and on the
> slaves. This is normally achieved using a PAR file which provides
> a library with your class(es) and their dictionary.
>
> Cheers,
>
> Maarten.
>
> Antonio Bulgheroni wrote:
> > Dear ROOTers,
> > apologies for bothering you with another question about PROOF, but
> > the more I (try to) use it, the more I like.
> >
> > So far, I have prepare a brand new custom selector inheriting from
> > TSelector and I've filled in all the automatically generated methods and
>
> > I've added my personal methods and data members. To work properly, this
> > TAnalsysSelector needs to be set up before executed. I mean, I have to
> > set few variables before calling tree->Process(mySelector). While this
> > is possible when working w/o PROOF, I can't find a way when working w/
> > PROOF because TDSet::Process(TSelector*) is missing and the only
> > available method is TDSet::Process(const char*). In my case this is
> > going to fail, because I have no more chance to set up the
> > TAnalysisSelector.
> >
> > What's wrong? Is there another way out? Is it possible to have
> > TDSet::Process(TSelector*)?
> >
> > Thanks a lot,
> >
> > Antonio
> >
> > --
> > Antonio Bulgheroni, PhD
> >
> > Win98 error 001: Unexpected condition: booted without crashing.
>
>
> --
> Maarten Ballintijn < maartenb_at_mit.edu>
> Massachusetts Institute of Technology
>
Received on Mon Jan 15 2007 - 11:18:03 CET

This archive was generated by hypermail 2.2.0 : Mon Jan 15 2007 - 17:50:00 CET