29int main(
int argc,
char **argv)
43 JParser<> zap(
"Auxiliary program to print the ranges of x and y values of 1D ROOT objects.");
45 zap[
'f'] =
make_field(inputFile,
"<input file>:<object name>");
52 catch(
const exception &error) {
57 JRange_t X = JRange_t::DEFAULT_RANGE();
58 JRange_t Y = JRange_t::DEFAULT_RANGE();
67 ERROR(
"File: " << input->getFullFilename() <<
" not opened." <<
endl);
77 const TString tag(key->GetName());
83 if (tag.Contains(
regexp) && isTObject(key)) {
85 TObject*
object = key->ReadObj();
89 TH1& h1 =
dynamic_cast<TH1&
>(*object);
91 X.combine(x.join(JRange_t(h1.GetXaxis()->GetXmin(), h1.GetXaxis()->GetXmax())));
92 Y.combine(y.join(JRange_t(h1.GetMinimum(), h1.GetMaximum())));
100 X.combine(x.join(JRange_t(h1.GetXaxis()->GetXmin(), h1.GetXaxis()->GetXmax())));
101 Y.combine(y.join(JRange_t(h1.GetMinimum(), h1.GetMaximum())));
107 TGraph&
g1 =
dynamic_cast<TGraph&
>(*object);
109 for (
Int_t i = 0; i !=
g1.GetN(); ++i) {
110 if (x(
g1.GetX()[i]) &&
112 X.include(
g1.GetX()[i]);
113 Y.include(
g1.GetY()[i]);
124 <<
SCIENTIFIC(15,5) << Y.getLowerLimit() <<
' '
125 <<
SCIENTIFIC(15,5) << X.getUpperLimit() <<
' '