void analyse() { gSystem->Load("../libData.so"); TFile *f = new TFile("../data/rawDataDSR4/NeuRad_test_07_1.root"); TTree *tr = (TTree*)f->Get("rtree"); const Int_t noBranches = 4; TString bName; RawEvent *revent[noBranches]; for (Int_t j = 0; jSetBranchAddress(bName.Data(), &revent[j]); } // tr->SetMakeClass(1); TFile *fw = new TFile("../data/dataDSR4/analysis_07_1.root", "RECREATE"); TTree *tw = new TTree("atree", "title of drs4 analysis tree"); AEvent *wevent[noBranches]; for (Int_t j = 0; jSetInputEvent(&revent[j]); tw->Bronch(bName.Data(), "AEvent", &wevent[j]); } Long64_t nentries = tr->GetEntries(); for(Long64_t i = 0; i < nentries; i++) { tr->GetEntry(i); for (Int_t j = 0; jReset(); wevent[j]->ProcessEvent(); } tw->Fill(); } tw->Write(); fw->Close(); return; }