26 int main(
int argc,
char **argv)
31 typedef JRange<Double_t> JRange_t;
34 JRootObjectID inputFile;
41 JParser<> zap(
"Auxiliary program to test ROOT fit results.");
43 zap[
'f'] =
make_field(inputFile,
"histogram, e.g: <file name>:<object name>");
44 zap[
'F'] =
make_field(fcn,
"function name") =
"user";
45 zap[
'@'] =
make_field(test,
"<parameter> <min> <max>");
50 catch(
const exception &error) {
51 FATAL(error.what() << endl);
58 FATAL(
"No object at " << inputFile << endl);
63 if (f1 == NULL && dynamic_cast<TF1*> (p) != NULL) { f1 =
dynamic_cast<TF1*
> (p); }
64 if (f1 == NULL && dynamic_cast<TH1*> (p) != NULL) { f1 =
dynamic_cast<TH1*
> (p)->GetFunction(fcn.c_str()); };
65 if (f1 == NULL && dynamic_cast<TGraph*>(p) != NULL) { f1 =
dynamic_cast<TGraph*
>(p)->GetFunction(fcn.c_str()); };
68 FATAL(
"No function at " << inputFile <<
" " << fcn << endl);
72 for (
int i = 0; i != f1->GetNpar(); ++i) {
74 DEBUG(left << setw(12) << f1->GetParName(i) <<
' ');
77 JTest_t::const_iterator p = test.find(f1->GetParName(i));
79 if (p != test.end()) {
81 DEBUG(
" [" <<
SCIENTIFIC(12,5) << p->second.getLowerLimit() <<
"," <<
SCIENTIFIC(12,5) << p->second.getLowerLimit() <<
"] ");
82 DEBUG((p->second(f1->GetParameter(i)) ?
"passed" :
"failed"));
93 for (
int i = 0; i != f1->GetNpar(); ++i) {
95 JTest_t::const_iterator p = test.find(f1->GetParName(i));
97 if (p != test.end()) {
98 ASSERT(p->second(f1->GetParameter(i)));
Utility class to parse command line options.
TObject * getObject(const JRootObjectID &id)
Get first TObject with given identifier.
int main(int argc, char *argv[])
#define ASSERT(A,...)
Assert macro.
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.
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
Auxiliary data structure for floating point format specification.