16int main(
int argc,
char** argv)
29 JParser<> zap(
"Program to test methods of `JROOT::JBinsMap`");
37 catch(
const exception& error) {
38 FATAL(error.what() << endl);
45 if (i->second.find(
'z') != i->second.cend()) {
47 }
else if (i->second.find(
'y') != i->second.cend()) {
49 }
else if (i->second.find(
'x') != i->second.cend()) {
55 const Int_t Ndim = p->GetDimension();
57 if (Ndim > 0 && Ndim < 4) {
61 ASSERT(p->GetXaxis()->GetNbins() == (Int_t) Xbins.size()-1);
63 for (Int_t n = 1; n <= p->GetXaxis()->GetNbins(); ++n) {
64 DEBUG (p->GetXaxis()->GetBinLowEdge(n) <<
" =?= " << Xbins[n-1] << endl);
65 ASSERT(p->GetXaxis()->GetBinLowEdge(n) == Xbins[n-1]);
72 ASSERT(p->GetYaxis()->GetNbins() == (Int_t) Ybins.size()-1);
74 for (Int_t n = 1; n <= p->GetYaxis()->GetNbins(); ++n) {
75 DEBUG (p->GetYaxis()->GetBinLowEdge(n) <<
" =?= " << Ybins[n-1] << endl);
76 ASSERT(p->GetYaxis()->GetBinLowEdge(n) == Ybins[n-1]);
83 ASSERT(p->GetZaxis()->GetNbins() == (Int_t) Zbins.size()-1);
85 for (Int_t n = 1; n <= p->GetZaxis()->GetNbins(); ++n) {
86 DEBUG (p->GetZaxis()->GetBinLowEdge(n) <<
" =?= " << Zbins[n-1] << endl);
87 ASSERT(p->GetZaxis()->GetBinLowEdge(n) == Zbins[n-1]);
93 FATAL(
"Unexpected dimensionality for histogram " << p->GetName());