I have to use the following tree:
Tree:
Branch1:var1 (Int_t)
Branch2:var2 (Int_t)
Branch3:tuple (TNtupleD)
I get some errors reading the tree because of TNtupleD. I think I cannot just try to link using TTree::Branch(), and then fill. What would you advice in order to store this TNtupleD variables ? I heart about serialization at some point, when I was looking at some others threads, but no practical example.
I wanted also to deal with TString, but same thing. I wonder if it’s not because I have to specify the size in order to allocate the correct memory space for the tree?
I though about keeping in memory my TNtupleD and just store the name of the ntuple to then find the object. Nevertheless both trials didn’t work… Help !
Ok, after looking more in detail. The total size overtakes the size of the Basket. Could it be the reason of my problem ? Concerning the reading of my TTree afterwards ?
I am runnnig over PROOF, so I sorted my initial tree.
Initial tree:
Branch1: var1 = run number
Branch2: var2 = spill number
Branch3: var3
Branch4: var4
I want one output per run per spill. So I tried to spread the PROOF execution per run per spill.
This is in order to do not mix (var3, var4) during the merging process if 2 worker are working on same number of spill and run. Do you know what I mean? NB: I tried to implement a custom class and redo the merging.
But I get all the time segfault when I try to redefine : Long64_t MyClass::Merge(TCollection*); So I gave up…
Finally I just tried to prepare my tree before running PROOF.
This in order to have 1 worker = (1 spill, 1 run) and do not messup because I don’t want to merge my tree as usually. just adding entries to my tree.
I tried to be clear as possible, ask me if it’s not clear…
Anyway, is it possible to do what I want? Because then with this TTree+TNtuple, it looks fine, but PROOF seems to crash each time. PS: I managed to store strings into my tree… But if TNtuple is working I would prefere that organisation