Accessing Multiple RooWorkspace's from TFile

Hi all,

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.


Hi Andrew,

I have not seen this problem before. What ROOT version are you using? If it less than 5.26, can you try 5.26 or 5.27? If it is >=5.26, can you file a Savannah bug report and I will fix it.


Hi Wouter,

Many thanks for your response.

I’m using ROOT version v5.26/00b. I’ll submit a Savannah report as you suggest.