Example program to test Legendre polynome.  
More...
#include <string>
#include <iostream>
#include <iomanip>
#include "TRandom3.h"
#include "JMath/JLegendre.hh"
#include "JMath/JMathSupportkit.hh"
#include "JTools/JQuantile.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
 
Go to the source code of this file.
 | 
| int  | main (int argc, char **argv) | 
|   | 
Example program to test Legendre polynome. 
- Author
 - mdejong 
 
Definition in file JMath/JLegendre.cc.
 
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 23 of file JMath/JLegendre.cc.
   28   const double xmin = -10.0;
 
   29   const double xmax = +10.0;
 
   31   typedef JLegendre<double>  JLegendre_t;
 
   33   unsigned int  numberOfEvents;
 
   35   JLegendre_t   f1(xmin, xmax);
 
   40     JParser<> zap(
"Example program to test Legendre polynome.");
 
   49   catch(
const exception &error) {
 
   50     FATAL(error.what() << endl);
 
   58     const double x = xmin + i * (xmax - xmin) / (
numberOfBins - 1);
 
   64     DEBUG(
"data: " << 
FIXED(7,3) << i->first  << 
' ' << 
FIXED(7,3) << i->second << endl);
 
   70   JLegendre<double, N> 
g1(data.begin(), data.end());
 
   72   for (
size_t n = 0; 
n != 
N + 1; ++
n) {
 
   73     STATUS(
"Legendre: " << setw(2) << 
n << 
' ' << 
FIXED(7,3) << 
g1[
n] << endl);
 
   76   if (numberOfEvents > 0) {
 
   80     for (
unsigned int i = 0; i != numberOfEvents; ++i) {
 
   82       const double x = gRandom->Uniform(xmin, xmax);
 
   83       const double y = f1(x);
 
   84       const double z = 
g1(x);
 
Utility class to parse command line options. 
 
Q(UTCMax_s-UTCMin_s)-livetime_s
 
Auxiliary data structure for floating point format specification. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
alias put_queue eval echo n
 
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
 
then usage $script[input file[working directory[option]]] nWhere option can be N
 
int numberOfBins
number of bins for average CDF integral of optical module 
 
Double_t g1(const Double_t x)
Function.