RooDataSet kills macro

A simple addition to my root/roofit macro cause the code to crash the second time its ran.

RooArgSet ntupleVarSet(x); RooDataSet *tdata = new RooDataSet("tdata","tdata",tree,ntupleVarSet);

When I exit root after the first successful run (but before attempting the second) I get the following error.

... EXT PARAMETER PARABOLIC MINOS ERRORS NO. NAME VALUE ERROR NEGATIVE POSITIVE 1 mean 2.10057e+03 1.02748e+00 -1.03242e+00 1.02468e+00 2 sigma 1.02460e+02 7.51237e-01 -7.50028e-01 7.48999e-01 root [2] .q *** glibc detected *** double free or corruption (!prev): 0x0983ade8 *** [aname@abox hep-roo]$

I need to get past this in order to proceed.

Thanks

This past month I realized that the best way to debug a root/roofit script IS BY using the compiler. Once working you can back out to a simple macro as necessary.

By using the CINT compiler one is able to see the root causes and more easily fix them.

Dave