32 const string&
filename =
pset.getUntrackedParameter<
string>(
"fileName");
40 throw cms::Exception(
"InputFileMissing") <<
"[DTDDUFileReader]: the input file: " <<
filename <<
" is not present";
42 cout <<
"DTDDUFileReader: DaqSource file '" <<
filename <<
"' was succesfully opened" << endl;
45 uint32_t runNumber_tmp = 1;
53 cout <<
" Dear user, please be patient, " <<
skipEvents <<
" are being skipped .." << endl;
57 produces<FEDRawDataCollection>();
68 vector<uint64_t> eventData;
69 size_t estimatedEventDimension = 102400;
70 eventData.reserve(estimatedEventDimension);
73 bool haederTag =
false;
75 bool headerAlreadyFound =
false;
88 cout <<
"[DTDDUFileReader]: ERROR! no more words and failed to get the trailer" << endl;
99 cout <<
"[DTDDUFileReader]: ERROR! failed to get the trailer" << endl;
107 if (!headerAlreadyFound)
109 headerAlreadyFound =
true;
123 eventData.push_back(
word);
144 if (dduID < 770 || dduID > 775) {
145 cout <<
"[DTDDUFileReader]: ERROR. DDU ID out of range. DDU id=" <<
dduID << endl;
152 copy(reinterpret_cast<unsigned char*>(&eventData[0]),
153 reinterpret_cast<unsigned char*>(&eventData[0]) + eventDataSize,
164 std::unique_ptr<FEDRawDataCollection> bare_product(fedcoll);
171 uint32_t msBits_tmp = newWorld->
msBits;
173 newWorld->
lsBits = msBits_tmp;
186 uint32_t
data[2] = {0, 0};
188 data[0] |= td[3] & 0x3ffff;
189 data[0] |= (td[2] << 18) & 0xfffc0000;
190 data[1] |= (td[2] >> 14) & 0x0f;
191 data[1] |= (td[1] << 4) & 0x3ffff0;
192 data[1] |= (td[0] << 22) & 0xffc00000;
194 isData = (td[0] >> 10) & 0x01;
204 FEDHeader candidate(reinterpret_cast<const unsigned char*>(&
word));
205 if (candidate.
check()) {
217 FEDTrailer candidate(reinterpret_cast<const unsigned char*>(&
word));
218 if (candidate.
check()) {