Re: Proof

From: Marc Escalier <escalier_at_lal.in2p3.fr>
Date: Sun, 16 May 2010 10:09:27 +0200


thank you very much Gerardo



On Sun, 16 May 2010, Gerardo Ganis wrote:

>
> On May 14, 2010, at 7:26 PM, Marc Escalier <escalier_at_lal.in2p3.fr> wrote:
>
>> Hi rooters,
>>
>> may i ask some questions on Proof (Parallel root facility) ?
>> (any idea on any of the problems below is welcome. thank you
>> just in case, i rank them from the most important to the less important)
>>
>> *Would you know how to get back an histogram that was filled in the class
>> selector created by the MakeClass() to the main program ?
>> for example, i do :
>> {
>> #include "myselector.C"
>>
>> TProof *p=TProof::Open("ccapl0001.in2p3.Fr","workers=50");
>> TDSet *myset=new TDSet("TTree","PAUReco");
>> myset->Add("root://ccxrasn001:1094//xrootd/users/p/PAU/MonteCarlo/GamJet7_108085_r1215/TestLAL/PAU-00-01-60/group10.phys-sm.mc09_7TeV.00105805.filtered_minbias6.e530_s765_s767_r1205_r1210_FromFilteredAOD_15_6_8_4_v0_NoGRL_NTUP-PAU-00-01-60_15_6_8_4_v0.AANT._00001.root");
>> ...
>> myset->Process("myselector.C");
>> //Which fills a histogram : hist_pt_photon
>> }
>>
>> then when i type in the session (or directly to the code) : "myset" : i
>> don't have the object anymore
>> myset->Print();
>> whereas this instruction works if above the Process command (but i need
>> after of course if i need to access the histogram that was filled by the
>> Process() macro)
>> ==>
>> Error: Symbol myset is not defined in current scope MinimumProof.C:141:
>> Error: Failed to evaluate myset->Print()
>> *** Interpreter error recovered ***
>>
>> so i can't get the histogram since the instance of TDSet no more exists
>> after the Process() instruction
>> (i wanted to use something like myset->GetOutputList()
>
> The output list is owned by the TProofPlayer and can be accessed via TProof,
> so you have to use gProof->GetOutputList().
>
>>
>> *TDSet : did you succeed to use "jokers" (*) : "MyPath/*root*" ?
>> it seems not to work while it was working fine with TChain stuff
>>
>> so i need to add each file one by one : a bit borying (of course i can do a
>> script)
>> TDSet *myset=new TDSet("TTree","PAUReco");
>> myset->Add("root://ccxrasn001:1094//xrootd/users/p/PAU/MonteCarlo/GamJet7_108085_r1215/TestLAL/PAU-00-01-60/group10.phys-sm.mc09_7TeV.00105805.filtered_minbias6.e530_s765_s767_r1205_r1210_FromFilteredAOD_15_6_8_4_v0_NoGRL_NTUP-PAU-00-01-60_15_6_8_4_v0.AANT._00001.root")
>
> Well, Proof was not developed to process local files, so a TDSet constructor
> from files in local directory was not the first thing to do. And this is the
> first request we got. A script allows all the flexibility needed to adapt to
> the various mass storages. This said, you should probably consider using the
> dataset functionality ( see the web pages) which allows to register and
> process datasets by name, caching several info to speed up the pre-processing
> phase.
>
>>
>> *bonus question
>> in the Terminate() method, if i don't do :
>> hist_pt_photon =
>> dynamic_cast<TH1F*>(fOutput->FindObject("hist_pt_photon"));
>> the histogram can't be access in the method : would you know why ?
>
> Because the objects are created and filled in a different process than the
> local client and are returned via the output list. For members of the
> selector it may be that in the future they automatically connected. But we do
> not have a time scale yet for that.
>
> G. Ganis
>>
>
Received on Sun May 16 2010 - 10:09:32 CEST

This archive was generated by hypermail 2.2.0 : Sun May 16 2010 - 11:50:01 CEST