23 std::unique_ptr<DTDigiCollection>& product,
24 std::unique_ptr<DTLocalTriggerCollection>& product2,
29 const int wordLength = 4;
30 int numberOfWords = datasize / wordLength;
34 map<int,int> hitOrder;
37 for (
int i = 1;
i < numberOfWords;
i++ ) {
40 uint32_t word = index[
i];
43 int type = ( word >> 28 ) & 0xF;
48 rosID = ( word >> 3 ) & 0xFF;
52 else if ( type >= 4 && type <= 5 ) {
54 int tdcID = ( word >> 24 ) & 0xF;
55 int tdcChannel = ( word >> 19 ) & 0x1F;
57 int channelIndex = robID << 7 | tdcID << 5 | tdcChannel;
58 hitOrder[channelIndex]++;
60 int tdcMeasurement = word & 0x7FFFF;
67 dduID =
pset.getUntrackedParameter<
int>(
"dduID",730);
71 if ( ! mapping->
readOutToGeometry(dduID, rosID, robID, tdcID, tdcChannel,detId)) {
72 if (
pset.getUntrackedParameter<
bool>(
"debugMode",
false))
cout<<
"[DTROS8Unpacker] "<<detId<<endl;
73 int wire = detId.wire();
76 DTDigi digi(wire, tdcMeasurement, hitOrder[channelIndex]-1);
79 product->insertDigi(detId.layerId(),digi);
81 else if (
pset.getUntrackedParameter<
bool>(
"debugMode",
false))
82 cout<<
"[DTROS8Unpacker] Missing wire!"<<endl;
86 cout<<
"[DTUnpackingModule]: WARNING: Digi not build!"<<endl;
int readOutToGeometry(int dduId, int rosId, int robId, int tdcId, int channelId, DTWireId &wireId) const
transform identifiers
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