8 #include "TApplication.h" 
   30 int main(
int argc, 
char **argv)
 
   35   typedef JRange<double>  JRange_t;
 
   44     JParser<> zap(
"Auxiliary program to print the ranges of x and y values of 1D ROOT objects.");
 
   46     zap[
'f'] = 
make_field(inputFile,  
"<input file>:<object name>");
 
   47     zap[
'x'] = 
make_field(x,          
"x range")                     = JRange_t();
 
   48     zap[
'y'] = 
make_field(y,          
"y range")                     = JRange_t();
 
   53   catch(
const exception &error) {
 
   54     FATAL(error.what() << endl);
 
   58   JRange_t X = JRange_t::DEFAULT_RANGE;
 
   59   JRange_t 
Y = JRange_t::DEFAULT_RANGE;
 
   63     DEBUG(
"Input: " << *input << endl);
 
   68       ERROR(
"File: " << input->getFullFilename() << 
" not opened." << endl);
 
   72     const TRegexp regexp(input->getObjectName());
 
   74     TIter iter(dir->GetListOfKeys());
 
   76     for (TKey* key; (key = (TKey*) iter.Next()) != NULL; ) {
 
   78       const TString tag(key->GetName());
 
   80       DEBUG(
"Key: " << tag << 
" match = " << tag.Contains(regexp) << endl);
 
   84       if (tag.Contains(regexp)) {
 
   86         TObject* 
object = key->ReadObj();
 
   90           TH1& 
h1 = 
dynamic_cast<TH1&
>(*object);
 
   92           X.combine(x.join(JRange_t(h1.GetXaxis()->GetXmin(), h1.GetXaxis()->GetXmax())));
 
   93           Y.combine(y.join(JRange_t(h1.GetMinimum(),          h1.GetMaximum())));
 
   99           TProfile& 
h1 = 
dynamic_cast<TProfile&
>(*object);
 
  101           X.combine(x.join(JRange_t(h1.GetXaxis()->GetXmin(), h1.GetXaxis()->GetXmax())));
 
  102           Y.combine(y.join(JRange_t(h1.GetMinimum(),          h1.GetMaximum())));
 
  108           TGraph& 
g1 = 
dynamic_cast<TGraph&
>(*object);
 
  110           for (Int_t i = 0; i != g1.GetN(); ++i) {
 
  111             if (x(g1.GetX()[i]) &&
 
  113               X.include(g1.GetX()[i]);
 
  114               Y.include(g1.GetY()[i]);
 
  124   cout << 
FIXED(15,3) << X.getLowerLimit() << 
' '  
  125        << 
FIXED(15,3) << 
Y.getLowerLimit() << 
' '  
  126        << 
FIXED(15,3) << X.getUpperLimit() << 
' '  
  127        << 
FIXED(15,3) << 
Y.getUpperLimit() << endl;
 
Utility class to parse command line options. 
 
then for HISTOGRAM in h0 h1
 
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
 
Auxiliary data structure for floating point format specification. 
 
I/O formatting auxiliaries. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
General purpose messaging. 
 
Auxiliary class to define a range between two values. 
 
Utility class to parse command line options. 
 
TDirectory * getDirectory(const JRootObjectID &id)
Get TDirectory pointer. 
 
#define DEBUG(A)
Message macros. 
 
Double_t g1(const Double_t x)
Function. 
 
int main(int argc, char *argv[])