TTreeFormula not working in proof

ROOT Version: 6.08.04
Platform: fc23.x86_64
Compiler: GCC 5.1.1 (c++11)

Hi. I am trying to generate the training and testing samples for TMVA methods from the existing datasets on the PROOF cluster. For this purpose I am trying to generate the TEntryList objects with random chosing (following the “h1analysis fillist” tutorial), from the datasets. Once I have these entrylists ,using them as input in next Process() call, I can retrieve required data branches to the client for TMVA processing. In order to put some (optional) additional cuts I am using TTreeFormula :: EvalInsance() in the TSelector :: Process(). However it EvalInstance() doesn’t seem to be working.
Attaching the minimal working code.
Please help.
SelSplitData.h (4.2 KB)
SelSplitData.C (10.0 KB)
runProof.C (1.8 KB)

@pcanal would you know what can cause this?

You need to add to SelSplitData::Notify:

if (fCutsFormula)


It is added to Notify(). But it doesn’t work.
I also created a a selector identical to class TProofDraw with only 2 changes

  1. DoFill() was defined as
DoFill(Long64_t entry, Double_t w, const Double_t *v) 
Info("DoFill", "%lld %lf %lf \n", entry, w, v[0]) ;
  1. removed the pure virtual DefVar function.
    Even that example doesn’t work. v[0] is always 0.0

Did you get it to work without Proof (i.e. with just TTree::Process)?

Thanks for your help. SetMakeClass(1) in the Init() was the culprit. I am little confused as to what exactly it does ? As I understood it will make 1 branch for all the data members of the object saved on the branch ? why did it cause problems in this case ?

What SetMakeClass(1) does is to turn the expectation of the TTree from “address where the data is stored is set by either the user or the TTree to the address of a full object through the top level branch” to “address where the data is stored is set by the user to the address of numerical type and C-style array (variable or not) of numerical type)”

In the case of the code you provided, SetMakeClass(1) is called but the addresses are not set.

Okay. That makes it clear.
Thanks for the help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.