#include "dunecore/DuneInterface/Data/AdcTypes.h"
#include "dunecore/ArtSupport/DuneToolManager.h"
#include "dunecore/DuneInterface/Tool/IndexMapTool.h"
#include "TH1F.h"
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#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 101 of file test_ChannelStatusConfigTool.cxx.
102 bool useExistingFcl =
false;
104 string sarg(
argv[1]);
105 if ( sarg ==
"-h" ) {
106 cout <<
"Usage: " <<
argv[0] <<
" [keepFCL]" <<
endl;
107 cout <<
" If keepFCL = true, existing FCL file is used." <<
endl;
110 useExistingFcl = sarg ==
"true" || sarg ==
"1";
QTextStream & endl(QTextStream &s)
int test_ChannelStatusConfigTool |
( |
bool |
useExistingFcl = false | ) |
|
Definition at line 33 of file test_ChannelStatusConfigTool.cxx.
34 const string myname =
"test_ChannelStatusConfigTool: ";
36 cout << myname <<
"NDEBUG must be off." <<
endl;
39 string line =
"-----------------------------";
41 cout << myname << line <<
endl;
42 string fclfile =
"test_ChannelStatusConfigTool.fcl";
43 if ( ! useExistingFcl ) {
44 cout << myname <<
"Creating top-level FCL." <<
endl;
45 ofstream
fout(fclfile.c_str());
48 fout <<
" tool_type: ChannelStatusConfigTool" <<
endl;
60 cout << myname <<
"Using existing top-level FCL." <<
endl;
63 cout << myname << line <<
endl;
64 cout << myname <<
"Fetching tool manager." <<
endl;
66 assert ( ptm !=
nullptr );
71 cout << myname << line <<
endl;
72 cout << myname <<
"Fetching tool." <<
endl;
74 assert( pcs !=
nullptr );
76 cout << myname << line <<
endl;
77 cout <<
"Check some channels." <<
endl;
78 vector<Index> chks(30, 99);
88 for (
Index icha=0; icha<chks.size(); ++icha ) {
89 Index chanStat = pcs->get(icha);
90 cout <<
setw(8) << icha <<
": " <<
setw(2) << chanStat <<
endl;
91 assert( chanStat == chks[icha] );
94 cout << myname << line <<
endl;
95 cout << myname <<
"Done." <<
endl;
Q_EXPORT QTSManip setw(int w)
void line(double t, double *p, double &x, double &y, double &z)
QTextStream & endl(QTextStream &s)