Hi All,
I want to remove an entry from the tree based on entry/event number, i.e. every 10th entry. Is it possible to do without going into the details of the tree structure?
I’m trying to do something like this:
TChain chain("TREE");
chain.Add("Data0.root");
chain.Add("Data1.root");
TFile *f=new TFile("testf.root","recreate");
TTree *nt=new TTree("T","tdsdfsd");
TObjArray *bl=chain.GetListOfBranches();
for(int i=0;i<bl->GetEntriesFast();i++){
nt->Branch(bl[i].GetTitle(),bl[i].GetObjectRef());
};
for(int i=0;i<chain.GetEntriesFast();i++){
if(!i%10) continue;
chain.GetEntry(i,1);
nt->Fill();
}
nt->Write();
f->Close();
but breaks on nt->Branch(bl[i].GetTitle(),bl[i].GetObjectRef());