25 std::auto_ptr<DTDigiCollection>& product,
26 std::auto_ptr<DTLocalTriggerCollection>& product2,
31 const int wordLength = 4;
32 int numberOfWords = datasize / wordLength;
36 map<int,int> hitOrder;
39 for (
int i = 1;
i < numberOfWords;
i++ ) {
42 uint32_t word = index[
i];
45 int type = ( word >> 28 ) & 0xF;
50 rosID = ( word >> 3 ) & 0xFF;
54 else if ( type >= 4 && type <= 5 ) {
56 int tdcID = ( word >> 24 ) & 0xF;
57 int tdcChannel = ( word >> 19 ) & 0x1F;
59 int channelIndex = robID << 7 | tdcID << 5 | tdcChannel;
60 hitOrder[channelIndex]++;
62 int tdcMeasurement = word & 0x7FFFF;
69 dduID = pset.getUntrackedParameter<
int>(
"dduID",730);
73 if ( ! mapping->readOutToGeometry(dduID, rosID, robID, tdcID, tdcChannel,detId)) {
74 if (pset.getUntrackedParameter<
bool>(
"debugMode",
false))
cout<<
"[DTROS8Unpacker] "<<detId<<endl;
75 int wire = detId.wire();
78 DTDigi digi(wire, tdcMeasurement, hitOrder[channelIndex]-1);
81 product->insertDigi(detId.layerId(),digi);
83 else if (pset.getUntrackedParameter<
bool>(
"debugMode",
false))
84 cout<<
"[DTROS8Unpacker] Missing wire!"<<endl;
88 cout<<
"[DTUnpackingModule]: WARNING: Digi not build!"<<endl;
virtual void interpretRawData(const unsigned int *index, int datasize, int dduID, edm::ESHandle< DTReadOutMapping > &mapping, std::auto_ptr< DTDigiCollection > &product, std::auto_ptr< DTLocalTriggerCollection > &product2, uint16_t rosList=0)