void AnalysisLoop::Loop() { if (fChain == 0) return; // 1a origVector = new std::vector; // 1 outputTTree->Branch(origVector", "std::vector", origVector); // 1b delete origVector; Long64_t nentries(fChain->GetEntries()); for (Long64_t jentry=0; jentryLoadTree(jentry); if (ientry < 0) break; fChain->GetEntry(jentry); // 2 m_outputTTree->Branch(origVector", "std::vector", origVector); // do something ... m_outputTTree->Fill(); } } TFile outputntuple("out.root","recreate"); m_outputTTree->Write(); outputntuple.Close(); return; }