Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-10810

Segmentation fault in pickling of weighted RooFit datasets

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.22/00, 6.20/06, 6.24/00
    • Component/s: RooFit/RooStats
    • Labels:
      None
    • Environment:

       

      ROOT version from LCG_97   cvmfs instalaltion 

      Description

      Dear Experts, 

      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 )

      ds.Print('vvv')

      wds = ROOT.RooDataSet ( 'wdata' , ds.GetTitle () , ds , vs , "" , "w" )

      wds.Print('vvv')

      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

      .

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shageboe Stephan Hageboeck
                Reporter:
                ibelyaev Vanya Belyaev
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: