Remove entry from tree

Hi,

ROOT version v3_05_00 at clued0 claster at Fermilab ($ROOTSYS: /D0/ups/root/Linux-2-4-2-2-4/v3_05_00c-KCC_4_0–exception–opt–thread).

I’m using D0 framework package (tmb_tree) which creates tree (“TMBTree”) and writes it to file without event selection. In event-by-event processing tmb_tree creates ROOT entry for current event and fills TMBTree. Then framework calls my package (analysis_tmb) for this event. If ROOT entry passes my selection criteria, I fill my own tree (my tree is CloneTree of TMBTree). How can I prevent writing entry into tmb_tree’s output file? In other words, how can I remove entry from tree?

At the moment I’m using TTree::Reset() for tmb_tree’s tree after processing of current event. It works, but tmb_tree’s file still filled by some junk. Can you suggest a more elegant way to do this? (Working with earlier version of tmb_tree I moved its tree from file using SetDirectory(0), that was fine, but for current version of tmb_tree it’s impossible).

Thanks,
Andrei.

Hi,

The only way would be to prevent the framework code to call the Fill method on the tmb_tree. So unless the framework developer did indeed plan for such a usage you would have to hack their code.

Now I am not completely sure what you are trying to do.
Why do you want to ‘remove’ some entries for the tmb_tree output file?

Philippe.