23 std::unique_ptr<DTDigiCollection>& product,
24 std::unique_ptr<DTLocalTriggerCollection>& product2,
27 const int wordLength = 4;
28 int numberOfWords = datasize / wordLength;
32 map<int, int> hitOrder;
35 for (
int i = 1;
i < numberOfWords;
i++) {
45 rosID = (
word >> 3) & 0xFF;
50 int tdcID = (
word >> 24) & 0xF;
51 int tdcChannel = (
word >> 19) & 0x1F;
53 int channelIndex = robID << 7 | tdcID << 5 | tdcChannel;
54 hitOrder[channelIndex]++;
56 int tdcMeasurement =
word & 0x7FFFF;
61 dduID =
pset.getUntrackedParameter<
int>(
"dduID", 730);
65 if (!
mapping->readOutToGeometry(dduID, rosID, robID, tdcID, tdcChannel, detId)) {
66 if (
pset.getUntrackedParameter<
bool>(
"debugMode",
false))
67 cout <<
"[DTROS8Unpacker] " << detId << endl;
68 int wire = detId.wire();
71 DTDigi digi(wire, tdcMeasurement, hitOrder[channelIndex] - 1);
74 product->insertDigi(detId.layerId(), digi);
75 }
else if (
pset.getUntrackedParameter<
bool>(
"debugMode",
false))
76 cout <<
"[DTROS8Unpacker] Missing wire!" << endl;
80 cout <<
"[DTUnpackingModule]: WARNING: Digi not build!" << endl;