TTreeCache in PROOF

I am trying to enable the cache (using SetCacheSize) in my TSelector class.

Since I am using PROOF datasets and therefore something like

  TProof* p = TProof::Open("workers=3");
  p->Process( "mydataset" , "D3PDSelector.C+");

in my macro, I cannot enable the cache in the macro, but need to do it in the TSelector class.

I have tried many things (mostly based on enabling the cache in the Init method), but I always end up in segmentation faults if I run in PROOF (Lite, root version 5.26).

The segmentation faults usually happen at the end of a file. Surprisingly, not after the first file, but always after the second.

Does anyone have an idea how I can fix this, or maybe provide a working example?

Thanks in advance for any help/code

Dear ctopfel,

The tree cache handling is somewhat tricky in PROOF because it is connected to files and PROOF has full ownership on the files. Therefore it is done by PROOF itself and should not be done in the TSelector.

The cache is enable by default and it is controlled by the following parameters specified via the input list (see … Parameters):

    PROOF_UseTreeCache      0 / 1  (Int_t)
    PROOF_CacheSize             size in bytes (Long64_t)

For example, p->SetParameter(“PROOF_UseTreeCache”, (Int_t)0) will disable the use of the cache.

G. Ganis

NB: this part of PROOF was cleaned and restructured after the improvements in ROOT TTreeCache of Nov 2009; so the above applies to version 5.25/04 and above.

Thanks for the hint!