Notify and Init

I’ve this problem: I’ve to dump some branches from the input chain (fChain) to my output TTree. I’m setting the branches to my output in the Notify function. Is it ok? In this function I associate the address of the branches from the input file to the address to the branches to the new output file.

The problem is that sometimes there are some workers that are not working (because the data input is very small), so I’ve some workers where the Notify is not executed and so the branches are not defined. So at the merging step these branches are ignored.

What’s the solution? See also Clone a tree without CloneTree

Hi,

The solution is probably to detect the ‘empty’ case in SlaveTerminate and not save the TTree at all in this case.

Cheers,
Philippe.

[quote=“pcanal”]Hi,

The solution is probably to detect the ‘empty’ case in SlaveTerminate and not save the TTree at all in this case.

Cheers,
Philippe.[/quote]

No, this cannot work because the merging is done before

[quote]No, this cannot work because the merging is done before[/quote]When/where is the merging done then?

Philippe.

[quote=“pcanal”][quote]No, this cannot work because the merging is done before[/quote]When/where is the merging done then?

Philippe.[/quote]

Sorry, probably I was wrong. Well, I can try to remove the TTree for the fOutput list in the SlaveTerminate if the number of processed event is zero.

[quote]Well, I can try to remove the TTree for the fOutput list in the SlaveTerminate if the number of processed event is zero.
[/quote]Yes, that is what I meant :slight_smile:

Philippe.