#include <stdio.h>
#include <map>
#include <iostream>
#include <iomanip>
Go to the source code of this file.
|
typedef unsigned int | Index |
|
typedef unsigned int Index |
Index HardwareChannelFromOpChannel |
( |
Index |
opChannel | ) |
|
Definition at line 237 of file sspmapmaker_v1.c.
239 std::cout <<
"Requesting an OpDet number for an uninstrumented channel, " << opChannel <<
std::endl;
bool IsValidOpChannel(Index opChannel, Index)
std::map< Index, Index > fHWChannel
QTextStream & endl(QTextStream &s)
Definition at line 218 of file sspmapmaker_v1.c.
void SSPandCh(Index detNum, Index channel, Index &ssp, Index &sspch)
Index OpChannelFromSSP(Index ssp, Index sspch)
Definition at line 227 of file sspmapmaker_v1.c.
229 std::cout <<
"Requesting an OpDet number for an uninstrumented channel, " << opChannel <<
std::endl;
232 return fOpDet.at(opChannel);
std::map< Index, Index > fOpDet
bool IsValidOpChannel(Index opChannel, Index)
QTextStream & endl(QTextStream &s)
void PrintChannelMaps |
( |
| ) |
|
Definition at line 268 of file sspmapmaker_v1.c.
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)
Index OpDetFromOpChannel(Index opChannel)
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)
QTextStream & endl(QTextStream &s)
Definition at line 206 of file sspmapmaker_v1.c.
208 ssp =
fSSP.at(detNum);
212 std::cerr <<
"Invalid address: SSP #" << ssp <<
", SSP channel" << sspch <<
std::endl;;
std::map< Index, Index > fSSP
QTextStream & endl(QTextStream &s)
std::map< Index, Index > fSSPChOne
Definition at line 41 of file sspmapmaker_v1.c.
136 for (
Index opDet = 0; opDet < 60; opDet++) {
143 if (opChannel > fMaxOpChannel) fMaxOpChannel = opChannel;
147 fOpDet[opChannel] = opDet;
168 SSPandCh(OpDet, hwChannel, ssp, sspch);
172 printf(
"%5d %5d %5d %5d %5d %5d %5d\n",ionline,APA,ssp,ssp,sspch,OpDet,ionline);
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)
Index NOpHardwareChannels(Index opDet)
std::map< Index, Index > fHWChannel
std::map< Index, Index > fSSPChOne