15 R__LOAD_LIBRARY($ROOTSYS/test/libEvent.so)
20 TString dir =
"$ROOTSYS/test/Event.root";
21 gSystem->ExpandPathName(dir);
22 const auto filename = gSystem->AccessPathName(dir) ?
"./Event.root" :
"$ROOTSYS/test/Event.root";
24 TFile oldfile(filename);
26 oldfile.GetObject(
"T", oldtree);
29 for (
auto activeBranchName : {
"event",
"fNtrack",
"fNseg",
"fH"}) {
30 oldtree->SetBranchStatus(activeBranchName, 1);
34 TFile newfile(
"small.root",
"recreate");
35 auto newtree = oldtree->CloneTree(0);
38 newtree->GetBranch(
"fH")->SetFile(
"small_fH.root");
39 newtree->CopyEntries(oldtree);