void analyse() { gSystem->Load("../libData.so"); TFile *f = new TFile("../data/rawDataDSR4/NeuRad_test_07_1.root"); TTree *tr = (TTree*)f->Get("rtree"); RawEvent *revent = new RawEvent(); tr->SetBranchAddress("rawEvent", &revent); // tr->SetMakeClass(1); TFile *fw = new TFile("../data/dataDSR4/analysis_07_1.root", "RECREATE"); TTree *tw = new TTree("drs4analysis", "title of drs4 analysis tree"); AEvent *wevent = new AEvent(); wevent->SetInputEvent(&revent); tw->Bronch("AEvent", "AEvent", &wevent); Long64_t nentries = tr->GetEntries(); for(Long64_t i = 0; i < nentries; i++) { tr->GetEntry(i); wevent->ProcessEvent(); tw->Fill(); } tw->Write(); fw->Close(); return; }