ROOT Version: 6.28/06
Platform: Ubuntu 20.04
Compiler: gcc 9.4.0
I have a TSelector class that I created using MakeSelector. I would like to use this class to analyze two different trees, one for data and one for simulations. The problem is that each of these trees contains a branch that isn’t present in the other tree. I understand that TSelectors are designed to work on a particular set of branches, but is it possible to conditionally bind the branches based on whether or not they are present in the input tree? If not, is there a recommended way to handle this scenario? I have tried to initialize the TTreeReaderValue objects in the Init() or Begin() methods, but it appears that the actual binding takes place before then. I’m currently commenting out/in the relevant pieces of code, but it makes the program difficult to maintain. Creating separate classes for data and simulations is also not ideal for the same reason.