Problems streaming Roofit objects

Hi,

I’m having some problems using PROOF with the RooStats “ToyMCSampler”. A segfault occurs when sending the objects from the master to the workers. I think the problem is with streaming “RooStarMomentMorph” objects, a custom class used for morphing signal templates. When I construct a model without using this class everything works fine, and models using RooStarMomentMorphs work fine if I do not use Proof.

I have used PROOF with custom classes successfully before, and have ensured that pointer data members are not sent to the workers (with “//!”) and ensured that everything is initialized in the default constructor. The stack trace output isn’t really very helpful in debugging where the problem is, so i was wondering if anyone had any advice about how to go about debugging this, or any suggestions for things that might be going wrong?

Here is an excerpt from the code setting up the job:

   RatioOfProfiledLikelihoodsTestStat * plts = new RatioOfProfiledLikelihoodsTestStat( *mcNull->GetPdf(), *mc->GetPdf(), mc->GetSnapshot() );
   plts->SetSubtractMLE( false );

   ToyMCSampler toymcs(*plts, 50);

   //Spread job to several workers
   string workers = "workers=2";
   ProofConfig pc(*w, toys, workers.c_str(), false);
   toymcs.SetProofConfig(&pc);    // enable proof

and here is an excerpt from the stack trace…

#5 0x00007fb9feb8c085 in ROOT::delete_RooAbsBinning(void*) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRooFitCore.so #6 0x00007fba016dd507 in TClass::Destructor(void*, bool) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libCore.so #7 0x00007fb9ff5d1927 in TBufferFile::ReadFastArray(void**, TClass const*, int, bool, TMemberStreamer*, TClass const*) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so #8 0x00007fb9ff69a33c in int TStreamerInfo::ReadBuffer<char**>(TBuffer&, char** const&, int, int, int, int) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so #9 0x00007fb9ff617c7e in TStreamerInfoActions::GenericReadAction(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so #10 0x00007fb9ff5cbd9d in TBufferFile::ApplySequence(TStreamerInfoActions::TActionSequence const&, void*) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so #11 0x00007fb9ff5cc260 in TBufferFile::ReadClassBuffer(TClass const*, void*, TClass const*) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so #12 0x00007fb9ff69a810 in int TStreamerInfo::ReadBuffer<char**>(TBuffer&, char** const&, int, int, int, int) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so #13 0x00007fb9ff617c7e in TStreamerInfoActions::GenericReadAction(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so #14 0x00007fb9ff5cbd9d in TBufferFile::ApplySequence(TStreamerInfoActions::TActionSequence const&, void*) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so #15 0x00007fb9ff5cc260 in TBufferFile::ReadClassBuffer(TClass const*, void*, TClass const*) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so #16 0x00007fb9ff5cf45f in TBufferFile::ReadObjectAny(TClass const*) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so #17 0x00007fb9feaa7b40 in RooLinkedList::Streamer(TBuffer&) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRooFitCore.so #18 0x00007fba0170683a in TStreamerBase::ReadBuffer(TBuffer&, char*) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libCore.so #19 0x00007fb9ff69a873 in int TStreamerInfo::ReadBuffer<char**>(TBuffer&, char** const&, int, int, int, int) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so #20 0x00007fb9ff617c7e in TStreamerInfoActions::GenericReadAction(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so #21 0x00007fb9ff5cbd9d in TBufferFile::ApplySequence(TStreamerInfoActions::TActionSequence const&, void*) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so #22 0x00007fb9ff5cc260 in TBufferFile::ReadClassBuffer(TClass const*, void*, TClass const*) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so #23 0x00007fb9ff69a810 in int TStreamerInfo::ReadBuffer<char**>(TBuffer&, char** const&, int, int, int, int) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so #24 0x00007fb9ff617c7e in TStreamerInfoActions::GenericReadAction(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so #25 0x00007fb9ff5cbd9d in TBufferFile::ApplySequence(TStreamerInfoActions::TActionSequence const&, void*) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so #26 0x00007fb9ff5cc260 in TBufferFile::ReadClassBuffer(TClass const*, void*, TClass const*) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so #27 0x00007fb9fe97ad8c in RooAbsArg::Streamer(TBuffer&) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRooFitCore.so #28 0x00007fba0170683a in TStreamerBase::ReadBuffer(TBuffer&, char*) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libCore.so #29 0x00007fb9ff69a873 in int TStreamerInfo::ReadBuffer<char**>(TBuffer&, char** const&, int, int, int, int) () from /afs/cern.ch/atlas/project/HSG7/root/root_v5-34-00-patches_r48315/lib/libRIO.so

Cheers,

Nick