Hi ROOTers, I think I found a bug in the setting of branch status for TChains (maybe for TTrees, too?). The following test macro is used to merge a set of trees, only paying attention to the active branches - "Run" & "momentum". TChain c("myntp"); c.Add("data*.root"); c.SetBranchStatus("*",0); c.SetBranchStatus("momentum"); // c.GetListOfBranches(); // problem line c.SetBranchStatus("Run"); c.Merge("test.root"); It works as expected. If I uncomment the "problem line", I find that my c.SetBranchStatus("Run") has no effect - my merged file has a chain with an empty "Run" branch. Somehow in retrieving the list of branches, I am blocking myself from correctly setting additional branch statuses for the chain. In my real macro, expanded upon the above test macro, I would like to get the list of branches from the chain before setting the status of the branches. Would there be a work around for the above problem? For instance, after getting my list of branches, is there a method I can use to undo the harm that GetListOfBranches() has done? As an additional query - can my merged chain be created with the headers for the inactive branches REMOVED? Currently, I find that the merged file has a tree which contains all the headers for all branches of the trees used (the inactive branches being empty). Thanks, Chris
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:08 MET