#include #include #include #include using namespace std; int main() { TFile *f = new TFile("outfile.root","RECREATE"); TTree *t = new TTree("tree","description"); vector *b_some_branch = new vector; t->Branch("some_branch",&b_some_branch); for(int i=0; i<10; i++) { b_some_branch->clear(); b_some_branch->push_back(float(i)); t->Fill(); } f->cd(); f->Write(); f->Close(); return 0; }