79 for (dttax = digis->begin(); dttax != digis->end(); ++dttax) {
83 int wheelId = dttal.
wheel();
84 int sectorId = dttal.
sector();
85 int stationId = dttal.
station();
87 int layerId = dttal.
layer();
88 int cellId = (*ta).wire();
90 int dduId, rosId, robId, tdcId, tdcChannel;
91 if (!
mapping->geometryToReadOut(
92 wheelId, stationId, sectorId, slId, layerId, cellId, dduId, rosId, robId, tdcId, tdcChannel)) {
93 int crate =
theCRT(dduId, rosId);
95 if (crate != DTuROSFED)
98 int slot =
theSLT(dduId, rosId, robId);
101 int tdcTime = (*ta).countsTDC();
105 int word = ((
link & 0x7F) << 21) + ((tdcId & 0x03) << 19) + ((tdcChannel & 0x1F) << 14) + (tdcTime & 0x3FFF);
115 for (
int sltit = 0; sltit <
DOCESLOTS; sltit++) {
116 if (
bslts[sltit] == 0)
127 unsigned char* lineFED = dttfdata.
data();
129 int dataWord1, dataWord2;
133 dataWord1 = 0x50000000 + (
eventNum & 0xFFFFFF);
134 dataWord2 = (DTuROSFED & 0xFFF) << 8;
139 *((
int*)lineFED) = dataWord2;
141 *((
int*)lineFED) = dataWord1;
145 dataWord1 = (nslts & 0xF) << 20;
151 *((
int*)lineFED) = dataWord2;
153 *((
int*)lineFED) = dataWord1;
155 for (
int sltit = 0; sltit <
DOCESLOTS; sltit++) {
156 if (
bslts[sltit] == 0)
159 dataWord1 = (
dslts[sltit] & 0xFFFFFF);
160 dataWord2 = ((sltit + 1) & 0xF) << 16;
165 *((
int*)lineFED) = dataWord2;
167 *((
int*)lineFED) = dataWord1;
172 for (
int sltit = 0; sltit <
DOCESLOTS; sltit++) {
173 if (
bslts[sltit] == 0)
176 dataWord1 = ((sltit + 1) & 0xF) << 24;
182 *((
int*)lineFED) = dataWord2;
184 *((
int*)lineFED) = dataWord1;
192 *((
int*)lineFED) = dataWord2;
194 *((
int*)lineFED) = dataWord1;
196 for (
int nhit = 0; nhit <
bslts[sltit] / 2; nhit++) {
197 dataWord1 = 0x20000000 +
wslts[sltit].at(nhit * 2);
198 dataWord2 =
wslts[sltit].at(nhit * 2 + 1);
203 *((
int*)lineFED) = dataWord2;
205 *((
int*)lineFED) = dataWord1;
208 if (
bslts[sltit] % 2 == 1) {
209 dataWord1 = 0x20000000 +
wslts[sltit].at(
bslts[sltit] - 1);
210 dataWord2 = 0x1FFFFFFF;
215 *((
int*)lineFED) = dataWord2;
217 *((
int*)lineFED) = dataWord1;
220 dataWord1 = 0x40000000;
226 *((
int*)lineFED) = dataWord2;
228 *((
int*)lineFED) = dataWord1;
230 dataWord1 = 0x40000000;
236 *((
int*)lineFED) = dataWord2;
238 *((
int*)lineFED) = dataWord1;
241 dataWord2 = (
dslts[sltit] & 0xFFFFF);
246 *((
int*)lineFED) = dataWord2;
248 *((
int*)lineFED) = dataWord1;
259 *((
int*)lineFED) = dataWord2;
261 *((
int*)lineFED) = dataWord1;
265 dataWord1 = 0xA0000000 + (
lines & 0xFFFFFF);
270 dataWord2 += (newCRC & 0xFFFF) << 16;
273 *((
int*)lineFED) = dataWord2;
275 *((
int*)lineFED) = dataWord1;