Problem with Reseting Branches in MapFile


I have such a situation:

I have TTree in memory (in MapFile). This tree contains many branches but always only one events because I have to reseting Tree, it's made by TTree::Reset() method.

Other program read this tree from MapFile  and filling histograms.  If there are old entries doing nothing.

And the problem is that I have to setting Branch address every time when i want read a tree. If I didn’t set this my program don’t see new values, new entries.
Setting Branches takes some time and in result my program are slow…

What I have to do ? Maybe there is another way to reseting Tree.

Thanks a lot


TTree::Reset() does not (as far as I can tell) change the location of the data look at. I.e. you should not have to to a SetBranchAddress each time.

So I suspect that you are doing something unusual in your code and would need to actually see it to come to a conclusion.

Humm … thinking of it, I think your problem is that you do something like:

process 1:
MyClass *pointer = new MyClass;

process 2:

However since both ‘pointer’ and the newed class are ‘local’ to process 1 they are not valid in process 2

You have to make sure that both ‘pointer’ and the newed object are in shared memory … but then again you can’t really put object in shared
memory so you would need to be in the case where your only use simple type. You still need to insure that the memory you pass to the branch is in the shared memory.