I see segmentation fault during pickling of weighted Roofit dataset.
For non-weighted datasets everything works perfectly.
Simple script to reproduce the problem is here:
import ROOT, random, pickle
var = ROOT.RooRealVar('var' ,'variable',0,10)
w = ROOT.RooRealVar('w' ,'weight',0,10)
vs = ROOT.RooArgSet ( var , w )
ds = ROOT.RooDataSet ( 'data', '' , vs )
for i in range ( 10 ) :
var.setVal ( random.uniform ( 0, 10 ) )
w .setVal ( random.uniform ( 0, 10 ) )
ds.add ( vs )
wds = ROOT.RooDataSet ( 'wdata' , ds.GetTitle () , ds , vs , "" , "w" )
p = pickle.dumps ( ds )
pw = pickle.dumps ( wds ) ## <--- segmentation fault
However if dataset is created originally as empty weighted and then events are added one by one, such datastet can be pickled with no problem. but iin my applictaion I need often to convert existing dataset into weighted dataset and event-by-event copy is not very efficient