18 #include <ext/algorithm>
25 bool using_fed_key,
bool unpack_bad_channels,
bool mark_missing_feds,
const uint32_t errorThreshold ) :
26 headerBytes_( appended_bytes ),
27 fedBufferDumpFreq_( fed_buffer_dump_freq ),
28 fedEventDumpFreq_( fed_event_dump_freq ),
29 triggerFedId_( trigger_fed_id ),
30 useFedKey_( using_fed_key ),
31 unpackBadChannels_( unpack_bad_channels ),
32 markMissingFeds_( mark_missing_feds ),
36 useDaqRegister_(
false),
39 doFullCorruptBufferChecks_(
false),
40 doAPVEmulatorCheck_(
true),
41 errorThreshold_(errorThreshold)
45 <<
"[sistrip::RawToDigiUnpacker::"<<__func__<<
"]"
46 <<
" Constructing object...";
49 edm::LogWarning(
"SiStripRawToDigi") <<
"Warning: Unpacking of bad channels enabled. Only enable this if you know what you are doing. " << std::endl;
56 <<
"[sistrip::RawToDigiUnpacker::"<<__func__<<
"]"
57 <<
" Destructing object...";
78 if ( cabling.
fedIds().empty() ) {
80 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
81 <<
" No FEDs found in cabling map!";
83 std::vector<uint16_t> feds;
86 buffers.
FEDData( static_cast<int>(ifed) ).
size() ) {
91 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
94 <<
" FED buffers with non-zero size!";
99 bool first_fed =
true;
102 std::vector<uint16_t>::const_iterator ifed = cabling.
fedIds().begin();
103 for ( ; ifed != cabling.
fedIds().end(); ifed++ ) {
114 std::stringstream
ss;
115 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
117 << std::setw(4) << std::setfill(
' ') << *ifed
118 <<
" in FEDRawDataCollection"
119 <<
" with non-zero pointer 0x"
121 << std::setw(8) << std::setfill(
'0')
122 <<
reinterpret_cast<uint32_t*
>(
const_cast<uint8_t*
>(input.
data()))
125 << std::setw(5) << std::setfill(
' ') << input.
size()
127 LogTrace(
"SiStripRawToDigi") << ss.str();
134 std::stringstream
ss;
144 if ( !input.
data() ) {
147 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
148 <<
" NULL pointer to FEDRawData for FED id "
153 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
154 for ( ; iconn != conns.end(); iconn++ ) {
162 if ( !input.
size() ) {
165 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
166 <<
" FEDRawData has zero size for FED id "
171 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
172 for ( ; iconn != conns.end(); iconn++ ) {
180 std::auto_ptr<sistrip::FEDBuffer> buffer;
183 if (!buffer->doChecks()) {
185 throw cms::Exception(
"FEDBuffer") <<
"FED Buffer check fails for FED ID " << *ifed <<
".";
188 throw cms::Exception(
"FEDBuffer") <<
"FED corrupt buffer check fails for FED ID " << *ifed <<
".";
193 edm::LogWarning(
"sistrip::RawToDigiUnpacker") <<
"Exception caught when creating FEDBuffer object for FED " << *ifed <<
": " << e.
what();
196 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
197 for ( ; iconn != conns.end(); iconn++ ) {
210 std::stringstream
ss;
211 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
212 <<
" EventSummary is not set correctly!"
213 <<
" Missing information from both \"trigger FED\" and \"DAQ registers\"!";
219 if ( !summary.
valid() ) {
222 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
223 <<
" EventSummary is not valid: skipping...";
238 std::stringstream
ss;
245 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
246 for ( ; iconn != conns.end(); iconn++ ) {
249 uint16_t chan = iconn->fedCh();
252 if ( !iconn->isConnected() ) {
continue; }
289 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
290 <<
" Clusters are not ordered for FED "
291 << *ifed <<
" channel " << iconn->fedCh()
299 if (regItem.length > 0) {
315 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
316 <<
" Problem extracting common modes for FED id "
317 << *ifed <<
" and channel " << iconn->fedCh()
318 <<
": " << std::endl << e.
what();
338 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
339 <<
" Clusters are not ordered for FED "
340 << *ifed <<
" channel " << iconn->fedCh()
348 if (regItem.length > 0) {
370 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
371 <<
" Clusters are not ordered for FED "
372 << *ifed <<
" channel " << iconn->fedCh()
380 if (regItem.length > 0) {
390 std::vector<uint16_t> samples;
396 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
398 if ( !samples.empty() ) {
402 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
405 (
i/128) ? readout=readout*2+1 : readout=readout*2;
414 std::vector<uint16_t> samples;
420 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
422 if ( !samples.empty() ) {
424 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
433 std::vector<uint16_t> samples;
439 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
441 if ( !samples.empty() ) {
443 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
453 std::stringstream
ss;
454 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
455 <<
" Unknown FED readout mode (" << mode
456 <<
")! Assuming SCOPE MODE...";
460 std::vector<uint16_t> samples;
466 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
468 if ( !samples.empty() ) {
470 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
476 std::stringstream
ss;
477 ss <<
"Extracted " << samples.size()
478 <<
" SCOPE MODE digis (samples[0] = "
480 <<
") from FED id/ch "
484 LogTrace(
"SiStripRawToDigi") << ss.str();
489 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
490 <<
" No SM digis found!";
497 unsigned int detIdsSize = detids.
size();
499 std::ostringstream
ss;
500 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
501 <<
" Problems were found in data and " << detIdsSize <<
" channels could not be unpacked. "
502 <<
"See output of FED Hardware monitoring for more information. ";
506 edm::LogError(
"TooManyErrors") <<
"Total number of errors = " << detIdsSize;
510 update(scope_mode, virgin_raw, proc_raw, zero_suppr, cm_values);
526 std::vector< edm::DetSet<SiStripDigi> > sorted_and_merged;
529 bool errorInData =
false;
533 std::vector<SiStripDigi> & digis = sorted_and_merged.back().data;
535 size_t len = it->length;
536 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) { len += it2->length; }
540 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
547 if (!__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() )) {
550 <<
"Container must be already sorted!\nat "
557 std::vector< edm::DetSet<SiStripDigi> >::iterator iii = sorted_and_merged.begin();
558 std::vector< edm::DetSet<SiStripDigi> >::iterator jjj = sorted_and_merged.end();
559 for ( ; iii != jjj; ++iii ) {
560 if ( ! __gnu_cxx::is_sorted( iii->begin(), iii->end() ) ) {
568 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted ZS raw data, and have been skipped in unpacking\n";
572 zero_suppr.
swap( zero_suppr_dsv );
580 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
583 bool errorInData =
false;
587 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
591 int maxFirstStrip = it->first;
592 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
594 if (it2->first <= maxFirstStrip) { isDetOk =
false;
continue; }
595 maxFirstStrip = it2->first;
597 if (!isDetOk) { errorInData =
true; it = it2;
continue; }
600 digis.resize(maxFirstStrip + 256);
602 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
604 if (it->length != 256) { isDetOk =
false;
continue; }
607 if (!isDetOk) { errorInData =
true; digis.clear(); it = it2;
continue; }
612 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted virgin raw data, and have been skipped in unpacking\n";
615 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
618 <<
"Container must be already sorted!\nat "
627 virgin_raw.
swap( virgin_raw_dsv );
634 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
637 bool errorInData =
false;
641 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
645 int maxFirstStrip = it->first;
646 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
648 if (it2->first <= maxFirstStrip) { isDetOk =
false;
continue; }
649 maxFirstStrip = it2->first;
652 if (!isDetOk) { errorInData =
true; it = it2;
continue; }
655 digis.resize(maxFirstStrip + 256);
657 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
659 if (it->length != 256) { isDetOk =
false;
continue; }
663 if (!isDetOk) { errorInData =
true; digis.clear(); it = it2;
continue; }
668 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted proc raw data, and have been skipped in unpacking\n";
671 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
674 <<
"Container must be already sorted!\nat "
683 proc_raw.
swap( proc_raw_dsv );
690 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
693 bool errorInData =
false;
694 std::vector<Registry>::iterator it,
end;
697 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
700 if ( (it +1 != end) && (it->detid == (it+1)->
detid) ) {
703 do { ++it; }
while ( ( it+1 != end) && (it->detid == (it+1)->
detid) );
708 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some fed keys contained corrupted scope mode data, and have been skipped in unpacking\n";
711 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
714 <<
"Container must be already sorted!\nat "
723 scope_mode.
swap( scope_mode_dsv );
734 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
737 bool errorInData =
false;
741 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
745 int maxFirstStrip = it->first;
746 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
748 if (it2->first <= maxFirstStrip) { isDetOk =
false;
continue; }
749 maxFirstStrip = it2->first;
751 if (!isDetOk) { errorInData =
true; it = it2;
continue; }
754 digis.resize(maxFirstStrip + 2);
756 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
758 if (it->length != 2) { isDetOk =
false;
continue; }
761 if (!isDetOk) { errorInData =
true; digis.clear(); it = it2;
continue; }
766 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted common mode data, and have been skipped in unpacking\n";
769 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
772 <<
"Container must be already sorted!\nat "
781 common_mode.
swap( common_mode_dsv );
802 uint32_t* data_u32 = 0;
803 uint32_t size_u32 = 0;
812 if ( trigger_fed.
data() && trigger_fed.
size() ) {
813 uint8_t*
temp =
const_cast<uint8_t*
>( trigger_fed.
data() );
814 data_u32 =
reinterpret_cast<uint32_t*
>(
temp ) +
sizeof(
fedh_t)/
sizeof(uint32_t) + 1;
815 size_u32 = trigger_fed.
size()/
sizeof(uint32_t) -
sizeof(
fedh_t)/
sizeof(uint32_t) - 1;
817 if ( fed_trailer->
conscheck == 0xDEADFACE ) {
820 std::stringstream
ss;
821 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
822 <<
" Search mode for 'trigger FED' activated!"
824 LogTrace(
"SiStripRawToDigi") << ss.str();
833 std::stringstream
ss;
834 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
835 <<
" Search mode for 'trigger FED' activated!"
836 <<
" 'Trigger FED' info not found!";
846 if ( trigger_fed.
data() && trigger_fed.
size() ) {
847 uint8_t*
temp =
const_cast<uint8_t*
>( trigger_fed.
data() );
848 data_u32 =
reinterpret_cast<uint32_t*
>(
temp ) +
sizeof(
fedh_t)/
sizeof(uint32_t) + 1;
849 size_u32 = trigger_fed.
size()/
sizeof(uint32_t) -
sizeof(
fedh_t)/
sizeof(uint32_t) - 1;
851 if ( fed_trailer->
conscheck != 0xDEADFACE ) {
854 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
855 <<
" Unexpected stamp found in DAQ trailer (ie, not 0xDEADFACE)!"
856 <<
" Buffer appears not to contain 'trigger FED' data!";
874 std::stringstream
ss;
875 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
876 <<
" NULL pointer to 'trigger FED' data";
883 std::stringstream
ss;
884 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
885 <<
" Unexpected 'Trigger FED' data size [32-bit words]: " << size_u32;
898 uint32_t* head = &data_u32[hsize];
907 std::stringstream
ss;
908 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
909 <<
" EventSummary built from \"trigger FED\":"
911 LogTrace(
"SiStripRawToDigi") << ss.str();
920 if ( input.
size() < 24 ) {
924 std::stringstream
ss;
925 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"] "
926 <<
"Input FEDRawData with FED id " << fed_id
927 <<
" has size " << input.
size();
936 while ( ichar < input.
size()-16 && !
found ) {
938 uint32_t* input_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( input.
data() ) + offset );
939 uint32_t* fed_trailer =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( input.
data() ) + input.
size() - 8 );
943 bool old_vme_header = ( input_u32[0] & 0xF0000000 ) == 0x50000000 && ( fed_trailer[0] & 0xF0000000 ) == 0xA0000000 && ( (fed_trailer[0] & 0x00FFFFFF)*0x8 ) == (input.
size() -
offset);
945 bool old_slink_header = ( input_u32[1] & 0xF0000000 ) == 0x50000000 && ( fed_trailer[1] & 0xF0000000 ) == 0xA0000000 && ( (fed_trailer[1] & 0x00FFFFFF)*0x8 ) == (input.
size() -
offset);
947 bool old_slink_payload = ( input_u32[3] & 0xFF000000 ) == 0xED000000;
949 bool new_buffer_format = ( input_u32[2] & 0xFF000000 ) == 0xC5000000;
951 if ( old_vme_header ) {
956 memcpy( output.
data(),
961 std::stringstream
ss;
962 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
963 <<
" Buffer for FED id " << fed_id
964 <<
" has been found at byte position " << offset
965 <<
" with a size of " << input.
size()-offset <<
" bytes."
966 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
967 LogTrace(
"SiStripRawToDigi") << ss.str();
971 }
else if ( old_slink_header ) {
973 if ( old_slink_payload ) {
978 uint32_t* output_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( output.
data() ) );
980 while ( iter < output.
size() /
sizeof(uint32_t) ) {
981 output_u32[
iter] = input_u32[iter+1];
982 output_u32[iter+1] = input_u32[
iter];
987 std::stringstream
ss;
988 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
989 <<
" Buffer (with MSB and LSB 32-bit words swapped) for FED id " << fed_id
990 <<
" has been found at byte position " << offset
991 <<
" with a size of " << output.
size() <<
" bytes."
992 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
993 LogTrace(
"SiStripRawToDigi") << ss.str();
997 }
else if ( new_buffer_format ) {
1002 memcpy( output.
data(),
1007 std::stringstream
ss;
1008 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1009 <<
" Buffer for FED id " << fed_id
1010 <<
" has been found at byte position " << offset
1011 <<
" with a size of " << input.
size()-offset <<
" bytes."
1012 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
1013 LogTrace(
"SiStripRawToDigi") << ss.str();
1017 }
else {
headerBytes_ < 0 ? found =
false : found =
true; }
1018 }
else {
headerBytes_ < 0 ? found =
false : found =
true; }
1023 if ( output.
size() == 0 ) {
1027 memcpy( output.
data(), input.
data(), 0 );
1029 std::stringstream
ss;
1031 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1032 <<
" DAQ header not found within buffer for FED id: " << fed_id;
1034 uint32_t* input_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( input.
data() ) );
1035 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1036 <<
" DAQ header not found at expected location for FED id: " << fed_id << std::endl
1037 <<
" First 64-bit word of buffer is 0x"
1039 << std::setfill(
'0') << std::setw(8) << input_u32[0]
1040 << std::setfill(
'0') << std::setw(8) << input_u32[1]
1042 <<
" Adjust 'AppendedBytes' configurable to '-1' to activate 'search mode'";
1047 }
else if ( output.
size() < 24 ) {
1050 std::stringstream
ss;
1051 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1052 <<
" Unexpected buffer size! FEDRawData with FED id " << fed_id
1053 <<
" has size " << output.
size();
1070 daq1 =
static_cast<uint32_t
>( header->
daqRegister() );
1071 daq2 =
static_cast<uint32_t
>( header->
daqRegister2() );
1084 std::stringstream
ss;
1085 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1086 <<
" EventSummary built from FED DAQ registers:"
1088 LogTrace(
"SiStripRawToDigi") << ss.str();
1097 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1098 <<
" Dump of buffer for FED id " << fed_id << std::endl
1099 <<
" Buffer contains " << buffer.
size()
1100 <<
" bytes (NB: payload is byte-swapped)" << std::endl;
1101 uint32_t* buffer_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( buffer.
data() ) );
1102 unsigned int empty = 0;
1106 ss <<
"Byte-> 4 5 6 7 0 1 2 3\n";
1107 for ( uint32_t
i = 0;
i < buffer.
size()/8;
i++ ) {
1110 if ( !temp0 && !temp1 ) { empty++; }
1113 ss <<
" [ empty words ]" << std::endl;
1117 << std::setfill(
' ') << std::setw(6) <<
i*8 <<
": "
1119 << std::setfill(
'0') << std::setw(8) << temp0
1120 << std::setfill(
'0') << std::setw(8) << temp1
1128 ss <<
" Byte | <---- Byte order ----< | Byte" << std::endl;
1129 ss <<
" cntr | 7 6 5 4 3 2 1 0 | cntr" << std::endl;
1130 for ( uint32_t
i = 0;
i < buffer.
size()/8;
i++ ) {
1132 uint16_t tmp0 = buffer.
data()[
i*8+0] & 0xFF;
1133 uint16_t tmp1 = buffer.
data()[
i*8+1] & 0xFF;
1134 uint16_t tmp2 = buffer.
data()[
i*8+2] & 0xFF;
1135 uint16_t tmp3 = buffer.
data()[
i*8+3] & 0xFF;
1136 uint16_t tmp4 = buffer.
data()[
i*8+4] & 0xFF;
1137 uint16_t tmp5 = buffer.
data()[
i*8+5] & 0xFF;
1138 uint16_t tmp6 = buffer.
data()[
i*8+6] & 0xFF;
1139 uint16_t tmp7 = buffer.
data()[
i*8+7] & 0xFF;
1150 << std::setfill(
' ') << std::setw(6) <<
i*8+7 <<
" : "
1152 << std::setfill(
'0') << std::setw(2) << tmp7 <<
" "
1153 << std::setfill(
'0') << std::setw(2) << tmp6 <<
" "
1154 << std::setfill(
'0') << std::setw(2) << tmp5 <<
" "
1155 << std::setfill(
'0') << std::setw(2) << tmp4 <<
" "
1156 << std::setfill(
'0') << std::setw(2) << tmp3 <<
" "
1157 << std::setfill(
'0') << std::setw(2) << tmp2 <<
" "
1158 << std::setfill(
'0') << std::setw(2) << tmp1 <<
" "
1159 << std::setfill(
'0') << std::setw(2) << tmp0
1161 <<
" :" << std::setfill(
' ') << std::setw(6) <<
i*8
1167 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1168 <<
" End of FED buffer";
1173 method_name =
"sistrip::RawToDigiUnpacker::" + method_name;
1182 std::stringstream
ss;
1183 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1184 <<
" Caught std::exception!" << std::endl;
1185 if ( extra_info !=
"" ) {
1186 ss <<
" Information: " << extra_info << std::endl;
1188 ss <<
" Caught std::exception in ["
1189 << method_name <<
"] with message:" << std::endl
1197 std::stringstream
ss;
1198 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1199 <<
" Caught unknown exception!" << std::endl;
1200 if ( extra_info !=
"" ) {
1201 ss <<
" Information: " << extra_info << std::endl;
1203 ss <<
"Caught unknown exception in ["
1204 << method_name <<
"]" << std::endl;
void triggerFed(const FEDRawDataCollection &, SiStripEventSummary &, const uint32_t &event)
trigger info
static FEDRawChannelUnpacker procRawModeUnpacker(const FEDChannel &channel)
virtual char const * what() const
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
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.
RawToDigiUnpacker()
private default constructor
static FEDRawChannelUnpacker scopeModeUnpacker(const FEDChannel &channel)
static FEDRawChannelUnpacker virginRawModeUnpacker(const FEDChannel &channel)
static const char mlRawToDigi_[]
void push_back(T const &t)
int16_t fedEventDumpFreq_
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
const sistrip::RunType & runType() const
std::vector< SiStripRawDigi > virgin_work_digis_
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
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...
unsigned int offset(bool)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
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 reserve(size_type n)
std::vector< SiStripRawDigi > cm_work_digis_
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
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_
volatile std::atomic< bool > shutdown_flag false
A Digi for the silicon strip detector, containing only adc information, and suitable for storing raw ...
std::vector< Registry > virgin_work_registry_
int16_t headerBytes_
configurables