Hi Gene, In the CVS version I have added an optional argument to TChain::AddFile that you can use to specify an alternative tree name. Rene Brun On Sat, 30 Oct 2004, Gene Van Buren wrote: > I have set of files containing TTrees. All files in each > set either have one name (let's call it "ATree") or all > have a different name ("BTree"). Both TTrees have a > set of branches in common, so one piece of code that > analyzes these common branches could use either > kind of TTree. To access these file sets, I've been > using a TChain. > > Anyone have a good way to automatically handle the > two possible tree names? > > In the past I have made this work by using the name > "ATree", Add()'ing files, calling LoadTree(0), and > checking if the result was -4, then changing the name > of the TChain and its TChainElements to "BTree" and > trying again. But fEntries is zero after I use Add() to > add files to the TChain, and I can't recover from that. > > -Gene >
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:10 MET