28int main(
int argc,
char **argv)
51 JParser<> zap(
"Auxiliary program to test contents of 3D histograms.");
53 zap[
'f'] =
make_field(inputFile,
"measurement histogram, e.g: <file name>:<object name>");
54 zap[
'x'] =
make_field(X,
"accepted x-range values") = JRange_t();
55 zap[
'y'] =
make_field(Y,
"accepted y-range values") = JRange_t();
56 zap[
'z'] =
make_field(Z,
"accepted z-range values") = JRange_t();
57 zap[
'c'] =
make_field(C,
"accepted codomain values") = JRange_t();
68 catch(
const exception &error) {
81 FATAL(
"File: " << input->getFullFilename() <<
" not opened." <<
endl);
90 const TString tag(key->GetName());
96 if (tag.Contains(
regexp) && isTObject(key)) {
102 for (map_type::const_iterator i = zmap.begin(); i != zmap.end(); ++i) {
104 const double value = getResult(i->first, p);
105 const JRange_t& range = i->second;
107 DEBUG(
"Global test " << i->first <<
' ' << (range(value) ?
"passed" :
"failed") <<
endl);
114 int number_of_outliers = 0;
135 DEBUG(
"Test outlier " <<
h3->GetName() <<
" bin (" <<
ix <<
"," <<
iy <<
',' <<
iz <<
") (" <<
h3->GetXaxis()->GetBinLabel(
ix) <<
"," <<
h3->GetYaxis()->GetBinLabel(
iy) <<
"," <<
h3->GetZaxis()->GetBinLabel(
iz) <<
") " << c <<
' ' << (
ok ?
"passed" :
"failed") <<
endl);
138 ++number_of_outliers;
147 FATAL(
"Object at " << *input <<
" is not TH3" <<
endl);
151 cout << (number_of_outliers > numberOfOutliers ? RED : GREEN);
155 if (number_of_outliers > numberOfOutliers) {