25 std::auto_ptr<DTDigiCollection>& product,
26 std::auto_ptr<DTLocalTriggerCollection>& product2,
31 const int wordLength = 4;
32 int numberOfWords = datasize / wordLength;
38 map<int,int> hitOrder;
41 for (
int i = 1;
i < numberOfWords;
i++ ) {
44 uint32_t word = index[
i];
47 int type = ( word >> 28 ) & 0xF;
52 rosID = ( word >> 3 ) & 0xFF;
56 else if ( type <= 3 ) {
57 eventID = ( word >> 12 ) & 0xFFF;
58 bunchID = word & 0xFFF;
62 else if ( type >= 4 && type <= 5 ) {
64 int tdcID = ( word >> 24 ) & 0xF;
65 int tdcChannel = ( word >> 19 ) & 0x1F;
67 int channelIndex = robID << 7 | tdcID << 5 | tdcChannel;
68 hitOrder[channelIndex]++;
70 int tdcMeasurement = word & 0x7FFFF;
77 dduID =
pset.getUntrackedParameter<
int>(
"dduID",730);
81 if ( ! mapping->readOutToGeometry(dduID, rosID, robID, tdcID, tdcChannel,detId)) {
82 if (
pset.getUntrackedParameter<
bool>(
"debugMode",
false))
cout<<
"[DTROS8Unpacker] "<<detId<<endl;
83 int wire = detId.wire();
86 DTDigi digi(wire, tdcMeasurement, hitOrder[channelIndex]-1);
89 product->insertDigi(detId.layerId(),digi);
91 else if (
pset.getUntrackedParameter<
bool>(
"debugMode",
false))
92 cout<<
"[DTROS8Unpacker] Missing wire!"<<endl;
96 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)