Dear experts,
in my code I have the following function:
double foo(double x, double y){
static TH2D *ssigpTa;
static bool init = false;
if(!init){
std::cout << “Initialising histogram” << std::endl;
Double_t xAxis1[402] = {0, 0.005, 0.015,…, 3.995, 4.04};
Double_t yAxis1[21] = {0, 0.1, 0.35, … , 50, 4000, 7070};
ssigpTa = new TH2D(“ssigpTa”,“ssigpTa”,401, xAxis1,20, yAxis1);
ssigpTa->SetBinContent(404,0.00376935);
…
ssigpTa->SetBinContent(8460,235.346);
ssigpTa->SetBinContent(8461,284.668);
ssigpTa->SetEntries(7620);
init = true;
}
return ssigpTa->Interpolate(x, y);
}
If I compile it with the C++ compiler and run it, all events (50k) in the sample are processed.
However, if I run it in PROOF, the execution of the code in the workers stops with a crash in the call to the TH2::Interpolate function after already having processed around 75% of the events (and having called foo(x,y) for several values of x and y). From some debugging it seems the problem raises in the FindBin call of the Interpolate method. I noticed that at just before the crash FindBin returned 1 instead of the correct bin, I wonder if it may be some memory corruption problem?
Thanks,
Giovanni