If a workspace is built with custom classes, e.g. custom pdfs, users will get a segmentation fault when trying to load the workspace before loading the corresponding custom classes into ROOT.
e.g.
import ROOT
rfile = ROOT.TFile("my_workspace.root")
This will give the following warning if the user-defined class HggBernstein
is not loaded.
TClass::Init:0: RuntimeWarning: no dictionary for class HggBernstein is available
Then if user proceed to load the workspace
workspace = rfile.Get("ws")
This will cause a seg fault
Error in <TBufferFile::ReadObject>: trying to read an emulated class (HggBernstein) to store in a compiled pointer (RooAbsArg)
*** Break *** segmentation violation
Is there a way for a user to check beforehand that a workspace contains user-define classes that are without dictionaries to prevent a seg fault?
Thanks a lot!