I’m writing a macro that I want to scan a bunch of files (all with the same exact makeup of data), grab the trees, and make chains out of all of them. But rather than knowing the names of the trees before hand, I’d like my macro to just see what they are and make the chains accordingly.
If I open a Tfile f1 and do:
I can see all the keys and their class types (TTree for some, TObjArray for others). I can grab the names of them all too, with
for every ith one. But how do I get what it’s class type is? I want something like
if(f1->GetListOfKeys()->At(i)->GetClassType() == "TTree")
I feel like this should be easy, but I’m just not finding the right function in the documentation. Thanks in advance!