29int main(
int argc,
char **argv)
44 JParser<> zap(
"Auxiliary program to print the ranges of x, y and z values of 2D ROOT objects.");
46 zap[
'f'] =
make_field(inputFile,
"<input file>:<object name>");
54 catch(
const exception &error) {
59 JRange_t X = JRange_t::DEFAULT_RANGE();
60 JRange_t Y = JRange_t::DEFAULT_RANGE();
61 JRange_t Z = JRange_t::DEFAULT_RANGE();
70 ERROR(
"File: " << input->getFullFilename() <<
" not opened." <<
endl);
80 const TString tag(key->GetName());
86 if (tag.Contains(
regexp) && isTObject(key)) {
88 TObject*
object = key->ReadObj();
92 TH2& h2 =
dynamic_cast<TH2&
>(*object);
94 X.combine(x.join(JRange_t(h2.GetXaxis()->GetXmin(), h2.GetXaxis()->GetXmax())));
95 Y.combine(y.join(JRange_t(h2.GetYaxis()->GetXmin(), h2.GetYaxis()->GetXmax())));
96 Z.combine(z.join(JRange_t(h2.GetMinimum(), h2.GetMaximum())));
104 X.combine(x.join(JRange_t(h2.GetXaxis()->GetXmin(), h2.GetXaxis()->GetXmax())));
105 Y.combine(y.join(JRange_t(h2.GetYaxis()->GetXmin(), h2.GetYaxis()->GetXmax())));
106 Z.combine(z.join(JRange_t(h2.GetMinimum(), h2.GetMaximum())));
112 TGraph2D& g2 =
dynamic_cast<TGraph2D&
>(*object);
114 for (
Int_t i = 0; i != g2.GetN(); ++i) {
115 if (x(g2.GetX()[i]) &&
118 X.include(g2.GetX()[i]);
119 Y.include(g2.GetY()[i]);
120 Z.include(g2.GetZ()[i]);
131 <<
SCIENTIFIC(15,5) << Y.getLowerLimit() <<
' '
132 <<
SCIENTIFIC(15,5) << Z.getLowerLimit() <<
' '
133 <<
SCIENTIFIC(15,5) << X.getUpperLimit() <<
' '
134 <<
SCIENTIFIC(15,5) << Y.getUpperLimit() <<
' '