I have a TFile containing several RooWorkspace instances. I can successfully access any one of them from within a CINT macro, but if I attempt to access more than one I am returned with a segmentation violation. For example, I can successfullly access the workspace “ws_1_1_Plus” with the following commands:
TFile* f = new TFile("Data.root"); RooWorkspace* wspace_P = (RooWorkspace*) f->Get("ws_1_1_Plus");
However, if I try and access a 2nd workspace, say “ws_1_2_Plus”, the CINT session crashes:
TFile* f = new TFile("Data.root"); RooWorkspace* wspace_1_1_P = (RooWorkspace*) f->Get("ws_1_1_Plus"); RooWorkspace* wspace_1_2_P = (RooWorkspace*) f->Get("ws_1_2_Plus");
Is there a solution to this problem? I’ve tried closing the file and then re-opening it before accessing the 2nd workspace, but this has not worked.
Many thanks in advance for the help.