This is an old revision of the document!
A chain is sort of a container for trees. A chain can contain an arbitrary number of trees and can be used the same way as a tree, as the class chain
inherits from the class tree
.
A simple example is the following:
TChain* myChain = new TChain("DecayTree"); myChain->Add("myRootFile.root");
Note the following:
DecayTree
is in the subdirectory mySubdirectory
in the root file myRootFile.root
, call the constructor with:TChain* myChain = new TChain("mySubdirectory/DecayTree");