26 JABC(
const char* title) :
46 JPrecision_t(
const double f,
54 friend std::istream&
operator>>(std::istream& in, JPrecision_t&
object)
56 return in >>
object.f >>
object.fp >>
object.v;
59 friend std::ostream&
operator<<(std::ostream& out,
const JPrecision_t&
object)
61 return out <<
object.f <<
' ' <<
object.fp <<
' ' <<
object.v;
77int main(
int argc,
char **argv)
84 unsigned int numberOfEvents;
90 precision[
"spline"] = JPrecision_t(1.0e-3, 1.0e-1, 1.0e-4);
91 precision[
"hermite"] = JPrecision_t(1.0e-3, 1.0e-1, 1.0e-4);
92 precision[
"grid"] = JPrecision_t(1.0e-3, 1.0e-1, 1.0e-4);
93 precision[
"polint"] = JPrecision_t(1.0e-14, 1.0e-12, 1.0e-14);
97 JParser<> zap(
"Example program to test 1D interpolation of a polynome.");
107 catch(
const exception &error) {
120 const double xmin = -1.0;
121 const double xmax = +1.0;
137 if (numberOfEvents != 0) {
144 for (
unsigned int i = 0; i != numberOfEvents; ++i) {
146 const double x =
gRandom->Uniform(xmin, xmax);
168 if (
debug >= debug_t) {
171 cout <<
"_________________________________________" <<
endl;
202 ASSERT(
Qgrid .f .getSTDev() <= precision[
"grid"].f);
203 ASSERT(
Qgrid .fp.getSTDev() <= precision[
"grid"].fp);
204 ASSERT(
Qgrid .v .getSTDev() <= precision[
"grid"].v);
216 cout <<
"> " << flush;
218 getline(
cin, buffer);
std::istream & operator>>(std::istream &in, JAANET::JHead &header)
Read header from input.
General purpose messaging.
#define ASSERT(A,...)
Assert macro.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int main(int argc, char **argv)
I/O formatting auxiliaries.
int numberOfBins
number of bins for average CDF integral of optical module
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Recursive template class for polynomial function.
double getIntegral(const double x) const
Integral value.
double getValue(const double x) const
Function value.
double getDerivative(const double x) const
Derivative value.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary data structure for floating point format specification.