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()))) {
61int main(
int argc,
char **argv)
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);
97 TDirectory* dir = getDirectory(inputFile);
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) && isTObject(key)) {
117 TGraph*
g1 =
dynamic_cast<TGraph*
>(key->ReadObj());
124 getValue(y_margin, tag, 0.0));
126 out << setw(64) << left <<
g1->GetName() << right <<
' '
127 << setw(5) << numberOfEntries <<
' '
128 << setw(3) << numberOfOutliers <<
' '
int main(int argc, char **argv)
General purpose messaging.
#define DEBUG(A)
Message macros.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
I/O formatting auxiliaries.
Double_t g1(const Double_t x)
Function.
Auxiliary class to define a range between two values.
Auxiliary class to handle file name, ROOT directory and object name.
TString getObjectName() const
Get object name.
TString getFullFilename() const
Get full file name, including path.
Utility class to parse command line options.
double getValue(const JScale_t scale)
Get numerical value corresponding to scale.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...