TFile orgFile(orgFileName, "READ");
// get original TTree
TTree *orgAodTree = (TTree*)orgFile.Get("aodTree");
+ // switch off one branch (and its subbranches!)
+ orgAodTree->SetBranchStatus("tracks*", 0);
// open new output file
TFile *newFile = new TFile(newFileName, "RECREATE");
AliAODEvent *evNew = new AliAODEvent();
evNew->ReadFromTree(newAodTree);
- // switch off one branch (and its subbranches!)
- newAodTree->SetBranchStatus("tracks*", 0);
// remove TObject from the list
evNew->RemoveObject(evNew->GetTracks());