36 string connectionParameters =
pset.getUntrackedParameter<
string>(
"connectionParameters");
40 cout <<
"DT Local DAQ online spy. Connected to IP " << connectionParameters.c_str()
41 <<
". Waiting for the data to be flushed" << endl;
44 debug =
pset.getUntrackedParameter<
bool>(
"debug",
false);
45 dduID =
pset.getUntrackedParameter<int32_t>(
"dduID", 770);
47 produces<FEDRawDataCollection>();
63 const uint32_t* rawDTData32 = reinterpret_cast<const uint32_t*>(rawDTData);
68 vector<uint64_t> eventData;
71 int wordCountCheck = 0;
73 bool headerTag =
false;
87 if (wordCountCheck > 0 && !headerTag &&
debug)
88 cout <<
"[DTSpyReader]: WARNING: header still not found!!" << endl;
98 eventData.push_back(
word);
122 copy(reinterpret_cast<unsigned char*>(&eventData[0]),
123 reinterpret_cast<unsigned char*>(&eventData[0]) + eventDataSize,
135 std::unique_ptr<FEDRawDataCollection> bare_product(fedcoll);
142 uint32_t msBits_tmp = newWorld->
msBits;
144 newWorld->
lsBits = msBits_tmp;
148 uint32_t unpackedData[2] = {0, 0};
150 unpackedData[0] |= dmaData[3] & 0x3ffff;
151 unpackedData[0] |= (dmaData[2] << 18) & 0xfffc0000;
152 unpackedData[1] |= (dmaData[2] >> 14) & 0x0f;
153 unpackedData[1] |= (dmaData[1] << 4) & 0x3ffff0;
154 unpackedData[1] |= (dmaData[0] << 22) & 0xffc00000;
156 isData = (dmaData[0] >> 10) & 0x01;
169 FEDHeader candidate(reinterpret_cast<const unsigned char*>(&
word));
170 if (candidate.
check()) {
181 FEDTrailer candidate(reinterpret_cast<const unsigned char*>(&
word));
182 if (candidate.
check()) {