[quote]I use ROOT version 3.05/07 because it is my experiment (Phobos, RHIC)
standard. [/quote]
CloneTree (and Merge) should be working in this release. Please send an example I can run demonstrating the problem.
[quote]TNtuple* ntpl = new TNtuple();
t->SetBranchAddress(āInvMassNTupleBranchā, &ntpl);[/quote]
This is a surprising combination.
An ntuple should be not stored as a branch of a tree! At the very least I never tried this combination! I am surprised it even remotely works. There are issues about which files is going to be the location of the data of the ntuple (by default it is the current ROOT directory, which might or might not be set properly for Merge to work in your case).
Anyway, indenpendently of wether it works or not, it is unlikely that having a tree of ntuple is the efficient way of achieving what you are trying to do (can you specify what you need?)
[quote]Why? It is a public function and it works in my program.
[/quote]
Yes it is public ⦠but this does not mean it is not an āadvancedā method.
This particular function should be used only after careful reading the information that is available in its documentation and code. I meants to say that it is very very unlikely that you need to use it in your code.
[quote] And why is
it not said in the Reference Manual: "Hey, people, do not use this function!
Use ādeleteā instead!!!
[/quote]
Can you remind me which page in the Userās Guide, TObject;:Delete is described. If it is not there already a duplicate of TOject::Delete documentation needs to be copied there. Specifically it says ā// Normally use ādeleteā operator when object has been allocated on the heap.ā
Did you save a TChain in that file or is it the result of TChain::Merge?
If it is the result of TChain::Merge, it is a TTree and not a TChain.
The major difference I can think of between the TTree and TChain case,
is that the setting
ntpl->SetBranchAddress("invMass", &im);
which refer to the ntuple which is inside the TTree is not carried over between tree (it might be that the object is recreated between each TTree). In which case you would need to call it, after each file is processed (you can detect that when TChain->GetTreeNumber changes).
However, you method using ntup->Draw is probably failing because the htmp histogram is created in the current directory (which is the file being read) and deleted when the file is closed. In which case you might be need to move the htmp directory around (for example use htmp->SetDirectory).
Cheers,
Philippe.