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++) {
37 uint32_t
word = index[
i];
40 int type = (word >> 28) & 0xF;
45 rosID = (word >> 3) & 0xFF;
49 else if (type >= 4 && type <= 5) {
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;
void interpretRawData(const unsigned int *index, int datasize, int dduID, edm::ESHandle< DTReadOutMapping > &mapping, std::unique_ptr< DTDigiCollection > &product, std::unique_ptr< DTLocalTriggerCollection > &product2, uint16_t rosList=0) override