#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include "dunecore/DuneInterface/Tool/TpcDataTool.h"
#include "dunecore/ArtSupport/DuneToolManager.h"
#include <cassert>
Go to the source code of this file.
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 95 of file test_AdcResultDumper.cxx.
96 bool useExistingFcl =
false;
100 cout <<
"Usage: " <<
argv[0] <<
" [ARG]" <<
endl;
101 cout <<
" If ARG = true, existing FCL file is used." <<
endl;
104 useExistingFcl = sarg ==
"true" || sarg ==
"1";
int test_AdcResultDumper(bool useExistingFcl=false)
QTextStream & endl(QTextStream &s)
int test_AdcResultDumper |
( |
bool |
useExistingFcl = false | ) |
|
Definition at line 26 of file test_AdcResultDumper.cxx.
27 const string myname =
"test_AdcResultDumper: ";
29 cout << myname <<
"NDEBUG must be off." <<
endl;
32 string line =
"-----------------------------";
34 cout << myname << line <<
endl;
35 string fclfile =
"test_AdcResultDumper.fcl";
36 string gname =
"protodune_geo";
37 if ( ! useExistingFcl ) {
38 cout << myname <<
"Creating top-level FCL." <<
endl;
39 ofstream
fout(fclfile.c_str());
42 fout <<
" tool_type: AdcResultDumper" <<
endl;
44 fout <<
" Tool: \"NoSuchTool\"" <<
endl;
47 fout <<
" tool_type: AdcResultDumper" <<
endl;
49 fout <<
" Tool: \"mytool1\"" <<
endl;
54 cout << myname <<
"Using existing top-level FCL." <<
endl;
57 cout << myname << line <<
endl;
58 cout << myname <<
"Fetching tool manager." <<
endl;
60 assert ( ptm !=
nullptr );
65 cout << myname << line <<
endl;
66 cout << myname <<
"Fetching tool 1." <<
endl;
68 assert( pard1 !=
nullptr );
70 cout << myname << line <<
endl;
71 cout << myname <<
"Fetching tool 2." <<
endl;
73 assert( pard2 !=
nullptr );
75 cout << myname << line <<
endl;
76 cout << myname <<
"Calling tool 1." <<
endl;
80 assert( dm1.
status() == 101 );
82 cout << myname << line <<
endl;
83 cout << myname <<
"Calling tool 2." <<
endl;
86 assert( dm2.
status() == 101 );
88 cout << myname << line <<
endl;
89 cout << myname <<
"Done." <<
endl;
void print(std::ostream *pout) const
void line(double t, double *p, double &x, double &y, double &z)
QTextStream & endl(QTextStream &s)