47 {
49 std::vector<unsigned short int> v16;
50
51 RPCRODStructure rodReadout;
52 RXReadOutStructure rxReadout;
53 PadReadOutStructure padReadout;
54 MatrixReadOutStructure matrixReadout;
55
56
57
58 typedef std::vector<const RpcPad*> receiver;
59 std::map<int, receiver> mapReceiver;
60
62 int sector = pPad->sector();
63 mapReceiver[sector].push_back(pPad);
64 }
65
66 std::map<int, receiver>::iterator
re = mapReceiver.begin();
67 std::map<int, receiver>::iterator re_end = mapReceiver.end();
68
69
74 uint16_t rodId = ((*re).first % 32) / 2;
75 assert(rodId <= 15);
76
82
83
84 for (;
re != re_end; ++
re) {
85
87 rxHeader[0] = 0;
88 rxHeader[1] = ((*re).first % 32) % 2 << 3;
89 rxHeader[2] = 0;
90
92
93 v16.push_back(receiverHeader);
94
95
96 std::vector<const RpcPad*>::const_iterator
it = (*re).second.begin();
97 std::vector<const RpcPad*>::const_iterator it_end = (*re).second.end();
98
99 for (;
it != it_end; ++
it) {
100 const RpcPad* pad = (*it);
101
102
103 unsigned short int padHeader[3];
104 padHeader[0] = 0;
106 padHeader[2] = pad->
status();
107 v16.push_back(padReadout.
makeHeader(padHeader));
108
111 for (; it_cma != it_cma_end; ++it_cma) {
113 unsigned short int cmaHeader[3];
114 cmaHeader[0] = 0;
116 cmaHeader[2] = cma->
fel1Id();
117 v16.push_back(matrixReadout.
makeHeader(cmaHeader));
121 for (; it_fCh != it_fCh_end; ++it_fCh) {
122 const RpcFiredChannel* firedChannel = (*it_fCh);
123 unsigned short int body[5];
124 body[0] = 0;
125 body[1] = firedChannel->
bcid();
126 body[2] = firedChannel->
time();
127 body[3] = firedChannel->
ijk();
128
129 if (body[3] < 7) {
130 body[4] = firedChannel->
channel();
131 } else {
132 body[4] = firedChannel->
thr() | ((firedChannel->
ovl()) << 2);
133 }
134
135 v16.push_back(matrixReadout.
makeBody(body));
136 }
138 }
139
140
141
142 ubit16 errorCodes[6] = {0, 0, 0, 0, 0, 0};
143 v16.push_back(padReadout.
makeFooter(errorCodes));
144 }
145
146 v16.push_back(rxReadout.
makeFooter((uint16_t)0));
147 }
148
149
150 int n16words = v16.size();
151 if (n16words % 2 == 1) {
152 v16.push_back(0);
153 n16words++;
154 }
156
157
const boost::regex re(r_e)
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current RpcCoinMatrix
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current RpcPad
unsigned short int ubit16
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
ubit16 makeBody(ubit16 *inputData)
ubit16 makeHeader(ubit16 *inputData)
ubit16 makeFooter(ubit16 inputData)
ubit16 makeFooter(ubit16 errorCode)
ubit16 makeHeader(ubit16 *inputData)
RODword getSourceID(ubit16 subsystem, ubit16 RODID)
RODword getFormatVersion()
RODword getHeaderMarker()
ubit16 makeHeader(ubit16 *inputData)
ubit16 makeFooter(ubit16 errorCode)
void packFragments(const std::vector< uint16_t > &v16, std::vector< uint32_t > &v, int n) const