#include "dunecore/DuneCommon/Utility/offsetLine.h"
#include <string>
#include <iostream>
#include <iomanip>
#include <vector>
#include <cassert>
Go to the source code of this file.
|
using | Index = unsigned int |
|
using Index = unsigned int |
Definition at line 27 of file test_offsetLine.cxx.
28 const string myname =
"test_offsetLine: ";
29 cout << myname <<
"Starting test" <<
endl;
31 cout << myname <<
"NDEBUG must be off." <<
endl;
34 string line =
"-----------------------------";
37 cout << myname << line <<
endl;
38 cout <<
"Testing TF1." <<
endl;
40 cout << myname << line <<
endl;
41 cout <<
"Build waveforms." <<
endl;
45 for (
double slp : slps ) {
46 for (
double off : offs ) {
51 cout << myname << line <<
endl;
52 cout <<
"Display waveforms." <<
endl;
56 for (
int ipar=0; ipar<pf0->GetNpar(); ++ipar ) {
57 string parName = pf0->GetParName(ipar);
58 cout <<
setw(10) << parName <<
":";
59 for ( TF1* pf : pfs ) cout <<
setw(w) << std::fixed << pf->GetParameter(ipar);
62 for (
double t=-8.0;
t<8.0;
t+=1.0 ) {
63 cout <<
setw(10) <<
t <<
":";
64 for ( TF1* pf : pfs ) {
65 double wf = pf->Eval(t);
66 cout <<
setw(w) << std::fixed << wf;
71 cout << myname << line <<
endl;
72 cout << myname <<
"Done." <<
endl;
TF1 * offsetLineTF1(double off=0.0, double slope=1.0, double xmin=-10.0, double xmax=10.0, std::string fname="offsetLine")
Q_EXPORT QTSManip setw(int w)
void line(double t, double *p, double &x, double &y, double &z)
QTextStream & endl(QTextStream &s)