43 inline double getValue(
const map_type& zmap,
const TString& parameter,
const double value)
45 for (map_type::const_iterator i = zmap.begin(); i != zmap.end(); ++i) {
46 if (parameter.Contains(TRegexp(i->first.c_str()))) {
61 int main(
int argc,
char **argv)
66 JRootObjectID inputFile;
76 JParser<> zap(
"Auxiliary program to write test criteria to file.");
78 zap[
'f'] =
make_field(inputFile,
"<input file>:<object name>");
80 zap[
'N'] =
make_field(numberOfEntries,
"Minimal number of entries");
81 zap[
'O'] =
make_field(numberOfOutliers,
"Maximal number of outliers");
88 catch(
const exception &error) {
89 FATAL(error.what() << endl);
100 FATAL(
"File: " << inputFile.getFullFilename() <<
" not opened." << endl);
103 const TRegexp regexp(inputFile.getObjectName());
105 TIter iter(dir->GetListOfKeys());
107 for (TKey* key; (key = (TKey*) iter.Next()) != NULL; ) {
109 const TString tag(key->GetName());
111 DEBUG(
"Key: " << tag <<
" match = " << tag.Contains(regexp) << endl);
115 if (tag.Contains(regexp)) {
117 TGraph*
g1 =
dynamic_cast<TGraph*
>(key->ReadObj());
121 const JRange<double>
range(g1->GetY(), g1->GetY() + g1->GetN());
123 const double extra = (
getValue(y_expand, tag, 0.0) * (
range.getUpperLimit() -
range.getLowerLimit()) +
126 out << setw(64) << left << g1->GetName() << right <<
' '
127 << setw(5) << numberOfEntries <<
' '
128 << setw(3) << numberOfOutliers <<
' '
129 <<
FIXED(15,3) <<
range.getLowerLimit() - extra <<
' '
130 <<
FIXED(15,3) <<
range.getUpperLimit() + extra << endl;
Utility class to parse command line options.
double getValue(const JScale_t scale)
Get numerical value corresponding to scale.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
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.
z range($ZMAX-$ZMIN)< $MINIMAL_DZ." fi fi mv $WORKDIR/fit.root $MODULE_ROOT typeset -Z 4 STRING typeset -Z 2 FLOOR JPlot1D -f $
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[])