Re: : PROOF

From: <iglez_at_mail.cern.ch>
Date: Tue, 7 Jun 2005 16:48:06 +0200 (CEST)


Thanks for the corrections Gerardo! I have used them succesfully. From what I see I will get an object of type MyCounter from each slave and is my duty to merge them. Why is that not the case for histograms? Which is the list of ROOT classes that are different? What would happen if I have a histogram into my class (that is my real case)? Would I have to take care of the merging?

        Thanks for your help,

                Isidro

On Tue, 7 Jun 2005, Gerardo Ganis wrote:

>
>
> Dear Isidro,
>
> Please find attached a modified version of your directory
> which should do what you expect.
>
> There were a few small issues.
>
> Proper object transfer require full I/O functionality and
> therefore a dictionary for the class, which should be known
> by the slaves. The best way is to make a package with new
> classes, to upload and enable it.
> PROOF provides the PAR files for this, which unfortunately
> is not documented yet.
>
> For that you should create a directory with the name of the
> package (e.g. MyCounter) and copy the class files in there:
>
> > mkdir MyCounter
> > cp MyCounter.C MyCounter
> > cp MyCounter.h MyCounter
>
> Then you have give the instructions about how to use this things.
> These go into a macro called SETUP.C and located in a PROOF-INF
> subdirectory of MyCounter:
>
> > mkdir MyCounter/PROOF-INF
> > cat > MyCounter/PROOF-INF/SETUP.C <<EOF
> {
> // Build dictionary
> Printf("Building dictionary MyCounter ...");
> gROOT->ProcessLine(".L MyCounter.C+");
>
> // Enlarge include path (for MyCounter.h)
> TString Ipath(Form("-I%s %s",gSystem->pwd(),gSystem->GetIncludePath()));
> gSystem->SetIncludePath(Ipath.Data());
> Printf("Include path set to: %s", gSystem->GetIncludePath());
> }
> EOF
>
> SETUP.C is executed when the package is enabled. The second part
> is needed because MySelector.C needs to include "MyCounter.h"
>
> One you have done this, you have to pack everything into MyCounter.par
>
> > tar czvf MyCounter.par MyCounter
>
>
> Now you can execute execProof_m.C, a modified version of your execProof.C .
> I have put comments in there, I hope they are clear enough.
> Please note that in your original macro the selector specification
> was incorrect into "chain->Process()": you need to specify the
> file name ("MySelector.C"), not just the selector name.
>
> Finally, in MySelector::Terminate, there is a problem (under investigation)
> finding objects of new classes with FindObject. However, if you iterate
> on the list, it works. See the modified file.
>
> Please try and let me know.
>
> Cheers, Gerri
>
>
>
>
> On Thu, 2 Jun 2005 iglez_at_mail.cern.ch wrote:
>
> > Dear Fons,
> > I have being fighting with PROOF for more than a week. I succeded
> > in filling histograms following the code in the h1analysis tutorial.
> > However my code needs to do more complex things including some counters
> > (of course I need histograms coupled with counters, etc... i.e. my own
> > objects). I tried something as simple as wrapping a counter on a class
> > inheriting from TObject (see in the attached file MyCounter.h). I compile
> > it into ROOT using the buil-in mechanism in ROOT. If you look in
> > MySelector.C (automatically generated from the tutorial root ntuple
> > mlpHiggs.root with MakeSelector -see the makeselector.C script-)
> > I have added a few cout's and the initialisation (inside SlaveBegin()),
> > registration (idem, into fOutput) and use (inside Process(...)) of a
> > MyCounter object. I tried to retrieve it afterwards inside the Terminate()
> > method, but the object is not any more in fOutput as it happens with
> > histograms. During the proccessing I get the following 3 errors several
> > times:
> >
> > Error in <TClass::Load> on master0: dictionary of class MyCounter not found
> > Error in <THashList::AddLast> on master0: argument is a null pointer
> > Error in <THashTable::Add> on master0: argument is a null pointer
> >
> > I have spent a couple of days trying to find out the reason for this but I
> > did not succeed. Any help will be very welcome. Thank you very much!!!
> >
> > Cheers,
> >
> > Isidro
> >
> > PS.: You may run everything with the execProof.C script just changing your
> > PROOF server
> >
> >
> >
>

-- 
+---------------------------+--------------------------------+
| Isidro González Caballero | mailto:Isidro.Gonzalez_at_cern.ch |
| IFCA (U. Cantabria/CSIC)  | http://home.cern.ch/iglez/     |
| Avda. Los Castros s/n     |               -o-              |
| Santander (España)        | Tel: +34 942201343 / 699413841 |
+---------------------------+--------------------------------+
Received on Tue Jun 07 2005 - 16:48:14 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:09 MET