37 std::unique_ptr<DTDigiCollection>& detectorProduct,
38 std::unique_ptr<DTLocalTriggerCollection>& triggerProduct,
42 const int wordSize_32 = 4;
43 const int wordSize_64 = 8;
45 int numberOf32Words = datasize/wordSize_32;
47 const unsigned char* index8 =
reinterpret_cast<const unsigned char*
>(index32);
56 if (dduHeader.
check()) {
57 if(
debug)
cout <<
"[DTDDUUnpacker] FED Header. BXID: "<<dduHeader.
bxID()
58 <<
" L1ID: "<<dduHeader.
lvl1ID() <<endl;
60 LogWarning(
"DTRawToDigi|DTDDUUnpacker") <<
"[DTDDUUnpacker] WARNING!, this is not a DDU Header, FED ID: " 66 FEDTrailer dduTrailer(index8 + datasize - 1*wordSize_64);
68 if (dduTrailer.
check()) {
69 if(
debug)
cout <<
"[DTDDUUnpacker] FED Trailer. Lenght of the DT event: " 70 << dduTrailer.
lenght() << endl;
72 LogWarning(
"DTRawToDigi|DTDDUUnpacker") <<
"[DTDDUUnpacker] WARNING!, this is not a DDU Trailer, FED ID: " 85 vector<DTDDUFirstStatusWord> rosStatusWords;
90 for (
int rosId = 0; rosId < 4; rosId++ ) {
91 int wordIndex8 = numberOf32Words*wordSize_32 - 3*wordSize_64 + wordSize_32 + rosId;
95 for (
int rosId = 0; rosId < 4; rosId++ ) {
96 int wordIndex8 = numberOf32Words*wordSize_32 - 3*wordSize_64 + rosId;
100 for (
int rosId = 0; rosId < 4; rosId++ ) {
101 int wordIndex8 = numberOf32Words*wordSize_32 - 2*wordSize_64 + wordSize_32 + rosId;
106 for (
int rosId = 0; rosId < 12; rosId++ ) {
107 int wordIndex8 = numberOf32Words*wordSize_32 - 3*wordSize_64 + rosId;
118 theROSList = dduStatusWord.
rosList();
123 theROSList = dduStatusWord.
rosList();
133 index32 += (wordSize_64)/wordSize_32;
137 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)
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)
int lenght()
The length of the event fragment counted in 64-bit words including header and trailer.
~DTDDUUnpacker() override
Destructor.
DTDDUUnpacker(const edm::ParameterSet &ps)
Constructor.