import ROOT chain = ROOT.TChain("mytree") chain.AddFile("file1.root") chain.AddFile("file2.root") chain.AddFile("file3.root")
import ROOT chain = ROOT.TChain("mytree") for i in range(10): chain.AddFile("file{}.root".format(i))This example creates a TChain called "mytree" and adds ten files to it using a loop. These examples use the ROOT package library.