Re: Proof

From: ganis <gerardo.ganis_at_cern.ch>
Date: Mon, 17 May 2010 09:53:39 +0200

    Hi,
> *how to disactivate the "Proof query progress" window (the graphical
> window that opens with the tachymeter) without using the option "root -b"
> (i mean i wish to keep the graphical mode to draw some histogram) but
> wish to disactivate this Proof run query.
>
> The reason is that, when you emulate X-window under microsoft Windows
> environment, it is very slow for this graphical window (which moves by
> the way because of the tachymeter. To click on no animation is very
> slow as well for the X-window to "understand").
>
> i do :
> p->Load("myselector.C+")
> myset->Process("myselector");
>
> the graphical window starts for this Process command : how to
> disactivate it ?

     You have to set the bit TProof::kUsingSessionGui on the TProof object before any Process(...) call:

        root [] TProof *p = TProof::Open(...)
        root [] p->SetBit(TProof::kUsingSessionGui)
        root [] p->Process(tdset, ...)
        or
        root [] tdset->Process(...)

    (gProof is set automatically to the last object created by TProof::Open ...).
> *by the way, a TDSet has the option GetOutputList()
> (when i do the Load first, i'm able to get back the myset after
> processing the selection)
>
> but, in order to have the right of using the "jokers" for the file
> definition ("MyPath/*root*"), i wanted to try the TChain (to use some
> * for the files)
> but TChain has not the method GetOutputList()
> would you recommand to use gPROOF->GetOutputList() ?
> in this case, if i do two consecutive selections, will gPROOF remember
> the last output list or both ? i wish to remember only last one so
> that my plan would be :
> Define the first Set
> launch the process() on this set
> get back the histogram
> define the second set
> launch the process() on this new independent set
> get back the histogram but not the first one

    The TDSet::GetOutputList() is a legacy interface to gProof->GetOutputList() which is deprecated and will be

    removed (this said, I have no problem with it ...).     gProof->GetOutputList() is the correct way to access the output list.     A new output list is created for each run, so there is no overlap in the output of two runs.  

    Gerri
>
> thanks
>
> =========================
>
> 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
>>

-- 
+--------------------------------------------------------------------------+
  Gerardo GANIS    CERN, PH Dept, SFT group, CH 1211 Geneve 23  
                   room: 32-RC-017, tel: +41 22 7676439
                   email: gerardo.ganis_at_cern.ch, fax: +41 22 7669133
+--------------------------------------------------------------------------+
Received on Mon May 17 2010 - 09:56:42 CEST

This archive was generated by hypermail 2.2.0 : Mon May 17 2010 - 11:50:01 CEST