16 std::map<Index, Index>
fSSP;
58 fSSP[ 1] = 41; fSSPChOne[ 1] = 0;
59 fSSP[ 3] = 41; fSSPChOne[ 3] = 4;
60 fSSP[ 5] = 41; fSSPChOne[ 5] = 8;
61 fSSP[ 7] = 42; fSSPChOne[ 7] = 0;
62 fSSP[ 9] = 42; fSSPChOne[ 9] = 4;
63 fSSP[11] = 42; fSSPChOne[11] = 8;
64 fSSP[13] = 43; fSSPChOne[13] = 0;
65 fSSP[15] = 43; fSSPChOne[15] = 4;
66 fSSP[17] = 43; fSSPChOne[17] = 8;
67 fSSP[19] = 44; fSSPChOne[19] = 0;
70 fSSP[21] = 61; fSSPChOne[21] = 0;
71 fSSP[23] = 61; fSSPChOne[23] = 4;
72 fSSP[25] = 61; fSSPChOne[25] = 8;
73 fSSP[27] = 62; fSSPChOne[27] = 0;
74 fSSP[29] = 62; fSSPChOne[29] = 4;
75 fSSP[31] = 63; fSSPChOne[31] = 0;
76 fSSP[33] = 62; fSSPChOne[33] = 8;
77 fSSP[35] = 64; fSSPChOne[35] = 0;
78 fSSP[37] = 64; fSSPChOne[37] = 4;
79 fSSP[39] = 64; fSSPChOne[39] = 8;
82 fSSP[41] = 53; fSSPChOne[41] = 0;
83 fSSP[43] = 53; fSSPChOne[43] = 4;
84 fSSP[45] = 53; fSSPChOne[45] = 8;
85 fSSP[47] = 54; fSSPChOne[47] = 0;
86 fSSP[49] = 51; fSSPChOne[49] = 0;
87 fSSP[51] = 54; fSSPChOne[51] = 4;
88 fSSP[53] = 51; fSSPChOne[53] = 4;
89 fSSP[55] = 51; fSSPChOne[55] = 8;
90 fSSP[57] = 54; fSSPChOne[57] = 8;
91 fSSP[59] = 52; fSSPChOne[59] = 0;
94 fSSP[ 0] = 11; fSSPChOne[ 0] = 0;
95 fSSP[ 2] = 11; fSSPChOne[ 2] = 4;
96 fSSP[ 4] = 11; fSSPChOne[ 4] = 8;
97 fSSP[ 6] = 12; fSSPChOne[ 6] = 0;
98 fSSP[ 8] = 12; fSSPChOne[ 8] = 4;
99 fSSP[10] = 12; fSSPChOne[10] = 8;
100 fSSP[12] = 13; fSSPChOne[12] = 0;
101 fSSP[14] = 13; fSSPChOne[14] = 4;
102 fSSP[16] = 13; fSSPChOne[16] = 8;
103 fSSP[18] = 14; fSSPChOne[18] = 0;
106 fSSP[20] = 21; fSSPChOne[20] = 0;
107 fSSP[22] = 21; fSSPChOne[22] = 4;
108 fSSP[24] = 21; fSSPChOne[24] = 8;
109 fSSP[26] = 22; fSSPChOne[26] = 0;
110 fSSP[28] = 22; fSSPChOne[28] = 4;
111 fSSP[30] = 22; fSSPChOne[30] = 8;
112 fSSP[32] = 23; fSSPChOne[32] = 0;
113 fSSP[34] = 23; fSSPChOne[34] = 4;
114 fSSP[36] = 23; fSSPChOne[36] = 8;
115 fSSP[38] = 24; fSSPChOne[38] = 0;
118 fSSP[40] = 31; fSSPChOne[40] = 0;
119 fSSP[42] = 31; fSSPChOne[42] = 4;
120 fSSP[44] = 31; fSSPChOne[44] = 8;
121 fSSP[46] = 34; fSSPChOne[46] = 0;
122 fSSP[48] = 32; fSSPChOne[48] = 0;
123 fSSP[50] = 32; fSSPChOne[50] = 4;
124 fSSP[52] = 32; fSSPChOne[52] = 8;
125 fSSP[54] = 33; fSSPChOne[54] = 0;
126 fSSP[56] = 33; fSSPChOne[56] = 4;
127 fSSP[58] = 33; fSSPChOne[58] = 8;
136 for (
Index opDet = 0; opDet < 60; opDet++) {
143 if (opChannel > fMaxOpChannel) fMaxOpChannel = opChannel;
147 fOpDet[opChannel] = opDet;
148 fHWChannel[opChannel] = hwCh;
168 SSPandCh(OpDet, hwChannel, ssp, sspch);
172 printf(
"%5d %5d %5d %5d %5d %5d %5d\n",ionline,APA,ssp,ssp,sspch,OpDet,ionline);
198 if (opDet == 31 or opDet == 46)
207 sspch = fSSPChOne.at(detNum) +
channel;
208 ssp = fSSP.at(detNum);
212 std::cerr <<
"Invalid address: SSP #" << ssp <<
", SSP channel" << sspch <<
std::endl;;
220 SSPandCh(detNum, channel, ssp, sspch);
229 std::cout <<
"Requesting an OpDet number for an uninstrumented channel, " << opChannel <<
std::endl;
232 return fOpDet.at(opChannel);
239 std::cout <<
"Requesting an OpDet number for an uninstrumented channel, " << opChannel <<
std::endl;
242 return fHWChannel.at(opChannel);
253 Index ch = ( (trunc(ssp/10) - 1)*4 + ssp%10 - 1 )*12 + sspch;
262 return fOpDet.count(opChannel);
271 cout <<
"---------------------------------------------------------------" <<
endl;
272 cout <<
"---------------------------------------------------------------" <<
endl;
273 cout <<
"---------------------------------------------------------------" <<
endl;
274 cout <<
"---------------------------------------------------------------" <<
endl;
275 cout <<
"---------------------------------------------------------------" <<
endl;
276 cout <<
"---------------------------------------------------------------" <<
endl;
277 cout <<
"---------------------------------------------------------------" <<
endl;
278 cout << endl <<
endl;
280 std::vector<Index> ssps = { 11, 12, 13, 14,
287 cout << endl <<
"By SSP" <<
endl;
288 for (
Index ssp : ssps) {
289 for (
Index sspch = 0; sspch < 12; sspch++) {
294 cout << endl <<
"Beam side" <<
endl;
295 for (
Index opDet = 1; opDet < 60; opDet += 2) {
296 cout <<
setw(2) << opDet <<
":";
304 cout << endl <<
"Non-Beam side" <<
endl;
305 for (
Index opDet = 0; opDet < 60; opDet += 2) {
306 cout <<
setw(2) << opDet <<
":";
314 cout << endl <<
"Online -> offline" <<
endl;
316 cout <<
setw(3) << opCh <<
": ";
322 cout <<
"empty channel" <<
endl;
326 cout << endl <<
endl;
327 cout <<
"---------------------------------------------------------------" <<
endl;
328 cout <<
"---------------------------------------------------------------" <<
endl;
329 cout <<
"---------------------------------------------------------------" <<
endl;
330 cout <<
"---------------------------------------------------------------" <<
endl;
331 cout <<
"---------------------------------------------------------------" <<
endl;
332 cout <<
"---------------------------------------------------------------" <<
endl;
333 cout <<
"---------------------------------------------------------------" <<
endl;
Index OpChannel(Index detNum, Index channel)
std::map< Index, Index > fSSP
Index OpDetFromOpChannel(Index opChannel)
std::map< Index, Index > fOpDet
void SSPandCh(Index detNum, Index channel, Index &ssp, Index &sspch)
Index HardwareChannelFromOpChannel(Index opChannel)
bool IsValidOpChannel(Index opChannel, Index)
Q_EXPORT QTSManip setw(int w)
Index NOpHardwareChannels(Index opDet)
Index OpChannelFromSSP(Index ssp, Index sspch)
Index MaxOpChannel(Index)
std::map< Index, Index > fHWChannel
QTextStream & endl(QTextStream &s)
std::map< Index, Index > fSSPChOne