The unpacker for DTs' ROS8: final version of Read Out Sector board with 25 channels.
- Author
- M. Zanetti INFN Padova FRC 140906
Definition at line 18 of file DTROS8Unpacker.h.
Unpacking method. index is the pointer to the beginning of the buffer. datasize is the size of the buffer in bytes
CopyAndPaste from P. Ronchese unpacker
Implements DTUnpacker.
Definition at line 19 of file DTROS8Unpacker.cc.
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;
65 if (!
mapping->readOutToGeometry(dduID, rosID, robID, tdcID, tdcChannel, detId)) {
67 cout <<
"[DTROS8Unpacker] " << detId << endl;
68 int wire = detId.wire();
71 DTDigi digi(wire, tdcMeasurement, hitOrder[channelIndex] - 1);
74 product->insertDigi(detId.layerId(), digi);
76 cout <<
"[DTROS8Unpacker] Missing wire!" << endl;
80 cout <<
"[DTUnpackingModule]: WARNING: Digi not build!" << endl;
References gather_cfg::cout, StorageManager_cfg::e1, mps_fire::i, taus_updatedMVAIds_cff::mapping, and muonDTDigis_cfi::pset.