Delete RooDataSet after writing it into file


I am generating a lot of RooDataSets in a loop using the same pointer which I am creating at the start and deleting it at the end of the loop. In the meantime I want to write the RooDataSet into a TFile, however when I write the object into the file and then I am deleting the pointer my program is crashing. If I do the same loop but instead of storing RooDataSets I store TH1F pointers is working. Is there a way where I can create the RooDataSets and avoid keeping them in memory while my program is executing? Thanks.


Hi @ixiotidi,

The problem is not entirely clear to me after reading your post. Could you please provide some information about your environment (ROOT version and OS), plus a code excerpt that reproduces your problem?


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.