#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.
|
using | Index = unsigned int |
|
using Index = unsigned int |
Definition at line 30 of file test_TpcDataTool.cxx.
31 for (
Index icha=0; icha<10; ++icha ) {
32 (*pacm)[icha].setChannelInfo(icha, icha%4);
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
int test_TpcDataTool_default |
( |
| ) |
|
Definition at line 62 of file test_TpcDataTool.cxx.
63 const string myname =
"test_TpcDataTool_default: ";
65 cout << myname <<
"NDEBUG must be off." <<
endl;
68 string line =
"-----------------------------";
71 cout << myname << line <<
endl;
72 cout << myname <<
"Instantiate tool." <<
endl;
76 cout << myname << line <<
endl;
77 cout << myname <<
"Create data." <<
endl;
80 assert( pacm->size() == 0 );
83 assert( pacm->size() == ncha );
88 cout << myname << line <<
endl;
89 cout << myname <<
"Call update." <<
endl;
94 cout << myname << line <<
endl;
95 cout << myname <<
"Call view." <<
endl;
100 cout << myname << line <<
endl;
101 cout << myname <<
"Call update TPC." <<
endl;
106 cout << myname << line <<
endl;
107 cout << myname <<
"Call view TPC." <<
endl;
112 cout << myname << line <<
endl;
113 cout << myname <<
"Test complete." <<
endl;
std::shared_ptr< AdcChannelDataMap > AdcDataPtr
void print(std::ostream *pout) const
void line(double t, double *p, double &x, double &y, double &z)
AdcDataPtr createAdcData(bool updateParent=true)
QTextStream & endl(QTextStream &s)
int test_TpcDataTool_update |
( |
| ) |
|
Definition at line 122 of file test_TpcDataTool.cxx.
123 const string myname =
"test_TpcDataTool_update: ";
125 cout << myname <<
"NDEBUG must be off." <<
endl;
128 string line =
"-----------------------------";
131 cout << myname << line <<
endl;
132 cout << myname <<
"Instantiate tool." <<
endl;
136 cout << myname << line <<
endl;
137 cout << myname <<
"Create data." <<
endl;
140 assert( pacm->size() == 0 );
143 assert( pacm->size() == ncha );
146 cout << myname << line <<
endl;
147 cout << myname <<
"Call update TPC." <<
endl;
153 for (
const auto& iacd : *tpd.
getAdcData()[0] ) {
154 Index icha = iacd.first;
156 cout << myname <<
" icha, femb = " << acd.
channel() <<
", " << acd.
fembID() <<
endl;
161 cout << myname << line <<
endl;
162 cout << myname <<
"Call view TPC." <<
endl;
163 for (
auto& iacd : *tpd.
getAdcData()[0] ) iacd.second.setChannelInfo(iacd.second.channel(), 200);
167 for (
const auto& iacd : *tpd.
getAdcData()[0] ) {
168 Index icha = iacd.first;
170 cout << myname <<
" icha, femb = " << acd.
channel() <<
", " << acd.
fembID() <<
endl;
172 assert(acd.
fembID() == 200);
174 cout << myname << line <<
endl;
175 cout << myname <<
"Test complete." <<
endl;
std::shared_ptr< AdcChannelDataMap > AdcDataPtr
void print(std::ostream *pout) const
AdcDataVector & getAdcData()
void line(double t, double *p, double &x, double &y, double &z)
AdcDataPtr createAdcData(bool updateParent=true)
QTextStream & endl(QTextStream &s)