20 TFile oldfile(
"tree108.root");
22 oldfile.GetObject(
"t4", oldtree);
26 Event *
event =
nullptr;
30 TFile newfile(
"tree112.root",
"recreate");
35 if (event->GetNtrack() > 605)
49 gROOT->ProcessLine(
".L " + tutdir +
"/io/tree/Event.cxx+");
50 gROOT->ProcessLine(
"#define ACTUAL_RUN yes");
51 gROOT->ProcessLine(
"#include \"" __FILE__
"\"");
52 gROOT->ProcessLine(
"run()");
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
A TTree represents a columnar dataset.
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr, TClass *realClass, EDataType datatype, bool isptr, bool suppressMissingBranchError)
virtual Int_t GetEntry(Long64_t entry, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
void Print(Option_t *option="") const override
Print a summary of the tree contents.
virtual Long64_t GetEntries() const
virtual TTree * CloneTree(Long64_t nentries=-1, Option_t *option="")
Create a clone of this tree and copy nentries.