18 #include <boost/format.hpp> 19 #include <ext/algorithm> 25 int16_t fed_buffer_dump_freq,
26 int16_t fed_event_dump_freq,
27 int16_t trigger_fed_id,
29 bool unpack_bad_channels,
30 bool mark_missing_feds,
31 const uint32_t errorThreshold)
32 : headerBytes_(appended_bytes),
33 fedBufferDumpFreq_(fed_buffer_dump_freq),
34 fedEventDumpFreq_(fed_event_dump_freq),
35 triggerFedId_(trigger_fed_id),
36 useFedKey_(using_fed_key),
37 unpackBadChannels_(unpack_bad_channels),
38 markMissingFeds_(mark_missing_feds),
42 useDaqRegister_(
false),
45 doFullCorruptBufferChecks_(
false),
46 doAPVEmulatorCheck_(
true),
47 errorThreshold_(errorThreshold),
50 LogTrace(
"SiStripRawToDigi") <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 51 <<
" Constructing object...";
55 <<
"Warning: Unpacking of bad channels enabled. Only enable this if you know what you are doing. " 62 LogTrace(
"SiStripRawToDigi") <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 63 <<
" Destructing object...";
89 if (cabling.
fedIds().empty()) {
93 std::vector<uint16_t>
feds;
99 LogTrace(
"SiStripRawToDigi") <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 100 <<
" Found " << feds.size() <<
" FED buffers with non-zero size!";
105 bool first_fed =
true;
108 std::vector<uint16_t>::const_iterator ifed = cabling.
fedIds().begin();
109 for (; ifed != cabling.
fedIds().end(); ifed++) {
121 std::stringstream
ss;
122 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 123 <<
" Found FED id " << std::setw(4) << std::setfill(
' ') << *ifed <<
" in FEDRawDataCollection" 124 <<
" with non-zero pointer 0x" << std::hex << std::setw(8) << std::setfill(
'0')
125 <<
reinterpret_cast<uint32_t*
>(
const_cast<uint8_t*
>(input.
data())) <<
std::dec <<
" and size " 126 << std::setw(5) << std::setfill(
' ') << input.
size() <<
" chars";
127 LogTrace(
"SiStripRawToDigi") << ss.str();
134 std::stringstream
ss;
148 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
149 for (; iconn != conns.end(); iconn++) {
162 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
163 for (; iconn != conns.end(); iconn++) {
172 std::unique_ptr<sistrip::FEDBuffer>
buffer;
175 buffer->setLegacyMode(
legacy_);
176 if (!buffer->doChecks(
true)) {
178 throw cms::Exception(
"FEDBuffer") <<
"FED Buffer check fails for FED ID " << *ifed <<
".";
181 throw cms::Exception(
"FEDBuffer") <<
"FED corrupt buffer check fails for FED ID " << *ifed <<
".";
184 warnings_.
add(
"Exception caught when creating FEDBuffer object for FED",
187 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
188 for (; iconn != conns.end(); iconn++) {
205 "EventSummary is not set correctly! Missing information from both \"trigger FED\" and \"DAQ registers\"!");
209 if (!summary.
valid()) {
211 LogTrace(
"SiStripRawToDigi") <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 212 <<
" EventSummary is not valid: skipping...";
231 std::stringstream
ss;
238 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
239 for (; iconn != conns.end(); iconn++) {
241 uint16_t
chan = iconn->fedCh();
244 if (!iconn->isConnected()) {
277 : iconn->apvPairNumber();
288 const uint8_t packet_code = buffer->packetCode(
legacy_, iconn->fedCh());
289 switch (packet_code) {
328 uint16_t(buffer->packetCode(
legacy_, iconn->fedCh())))
331 if (packet_code == 0) {
350 if (regItem.length > 0) {
392 if (regItem.length > 0) {
409 size_t bits_shift = 0;
436 if (regItem.length > 0) {
465 if (regItem.length > 0) {
480 uint8_t packet_code = buffer->packetCode(
legacy_);
485 samples.push_back(unpacker.
adc());
493 samples.push_back(unpacker.
adc());
501 samples.push_back((unpacker.
adc() << 2));
508 samples.push_back((unpacker.
adc() << 1));
513 if (!samples.empty()) {
517 for (uint16_t
i = 0,
n = samples.size();
i <
n;
i++) {
520 (
i / 128) ? readout = readout* 2 + 1 : readout = readout * 2;
538 samples.push_back(unpacker.
adc());
542 if (!samples.empty()) {
544 for (uint16_t
i = 0,
n = samples.size();
i <
n;
i++) {
561 samples.push_back(unpacker.
adc());
565 if (!samples.empty()) {
567 for (uint16_t
i = 0,
n = samples.size();
i <
n;
i++) {
586 samples.push_back(unpacker.
adc());
590 if (!samples.empty()) {
592 for (uint16_t
i = 0,
n = samples.size();
i <
n;
i++) {
598 std::stringstream
ss;
599 ss <<
"Extracted " << samples.size() <<
" SCOPE MODE digis (samples[0] = " << samples[0]
600 <<
") from FED id/ch " << iconn->fedId() <<
"/" << iconn->fedCh();
601 LogTrace(
"SiStripRawToDigi") << ss.str();
611 unsigned int detIdsSize = detids.
size();
613 std::ostringstream
ss;
614 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 615 <<
" Problems were found in data and " << detIdsSize <<
" channels could not be unpacked. " 616 <<
"See output of FED Hardware monitoring for more information. ";
620 edm::LogError(
"TooManyErrors") <<
"Total number of errors = " << detIdsSize;
624 update(scope_mode, virgin_raw, proc_raw, zero_suppr, cm_values);
642 std::vector<edm::DetSet<SiStripDigi> > sorted_and_merged;
645 bool errorInData =
false;
649 std::vector<SiStripDigi>& digis = sorted_and_merged.back().data;
651 size_t len = it->length;
652 for (it2 = it + 1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
658 for (it2 = it + 0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
665 if (!__gnu_cxx::is_sorted(sorted_and_merged.begin(), sorted_and_merged.end())) {
668 <<
"Container must be already sorted!\nat " << __FILE__ <<
", line " << __LINE__ <<
"\n";
671 std::vector<edm::DetSet<SiStripDigi> >::iterator iii = sorted_and_merged.begin();
672 std::vector<edm::DetSet<SiStripDigi> >::iterator jjj = sorted_and_merged.end();
673 for (; iii != jjj; ++iii) {
674 if (!__gnu_cxx::is_sorted(iii->begin(), iii->end())) {
684 <<
"Some modules contained corrupted ZS raw data, and have been skipped in unpacking\n";
688 zero_suppr.
swap(zero_suppr_dsv);
695 std::vector<edm::DetSet<SiStripRawDigi> > sorted_and_merged;
698 bool errorInData =
false;
702 std::vector<SiStripRawDigi>& digis = sorted_and_merged.back().data;
706 int maxFirstStrip = it->first;
707 for (it2 = it + 1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
709 if (it2->first <= maxFirstStrip) {
713 maxFirstStrip = it2->first;
722 digis.resize(maxFirstStrip + 256);
724 for (it2 = it + 0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
726 if (it->length != 256) {
744 <<
"Some modules contained corrupted virgin raw data, and have been skipped in unpacking\n";
747 if (!__gnu_cxx::is_sorted(sorted_and_merged.begin(), sorted_and_merged.end())) {
750 <<
"Container must be already sorted!\nat " << __FILE__ <<
", line " << __LINE__ <<
"\n";
755 virgin_raw.
swap(virgin_raw_dsv);
762 std::vector<edm::DetSet<SiStripRawDigi> > sorted_and_merged;
765 bool errorInData =
false;
769 std::vector<SiStripRawDigi>& digis = sorted_and_merged.back().data;
773 int maxFirstStrip = it->first;
774 for (it2 = it + 1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
776 if (it2->first <= maxFirstStrip) {
780 maxFirstStrip = it2->first;
790 digis.resize(maxFirstStrip + 256);
792 for (it2 = it + 0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
794 if (it->length != 256) {
813 <<
"Some modules contained corrupted proc raw data, and have been skipped in unpacking\n";
816 if (!__gnu_cxx::is_sorted(sorted_and_merged.begin(), sorted_and_merged.end())) {
819 <<
"Container must be already sorted!\nat " << __FILE__ <<
", line " << __LINE__ <<
"\n";
824 proc_raw.
swap(proc_raw_dsv);
831 std::vector<edm::DetSet<SiStripRawDigi> > sorted_and_merged;
834 bool errorInData =
false;
835 std::vector<Registry>::iterator it,
end;
838 std::vector<SiStripRawDigi>& digis = sorted_and_merged.back().data;
841 if ((it + 1 != end) && (it->detid == (it + 1)->detid)) {
846 }
while ((it + 1 != end) && (it->detid == (it + 1)->detid));
853 <<
"Some fed keys contained corrupted scope mode data, and have been skipped in unpacking\n";
856 if (!__gnu_cxx::is_sorted(sorted_and_merged.begin(), sorted_and_merged.end())) {
859 <<
"Container must be already sorted!\nat " << __FILE__ <<
", line " << __LINE__ <<
"\n";
864 scope_mode.
swap(scope_mode_dsv);
873 std::vector<edm::DetSet<SiStripRawDigi> > sorted_and_merged;
876 bool errorInData =
false;
880 std::vector<SiStripRawDigi>& digis = sorted_and_merged.back().data;
884 int maxFirstStrip = it->first;
885 for (it2 = it + 1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
887 if (it2->first <= maxFirstStrip) {
891 maxFirstStrip = it2->first;
900 digis.resize(maxFirstStrip + 2);
902 for (it2 = it + 0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
904 if (it->length != 2) {
922 <<
"Some modules contained corrupted common mode data, and have been skipped in unpacking\n";
925 if (!__gnu_cxx::is_sorted(sorted_and_merged.begin(), sorted_and_merged.end())) {
928 <<
"Container must be already sorted!\nat " << __FILE__ <<
", line " << __LINE__ <<
"\n";
933 common_mode.
swap(common_mode_dsv);
958 const uint32_t&
event) {
960 uint32_t* data_u32 =
nullptr;
961 uint32_t size_u32 = 0;
968 if (trigger_fed.
data() && trigger_fed.
size()) {
969 uint8_t*
temp =
const_cast<uint8_t*
>(trigger_fed.
data());
973 if (fedTrailer.conscheck() == 0xDEADFACE) {
976 std::stringstream
ss;
977 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 978 <<
" Search mode for 'trigger FED' activated!" 980 LogTrace(
"SiStripRawToDigi") << ss.str();
989 std::stringstream
ss;
990 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 991 <<
" Search mode for 'trigger FED' activated!" 992 <<
" 'Trigger FED' info not found!";
1001 if (trigger_fed.
data() && trigger_fed.
size()) {
1002 uint8_t*
temp =
const_cast<uint8_t*
>(trigger_fed.
data());
1006 if (fedTrailer.conscheck() != 0xDEADFACE) {
1009 <<
" Unexpected stamp found in DAQ trailer (ie, not 0xDEADFACE)!" 1010 <<
" Buffer appears not to contain 'trigger FED' data!";
1027 std::stringstream
ss;
1028 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1029 <<
" NULL pointer to 'trigger FED' data";
1036 std::stringstream
ss;
1037 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1038 <<
" Unexpected 'Trigger FED' data size [32-bit words]: " << size_u32;
1051 uint32_t* head = &data_u32[hsize];
1059 std::stringstream
ss;
1060 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1061 <<
" EventSummary built from \"trigger FED\":" << std::endl
1063 LogTrace(
"SiStripRawToDigi") << ss.str();
1071 if (input.
size() < 24) {
1075 std::stringstream
ss;
1076 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"] " 1077 <<
"Input FEDRawData with FED id " << fed_id <<
" has size " << input.
size();
1086 while (ichar < input.
size() - 16 && !
found) {
1089 uint32_t* input_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>(input.
data()) + offset);
1090 uint32_t* fed_trailer =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>(input.
data()) + input.
size() - 8);
1094 bool old_vme_header = (input_u32[0] & 0xF0000000) == 0x50000000 && (fed_trailer[0] & 0xF0000000) == 0xA0000000 &&
1095 ((fed_trailer[0] & 0x00FFFFFF) * 0x8) == (input.
size() -
offset);
1097 bool old_slink_header = (input_u32[1] & 0xF0000000) == 0x50000000 &&
1098 (fed_trailer[1] & 0xF0000000) == 0xA0000000 &&
1099 ((fed_trailer[1] & 0x00FFFFFF) * 0x8) == (input.
size() -
offset);
1101 bool old_slink_payload = (input_u32[3] & 0xFF000000) == 0xED000000;
1103 bool new_buffer_format = (input_u32[2] & 0xFF000000) == 0xC5000000;
1105 if (old_vme_header) {
1109 memcpy(output.
data(),
1114 std::stringstream
ss;
1115 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1116 <<
" Buffer for FED id " << fed_id <<
" has been found at byte position " << offset <<
" with a size of " 1117 << input.
size() - offset <<
" bytes." 1118 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
1119 LogTrace(
"SiStripRawToDigi") << ss.str();
1123 }
else if (old_slink_header) {
1124 if (old_slink_payload) {
1128 uint32_t* output_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>(output.
data()));
1130 while (iter < output.
size() /
sizeof(uint32_t)) {
1131 output_u32[iter] = input_u32[iter + 1];
1132 output_u32[iter + 1] = input_u32[iter];
1137 std::stringstream
ss;
1138 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1139 <<
" Buffer (with MSB and LSB 32-bit words swapped) for FED id " << fed_id
1140 <<
" has been found at byte position " << offset <<
" with a size of " << output.
size() <<
" bytes." 1141 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
1142 LogTrace(
"SiStripRawToDigi") << ss.str();
1146 }
else if (new_buffer_format) {
1150 memcpy(output.
data(),
1155 std::stringstream
ss;
1156 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1157 <<
" Buffer for FED id " << fed_id <<
" has been found at byte position " << offset
1158 <<
" with a size of " << input.
size() - offset <<
" bytes." 1159 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
1160 LogTrace(
"SiStripRawToDigi") << ss.str();
1174 if (output.
size() == 0) {
1177 memcpy(output.
data(), input.
data(), 0);
1179 std::stringstream
ss;
1181 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1182 <<
" DAQ header not found within buffer for FED id: " << fed_id;
1184 uint32_t* input_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>(input.
data()));
1185 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1186 <<
" DAQ header not found at expected location for FED id: " << fed_id << std::endl
1187 <<
" First 64-bit word of buffer is 0x" << std::hex << std::setfill(
'0') << std::setw(8) << input_u32[0]
1188 << std::setfill(
'0') << std::setw(8) << input_u32[1] <<
std::dec << std::endl
1189 <<
" Adjust 'AppendedBytes' configurable to '-1' to activate 'search mode'";
1194 }
else if (output.
size() < 24) {
1197 std::stringstream
ss;
1198 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1199 <<
" Unexpected buffer size! FEDRawData with FED id " << fed_id <<
" has size " << output.
size();
1218 daq1 =
static_cast<uint32_t
>(header->
daqRegister());
1230 std::stringstream
ss;
1231 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1232 <<
" EventSummary built from FED DAQ registers:" << std::endl
1234 LogTrace(
"SiStripRawToDigi") << ss.str();
1242 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1243 <<
" Dump of buffer for FED id " << fed_id << std::endl
1244 <<
" Buffer contains " << buffer.
size() <<
" bytes (NB: payload is byte-swapped)" << std::endl;
1247 uint32_t* buffer_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>(buffer.
data()));
1248 unsigned int empty = 0;
1250 ss <<
"Byte-> 4 5 6 7 0 1 2 3\n";
1251 for (uint32_t
i = 0;
i < buffer.
size() / 8;
i++) {
1254 if (!temp0 && !temp1) {
1258 ss <<
" [ empty words ]" << std::endl;
1261 ss <<
std::dec << std::setfill(
' ') << std::setw(6) <<
i * 8 <<
": " << std::hex << std::setfill(
'0')
1262 << std::setw(8) << temp0 << std::setfill(
'0') << std::setw(8) << temp1 <<
std::dec << std::endl;
1267 ss <<
" Byte | <---- Byte order ----< | Byte" << std::endl;
1268 ss <<
" cntr | 7 6 5 4 3 2 1 0 | cntr" << std::endl;
1269 for (uint32_t
i = 0;
i < buffer.
size() / 8;
i++) {
1271 uint16_t tmp0 = buffer.
data()[
i * 8 + 0] & 0xFF;
1272 uint16_t tmp1 = buffer.
data()[
i * 8 + 1] & 0xFF;
1273 uint16_t tmp2 = buffer.
data()[
i * 8 + 2] & 0xFF;
1274 uint16_t tmp3 = buffer.
data()[
i * 8 + 3] & 0xFF;
1275 uint16_t tmp4 = buffer.
data()[
i * 8 + 4] & 0xFF;
1276 uint16_t tmp5 = buffer.
data()[
i * 8 + 5] & 0xFF;
1277 uint16_t tmp6 = buffer.
data()[
i * 8 + 6] & 0xFF;
1278 uint16_t tmp7 = buffer.
data()[
i * 8 + 7] & 0xFF;
1288 ss <<
std::dec << std::setfill(
' ') << std::setw(6) <<
i * 8 + 7 <<
" : " << std::hex << std::setfill(
'0')
1289 << std::setw(2) << tmp7 <<
" " << std::setfill(
'0') << std::setw(2) << tmp6 <<
" " << std::setfill(
'0')
1290 << std::setw(2) << tmp5 <<
" " << std::setfill(
'0') << std::setw(2) << tmp4 <<
" " << std::setfill(
'0')
1291 << std::setw(2) << tmp3 <<
" " << std::setfill(
'0') << std::setw(2) << tmp2 <<
" " << std::setfill(
'0')
1292 << std::setw(2) << tmp1 <<
" " << std::setfill(
'0') << std::setw(2) << tmp0 <<
std::dec <<
" :" 1293 << std::setfill(
' ') << std::setw(6) <<
i * 8 << std::endl;
1297 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1298 <<
" End of FED buffer";
1302 method_name =
"sistrip::RawToDigiUnpacker::" + method_name;
1309 std::stringstream
ss;
1310 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1311 <<
" Caught std::exception!" << std::endl;
1312 if (!extra_info.empty()) {
1313 ss <<
" Information: " << extra_info << std::endl;
1315 ss <<
" Caught std::exception in [" << method_name <<
"] with message:" << std::endl << e.what();
1321 std::stringstream
ss;
1322 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1323 <<
" Caught unknown exception!" << std::endl;
1324 if (!extra_info.empty()) {
1325 ss <<
" Information: " << extra_info << std::endl;
1327 ss <<
"Caught unknown exception in [" << method_name <<
"]" << std::endl;
void triggerFed(const FEDRawDataCollection &, SiStripEventSummary &, const uint32_t &event)
trigger info
static FEDRawChannelUnpacker procRawModeUnpacker(const FEDChannel &channel)
static const uint8_t PACKET_CODE_ZERO_SUPPRESSED8_BOTBOT
void update(RawDigis &scope_mode, RawDigis &virgin_raw, RawDigis &proc_raw, Digis &zero_suppr, RawDigis &common_mode)
fill DetSetVectors using registries
std::vector< Registry > proc_work_registry_
void updateEventSummary(const sistrip::FEDBuffer &, SiStripEventSummary &)
sets the SiStripEventSummary -> not yet implemented for FEDBuffer class
static FEDZSChannelUnpacker zeroSuppressedModeUnpacker(const FEDChannel &channel)
std::vector< SiStripDigi > zs_work_digis_
digi collections
std::vector< Registry > scope_work_registry_
void cleanupWorkVectors()
method to clear registries and digi collections
static const uint32_t length
std::vector< Registry > zs_work_registry_
registries
static FEDZSChannelUnpacker preMixRawModeUnpacker(const FEDChannel &channel)
static const uint32_t invalid32_
void locateStartOfFedBuffer(const uint16_t &fed_id, const FEDRawData &input, FEDRawData &output)
Removes any data appended prior to FED buffer and reorders 32-bit words if swapped.
static FEDRawChannelUnpacker scopeModeUnpacker(const FEDChannel &channel)
static FEDRawChannelUnpacker virginRawModeUnpacker(const FEDChannel &channel)
static FEDBSChannelUnpacker zeroSuppressedModeUnpacker(const FEDChannel &channel, uint16_t num_bits)
static const char mlRawToDigi_[]
void push_back(T const &t)
char const * what() const override
static FEDBSChannelUnpacker zeroSuppressedLiteModeUnpacker(const FEDChannel &channel, uint16_t num_bits)
int16_t fedEventDumpFreq_
static FEDBSChannelUnpacker virginRawModeUnpacker(const FEDChannel &channel, uint16_t num_bits)
const FEDFEHeader * feHeader() const
void swap(DetSetVector &other)
size_t size() const
Lenght of the data buffer in bytes.
FEDDAQEventType daqEventType() const
private class to register start and end index of digis in a collection
static std::string const input
static const uint8_t PACKET_CODE_ZERO_SUPPRESSED8_TOPBOT
static const uint8_t PACKET_CODE_ZERO_SUPPRESSED10
const sistrip::RunType & runType() const
std::vector< SiStripRawDigi > virgin_work_digis_
static const uint8_t PACKET_CODE_VIRGIN_RAW10
uint8_t sampleNumber() const
const uint32_t & bx() const
void readoutOrder(uint16_t &physical_order, uint16_t &readout_order)
order of strips
~RawToDigiUnpacker()
default constructor
uint16_t adcPreMix() const
static const uint8_t PACKET_CODE_ZERO_SUPPRESSED
uint32_t event_
other values
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
static void dumpRawData(uint16_t fed_id, const FEDRawData &, std::stringstream &)
dumps raw data to stdout (NB: payload is byte-swapped,headers/trailer are not).
void resize(size_t newsize)
int16_t fedBufferDumpFreq_
void commissioningInfo(const uint32_t *const buffer, const uint32_t &event)
const uint32_t & event() const
FedsConstIterRange fedIds() const
uint8_t sampleNumber() const
FEDHeaderType headerType() const
std::vector< SiStripRawDigi > scope_work_digis_
bool doFullCorruptBufferChecks_
A Digi for the silicon strip detector, containing both strip and adc information, and suitable for st...
static const uint8_t PACKET_CODE_VIRGIN_RAW8_TOPBOT
std::vector< SiStripRawDigi > proc_work_digis_
void handleException(std::string method_name, std::string extra_info="")
catches all possible exceptions and rethrows them as cms::Exceptions
void add(const std::string &message, const std::string &details="")
void reserve(size_type n)
std::vector< SiStripRawDigi > cm_work_digis_
static const uint8_t PACKET_CODE_VIRGIN_RAW8_BOTBOT
static FEDZSChannelUnpacker zeroSuppressedLiteModeUnpacker(const FEDChannel &channel)
static const uint16_t FEDCH_PER_FEUNIT
uint16_t triggerFed() const
static const uint16_t invalid_
ConnsConstIterRange fedConnections(uint16_t fed_id) const
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
const sistrip::FedReadoutMode & fedReadoutMode() const
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
void createDigis(const SiStripFedCabling &, const FEDRawDataCollection &, SiStripEventSummary &, RawDigis &scope_mode, RawDigis &virgin_raw, RawDigis &proc_raw, Digis &zero_suppr, DetIdCollection &, RawDigis &common_mode)
creates digis
std::vector< Registry > cm_work_registry_
A Digi for the silicon strip detector, containing only adc information, and suitable for storing raw ...
static constexpr int lastFEDId()
FEDDAQHeader daqHeader() const
static const uint8_t PACKET_CODE_VIRGIN_RAW
std::vector< Registry > virgin_work_registry_
RawToDigiUnpacker()=delete
private default constructor
int16_t headerBytes_
configurables