Hello,
There are 2 overloaded methods to set bin content in THnSparse.
- By the bin coordinates:
- And by the global bin index:
When I am trying to call the second method in a newly created THnSparseF object, I get segmentation violation.
Why?
Here is a simple example to reproduce the problem:
[code]{
int bins[3] = {1, 1, 1};
THnSparseF h(“name”, “title”, 3, bins);
// This method works:
// int v[3] = {0, 0, 0};
// h.SetBinContent(v, 1.23);
// This method causes segmentation violation.
h.SetBinContent(0, 2.23);
}
[/code]
My ROOT version is 5.30/01.