#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include "dunecore/ArtSupport/DuneToolManager.h"
#include "dunecore/DuneInterface/Tool/TimeOffsetTool.h"
#include "TH1F.h"
#include <cassert>
Go to the source code of this file.
|
using | Index = unsigned int |
|
using Index = unsigned int |
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 95 of file test_TimingRawDecoderOffsetTool.cxx.
96 bool useExistingFcl =
false;
100 cout <<
"Usage: " <<
argv[0] <<
" [keepFCL] [RUN]" <<
endl;
101 cout <<
" If keepFCL = true, existing FCL file is used." <<
endl;
102 cout <<
" If RUN is nonzero, the data for that run are displayed." <<
endl;
105 useExistingFcl = sarg ==
"true" || sarg ==
"1";
QTextStream & endl(QTextStream &s)
int test_TimingRawDecoderOffsetTool |
( |
bool |
useExistingFcl = false | ) |
|
Definition at line 29 of file test_TimingRawDecoderOffsetTool.cxx.
30 const string myname =
"test_TimingRawDecoderOffsetTool: ";
32 cout << myname <<
"NDEBUG must be off." <<
endl;
35 string line =
"-----------------------------";
37 cout << myname << line <<
endl;
38 string fclfile =
"test_TimingRawDecoderOffsetTool.fcl";
39 if ( ! useExistingFcl ) {
40 cout << myname <<
"Creating top-level FCL." <<
endl;
41 ofstream
fout(fclfile.c_str());
44 fout <<
" tool_type: TimingRawDecoderOffsetTool" <<
endl;
49 fout <<
" FembScaleValues: []" <<
endl;
50 fout <<
" RunDataTool: \"\"" <<
endl;
55 cout << myname <<
"Using existing top-level FCL." <<
endl;
58 cout << myname << line <<
endl;
59 cout << myname <<
"Fetching tool manager." <<
endl;
61 assert ( ptm !=
nullptr );
66 cout << myname << line <<
endl;
67 cout << myname <<
"Create time offset file." <<
endl;
70 Index daqVal = 369258;
72 cout << myname << line <<
endl;
73 cout << myname <<
"Fetching tool." <<
endl;
75 assert( tot !=
nullptr );
77 cout << myname << line <<
endl;
78 cout <<
"Fetch the time offset in ticks." <<
endl;
85 assert( off.
value == daqVal/25 );
86 assert( off.
unit ==
"tick" );
88 cout << myname << line <<
endl;
89 cout << myname <<
"Done." <<
endl;
void line(double t, double *p, double &x, double &y, double &z)
QTextStream & endl(QTextStream &s)