Having chained together ‘outTree’ from different .root files and successfully used the template produced by MakeClass as follows:
TChain chain(“outTree”);
chain.Add(“new*”);
chain.MakeClass(“HistogramChain”);
I find that if I try to open a tfile within the macro template HistogramChain.C, I get a segmentation violation. Print statements show it is just from opening this file, I do nothing else before this. The file is not part of the TChain.
If I add this:
if (f->IsZombie()) {
cout << "Error opening file" << endl;
exit(-1);
}
directly after the declaration TFile *f = new TFile(“ROC.root”); which is causing the problem, it doesn’t enter the zombie loop.
Why would this be causing a problem and is there a way to solve it?
Thanks for any help
Please read tips for efficient and successful posting and posting code
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided