22 using std::ostringstream;
32 for (
Index icha=0; icha<10; ++icha ) {
33 acds[icha].setChannelInfo(icha, icha%4);
50 cout <<
"AdcChannelTool_update::update: Modifying channel " << acd.
channel() <<
endl;
53 std::vector<int> fembchans(1, fembchan);
55 ret.
setInt(
"fembchan", fembchan);
65 const string myname =
"test_AdcChannelTool_default: ";
67 cout << myname <<
"NDEBUG must be off." <<
endl;
70 string line =
"-----------------------------";
73 cout << myname << line <<
endl;
74 cout << myname <<
"Instantiate tool." <<
endl;
82 cout << myname << line <<
endl;
83 cout << myname <<
"Call update." <<
endl;
88 cout << myname << line <<
endl;
89 cout << myname <<
"Call view." <<
endl;
94 cout << myname << line <<
endl;
95 cout << myname <<
"Call updateMap." <<
endl;
100 cout << myname << line <<
endl;
101 cout << myname <<
"Call viewMap." <<
endl;
106 cout << myname << line <<
endl;
107 cout << myname <<
"Test complete." <<
endl;
117 const string myname =
"test_AdcChannelTool_update: ";
119 cout << myname <<
"NDEBUG must be off." <<
endl;
122 string line =
"-----------------------------";
125 cout << myname << line <<
endl;
126 cout << myname <<
"Instantiate tool." <<
endl;
134 cout << myname << line <<
endl;
135 cout << myname <<
"Call update." <<
endl;
141 assert( acd1.
fembID() == 101 );
143 cout << myname << line <<
endl;
144 cout << myname <<
"Call view." <<
endl;
146 ret = act.
view(acd1);
150 assert( acd1.
fembID() == 200 );
152 cout << myname << line <<
endl;
153 cout << myname <<
"Call updateMap." <<
endl;
157 for (
const auto& iacd : acds ) {
158 Index icha = iacd.first;
160 cout << myname <<
" icha, femb = " << acd.
channel() <<
", " << acd.
fembID() <<
endl;
165 cout << myname << line <<
endl;
166 cout << myname <<
"Call viewMap." <<
endl;
167 for (
auto& iacd : acds ) iacd.second.setChannelInfo(iacd.second.channel(), 200);
171 for (
const auto& iacd : acds ) {
172 Index icha = iacd.first;
174 cout << myname <<
" icha, femb = " << acd.
channel() <<
", " << acd.
fembID() <<
endl;
176 assert(acd.
fembID() == 200);
178 cout << myname << line <<
endl;
179 cout << myname <<
"Test complete." <<
endl;
void print(std::ostream *pout) const
void setIntVector(Name name, const IntVector &val)
void setChannelInfo(ChannelInfoPtr pchi)
void setInt(Name name, int val)
void line(double t, double *p, double &x, double &y, double &z)
std::map< AdcChannel, AdcChannelData > AdcChannelDataMap
QTextStream & endl(QTextStream &s)