36 std::unique_ptr<DTDigiCollection>& detectorProduct,
37 std::unique_ptr<DTLocalTriggerCollection>& triggerProduct,
41 const int wordSize_32 = 4;
42 const int wordSize_64 = 8;
44 int numberOf32Words = datasize/wordSize_32;
46 const unsigned char* index8 =
reinterpret_cast<const unsigned char*
>(index32);
55 if (dduHeader.
check()) {
56 if(
debug)
cout <<
"[DTDDUUnpacker] FED Header. BXID: "<<dduHeader.
bxID()
57 <<
" L1ID: "<<dduHeader.
lvl1ID() <<endl;
59 LogWarning(
"DTRawToDigi|DTDDUUnpacker") <<
"[DTDDUUnpacker] WARNING!, this is not a DDU Header, FED ID: " 65 FEDTrailer dduTrailer(index8 + datasize - 1*wordSize_64);
67 if (dduTrailer.
check()) {
68 if(
debug)
cout <<
"[DTDDUUnpacker] FED Trailer. Length of the DT event: " 71 LogWarning(
"DTRawToDigi|DTDDUUnpacker") <<
"[DTDDUUnpacker] WARNING!, this is not a DDU Trailer, FED ID: " 84 vector<DTDDUFirstStatusWord> rosStatusWords;
89 for (
int rosId = 0; rosId < 4; rosId++ ) {
90 int wordIndex8 = numberOf32Words*wordSize_32 - 3*wordSize_64 + wordSize_32 + rosId;
94 for (
int rosId = 0; rosId < 4; rosId++ ) {
95 int wordIndex8 = numberOf32Words*wordSize_32 - 3*wordSize_64 + rosId;
99 for (
int rosId = 0; rosId < 4; rosId++ ) {
100 int wordIndex8 = numberOf32Words*wordSize_32 - 2*wordSize_64 + wordSize_32 + rosId;
105 for (
int rosId = 0; rosId < 12; rosId++ ) {
106 int wordIndex8 = numberOf32Words*wordSize_32 - 3*wordSize_64 + rosId;
117 theROSList = dduStatusWord.
rosList();
122 theROSList = dduStatusWord.
rosList();
132 index32 += (wordSize_64)/wordSize_32;
136 datasize -= 4*wordSize_64;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
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
void addDDUStatusWord(const DTDDUSecondStatusWord &word)
void addROSStatusWord(const DTDDUFirstStatusWord &word)
bool check() const
Check that the trailer is OK.
uint32_t fragmentLength() const
The length of the event fragment counted in 64-bit words including header and trailer.
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
DTROS25Unpacker * ros25Unpacker
void addDDUHeader(const FEDHeader &word)
Setters.
void addDDUTrailer(const FEDTrailer &word)
bool localDAQ
if data are read locally, status words are swapped
const edm::ParameterSet dduPSet
void checkCRCBit(const unsigned char *trailer)
~DTDDUUnpacker() override
Destructor.
DTDDUUnpacker(const edm::ParameterSet &ps)
Constructor.