18 #include <ext/algorithm>
23 bool using_fed_key,
bool unpack_bad_channels,
bool mark_missing_feds,
const uint32_t errorThreshold ) :
24 headerBytes_( appended_bytes ),
25 fedBufferDumpFreq_( fed_buffer_dump_freq ),
26 fedEventDumpFreq_( fed_event_dump_freq ),
27 triggerFedId_( trigger_fed_id ),
28 useFedKey_( using_fed_key ),
29 unpackBadChannels_( unpack_bad_channels ),
30 markMissingFeds_( mark_missing_feds ),
34 useDaqRegister_(
false),
37 doFullCorruptBufferChecks_(
false),
38 doAPVEmulatorCheck_(
true),
39 errorThreshold_(errorThreshold)
43 <<
"[sistrip::RawToDigiUnpacker::"<<__func__<<
"]"
44 <<
" Constructing object...";
47 edm::LogWarning(
"SiStripRawToDigi") <<
"Warning: Unpacking of bad channels enabled. Only enable this if you know what you are doing. " << std::endl;
54 <<
"[sistrip::RawToDigiUnpacker::"<<__func__<<
"]"
55 <<
" Destructing object...";
68 if ( cabling.
fedIds().empty() ) {
70 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
71 <<
" No FEDs found in cabling map!";
73 std::vector<uint16_t> feds;
76 buffers.
FEDData( static_cast<int>(ifed) ).
size() ) {
81 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
84 <<
" FED buffers with non-zero size!";
89 bool first_fed =
true;
92 std::vector<uint16_t>::const_iterator ifed = cabling.
fedIds().begin();
93 for ( ; ifed != cabling.
fedIds().end(); ifed++ ) {
104 std::stringstream
ss;
105 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
107 << std::setw(4) << std::setfill(
' ') << *ifed
108 <<
" in FEDRawDataCollection"
109 <<
" with non-zero pointer 0x"
111 << std::setw(8) << std::setfill(
'0')
112 <<
reinterpret_cast<uint32_t*
>(
const_cast<uint8_t*
>(input.
data()))
115 << std::setw(5) << std::setfill(
' ') << input.
size()
117 LogTrace(
"SiStripRawToDigi") << ss.str();
124 std::stringstream
ss;
134 if ( !input.
data() ) {
137 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
138 <<
" NULL pointer to FEDRawData for FED id "
143 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
144 for ( ; iconn != conns.end(); iconn++ ) {
152 if ( !input.
size() ) {
155 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
156 <<
" FEDRawData has zero size for FED id "
161 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
162 for ( ; iconn != conns.end(); iconn++ ) {
170 std::auto_ptr<sistrip::FEDBuffer> buffer;
173 if (!buffer->doChecks()) {
175 throw cms::Exception(
"FEDBuffer") <<
"FED Buffer check fails for FED ID " << *ifed <<
".";
178 throw cms::Exception(
"FEDBuffer") <<
"FED corrupt buffer check fails for FED ID " << *ifed <<
".";
183 edm::LogWarning(
"sistrip::RawToDigiUnpacker") <<
"Exception caught when creating FEDBuffer object for FED " << *ifed <<
": " << e.
what();
186 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
187 for ( ; iconn != conns.end(); iconn++ ) {
200 std::stringstream
ss;
201 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
202 <<
" EventSummary is not set correctly!"
203 <<
" Missing information from both \"trigger FED\" and \"DAQ registers\"!";
209 if ( !summary.
valid() ) {
212 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
213 <<
" EventSummary is not valid: skipping...";
228 std::stringstream
ss;
235 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
236 for ( ; iconn != conns.end(); iconn++ ) {
239 uint16_t chan = iconn->fedCh();
242 if ( !iconn->isConnected() ) {
continue; }
279 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
280 <<
" Clusters are not ordered for FED "
281 << *ifed <<
" channel " << iconn->fedCh()
289 if (regItem.length > 0) {
305 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
306 <<
" Problem extracting common modes for FED id "
307 << *ifed <<
" and channel " << iconn->fedCh()
308 <<
": " << std::endl << e.
what();
328 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
329 <<
" Clusters are not ordered for FED "
330 << *ifed <<
" channel " << iconn->fedCh()
338 if (regItem.length > 0) {
348 std::vector<uint16_t> samples;
354 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
356 if ( !samples.empty() ) {
360 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
363 (
i/128) ? readout=readout*2+1 : readout=readout*2;
372 std::vector<uint16_t> samples;
378 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
380 if ( !samples.empty() ) {
382 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
391 std::vector<uint16_t> samples;
397 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
399 if ( !samples.empty() ) {
401 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
411 std::stringstream
ss;
412 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
413 <<
" Unknown FED readout mode (" << mode
414 <<
")! Assuming SCOPE MODE...";
418 std::vector<uint16_t> samples;
424 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
426 if ( !samples.empty() ) {
428 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
434 std::stringstream
ss;
435 ss <<
"Extracted " << samples.size()
436 <<
" SCOPE MODE digis (samples[0] = "
438 <<
") from FED id/ch "
442 LogTrace(
"SiStripRawToDigi") << ss.str();
447 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
448 <<
" No SM digis found!";
455 unsigned int detIdsSize = detids.
size();
457 std::ostringstream
ss;
458 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
459 <<
" Problems were found in data and " << detIdsSize <<
" channels could not be unpacked. "
460 <<
"See output of FED Hardware monitoring for more information. ";
464 edm::LogError(
"TooManyErrors") <<
"Total number of errors = " << detIdsSize;
468 update(scope_mode, virgin_raw, proc_raw, zero_suppr, cm_values);
484 std::vector< edm::DetSet<SiStripDigi> > sorted_and_merged;
487 bool errorInData =
false;
491 std::vector<SiStripDigi> & digis = sorted_and_merged.back().data;
493 size_t len = it->length;
494 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) { len += it2->length; }
498 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
505 if (!__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() )) {
508 <<
"Container must be already sorted!\nat "
515 std::vector< edm::DetSet<SiStripDigi> >::iterator iii = sorted_and_merged.begin();
516 std::vector< edm::DetSet<SiStripDigi> >::iterator jjj = sorted_and_merged.end();
517 for ( ; iii != jjj; ++iii ) {
518 if ( ! __gnu_cxx::is_sorted( iii->begin(), iii->end() ) ) {
526 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted ZS raw data, and have been skipped in unpacking\n";
530 zero_suppr.
swap( zero_suppr_dsv );
538 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
541 bool errorInData =
false;
545 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
549 int maxFirstStrip = it->first;
550 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
552 if (it2->first <= maxFirstStrip) { isDetOk =
false;
continue; }
553 maxFirstStrip = it2->first;
555 if (!isDetOk) { errorInData =
true; it = it2;
continue; }
558 digis.resize(maxFirstStrip + 256);
560 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
562 if (it->length != 256) { isDetOk =
false;
continue; }
565 if (!isDetOk) { errorInData =
true; digis.clear(); it = it2;
continue; }
570 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted virgin raw data, and have been skipped in unpacking\n";
573 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
576 <<
"Container must be already sorted!\nat "
585 virgin_raw.
swap( virgin_raw_dsv );
592 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
595 bool errorInData =
false;
599 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
603 int maxFirstStrip = it->first;
604 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
606 if (it2->first <= maxFirstStrip) { isDetOk =
false;
continue; }
607 maxFirstStrip = it2->first;
610 if (!isDetOk) { errorInData =
true; it = it2;
continue; }
613 digis.resize(maxFirstStrip + 256);
615 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
617 if (it->length != 256) { isDetOk =
false;
continue; }
621 if (!isDetOk) { errorInData =
true; digis.clear(); it = it2;
continue; }
626 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted proc raw data, and have been skipped in unpacking\n";
629 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
632 <<
"Container must be already sorted!\nat "
641 proc_raw.
swap( proc_raw_dsv );
648 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
651 bool errorInData =
false;
652 std::vector<Registry>::iterator it,
end;
655 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
658 if ( (it +1 != end) && (it->detid == (it+1)->
detid) ) {
661 do { ++it; }
while ( ( it+1 != end) && (it->detid == (it+1)->
detid) );
666 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some fed keys contained corrupted scope mode data, and have been skipped in unpacking\n";
669 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
672 <<
"Container must be already sorted!\nat "
681 scope_mode.
swap( scope_mode_dsv );
692 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
695 bool errorInData =
false;
699 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
703 int maxFirstStrip = it->first;
704 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
706 if (it2->first <= maxFirstStrip) { isDetOk =
false;
continue; }
707 maxFirstStrip = it2->first;
709 if (!isDetOk) { errorInData =
true; it = it2;
continue; }
712 digis.resize(maxFirstStrip + 2);
714 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
716 if (it->length != 2) { isDetOk =
false;
continue; }
719 if (!isDetOk) { errorInData =
true; digis.clear(); it = it2;
continue; }
724 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted common mode data, and have been skipped in unpacking\n";
727 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
730 <<
"Container must be already sorted!\nat "
739 common_mode.
swap( common_mode_dsv );
758 uint32_t* data_u32 = 0;
759 uint32_t size_u32 = 0;
768 if ( trigger_fed.
data() && trigger_fed.
size() ) {
769 uint8_t*
temp =
const_cast<uint8_t*
>( trigger_fed.
data() );
770 data_u32 =
reinterpret_cast<uint32_t*
>(
temp ) +
sizeof(
fedh_t)/
sizeof(uint32_t) + 1;
771 size_u32 = trigger_fed.
size()/
sizeof(uint32_t) -
sizeof(
fedh_t)/
sizeof(uint32_t) - 1;
773 if ( fed_trailer->
conscheck == 0xDEADFACE ) {
776 std::stringstream
ss;
777 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
778 <<
" Search mode for 'trigger FED' activated!"
780 LogTrace(
"SiStripRawToDigi") << ss.str();
789 std::stringstream
ss;
790 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
791 <<
" Search mode for 'trigger FED' activated!"
792 <<
" 'Trigger FED' info not found!";
802 if ( trigger_fed.
data() && trigger_fed.
size() ) {
803 uint8_t*
temp =
const_cast<uint8_t*
>( trigger_fed.
data() );
804 data_u32 =
reinterpret_cast<uint32_t*
>(
temp ) +
sizeof(
fedh_t)/
sizeof(uint32_t) + 1;
805 size_u32 = trigger_fed.
size()/
sizeof(uint32_t) -
sizeof(
fedh_t)/
sizeof(uint32_t) - 1;
807 if ( fed_trailer->
conscheck != 0xDEADFACE ) {
810 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
811 <<
" Unexpected stamp found in DAQ trailer (ie, not 0xDEADFACE)!"
812 <<
" Buffer appears not to contain 'trigger FED' data!";
830 std::stringstream
ss;
831 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
832 <<
" NULL pointer to 'trigger FED' data";
839 std::stringstream
ss;
840 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
841 <<
" Unexpected 'Trigger FED' data size [32-bit words]: " << size_u32;
854 uint32_t* head = &data_u32[hsize];
863 std::stringstream
ss;
864 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
865 <<
" EventSummary built from \"trigger FED\":"
867 LogTrace(
"SiStripRawToDigi") << ss.str();
876 if ( input.
size() < 24 ) {
880 std::stringstream
ss;
881 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"] "
882 <<
"Input FEDRawData with FED id " << fed_id
883 <<
" has size " << input.
size();
892 while ( ichar < input.
size()-16 && !
found ) {
894 uint32_t* input_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( input.
data() ) + offset );
895 uint32_t* fed_trailer =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( input.
data() ) + input.
size() - 8 );
899 bool old_vme_header = ( input_u32[0] & 0xF0000000 ) == 0x50000000 && ( fed_trailer[0] & 0xF0000000 ) == 0xA0000000 && ( (fed_trailer[0] & 0x00FFFFFF)*0x8 ) == (input.
size() -
offset);
901 bool old_slink_header = ( input_u32[1] & 0xF0000000 ) == 0x50000000 && ( fed_trailer[1] & 0xF0000000 ) == 0xA0000000 && ( (fed_trailer[1] & 0x00FFFFFF)*0x8 ) == (input.
size() -
offset);
903 bool old_slink_payload = ( input_u32[3] & 0xFF000000 ) == 0xED000000;
905 bool new_buffer_format = ( input_u32[2] & 0xFF000000 ) == 0xC5000000;
907 if ( old_vme_header ) {
912 memcpy( output.
data(),
917 std::stringstream
ss;
918 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
919 <<
" Buffer for FED id " << fed_id
920 <<
" has been found at byte position " << offset
921 <<
" with a size of " << input.
size()-offset <<
" bytes."
922 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
923 LogTrace(
"SiStripRawToDigi") << ss.str();
927 }
else if ( old_slink_header ) {
929 if ( old_slink_payload ) {
934 uint32_t* output_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( output.
data() ) );
936 while ( iter < output.
size() /
sizeof(uint32_t) ) {
937 output_u32[
iter] = input_u32[iter+1];
938 output_u32[iter+1] = input_u32[
iter];
943 std::stringstream
ss;
944 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
945 <<
" Buffer (with MSB and LSB 32-bit words swapped) for FED id " << fed_id
946 <<
" has been found at byte position " << offset
947 <<
" with a size of " << output.
size() <<
" bytes."
948 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
949 LogTrace(
"SiStripRawToDigi") << ss.str();
953 }
else if ( new_buffer_format ) {
958 memcpy( output.
data(),
963 std::stringstream
ss;
964 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
965 <<
" Buffer for FED id " << fed_id
966 <<
" has been found at byte position " << offset
967 <<
" with a size of " << input.
size()-offset <<
" bytes."
968 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
969 LogTrace(
"SiStripRawToDigi") << ss.str();
973 }
else {
headerBytes_ < 0 ? found =
false : found =
true; }
974 }
else {
headerBytes_ < 0 ? found =
false : found =
true; }
979 if ( output.
size() == 0 ) {
983 memcpy( output.
data(), input.
data(), 0 );
985 std::stringstream
ss;
987 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
988 <<
" DAQ header not found within buffer for FED id: " << fed_id;
990 uint32_t* input_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( input.
data() ) );
991 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
992 <<
" DAQ header not found at expected location for FED id: " << fed_id << std::endl
993 <<
" First 64-bit word of buffer is 0x"
995 << std::setfill(
'0') << std::setw(8) << input_u32[0]
996 << std::setfill(
'0') << std::setw(8) << input_u32[1]
997 << std::dec << std::endl
998 <<
" Adjust 'AppendedBytes' configurable to '-1' to activate 'search mode'";
1003 }
else if ( output.
size() < 24 ) {
1006 std::stringstream
ss;
1007 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1008 <<
" Unexpected buffer size! FEDRawData with FED id " << fed_id
1009 <<
" has size " << output.
size();
1026 daq1 =
static_cast<uint32_t
>( header->
daqRegister() );
1027 daq2 =
static_cast<uint32_t
>( header->
daqRegister2() );
1040 std::stringstream
ss;
1041 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1042 <<
" EventSummary built from FED DAQ registers:"
1044 LogTrace(
"SiStripRawToDigi") << ss.str();
1053 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1054 <<
" Dump of buffer for FED id " << fed_id << std::endl
1055 <<
" Buffer contains " << buffer.
size()
1056 <<
" bytes (NB: payload is byte-swapped)" << std::endl;
1057 uint32_t* buffer_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( buffer.
data() ) );
1058 unsigned int empty = 0;
1062 ss <<
"Byte-> 4 5 6 7 0 1 2 3\n";
1063 for ( uint32_t
i = 0;
i < buffer.
size()/8;
i++ ) {
1066 if ( !temp0 && !temp1 ) { empty++; }
1069 ss <<
" [ empty words ]" << std::endl;
1073 << std::setfill(
' ') << std::setw(6) <<
i*8 <<
": "
1075 << std::setfill(
'0') << std::setw(8) << temp0
1076 << std::setfill(
'0') << std::setw(8) << temp1
1084 ss <<
" Byte | <---- Byte order ----< | Byte" << std::endl;
1085 ss <<
" cntr | 7 6 5 4 3 2 1 0 | cntr" << std::endl;
1086 for ( uint32_t
i = 0;
i < buffer.
size()/8;
i++ ) {
1088 uint16_t tmp0 = buffer.
data()[
i*8+0] & 0xFF;
1089 uint16_t tmp1 = buffer.
data()[
i*8+1] & 0xFF;
1090 uint16_t tmp2 = buffer.
data()[
i*8+2] & 0xFF;
1091 uint16_t tmp3 = buffer.
data()[
i*8+3] & 0xFF;
1092 uint16_t tmp4 = buffer.
data()[
i*8+4] & 0xFF;
1093 uint16_t tmp5 = buffer.
data()[
i*8+5] & 0xFF;
1094 uint16_t tmp6 = buffer.
data()[
i*8+6] & 0xFF;
1095 uint16_t tmp7 = buffer.
data()[
i*8+7] & 0xFF;
1106 << std::setfill(
' ') << std::setw(6) <<
i*8+7 <<
" : "
1108 << std::setfill(
'0') << std::setw(2) << tmp7 <<
" "
1109 << std::setfill(
'0') << std::setw(2) << tmp6 <<
" "
1110 << std::setfill(
'0') << std::setw(2) << tmp5 <<
" "
1111 << std::setfill(
'0') << std::setw(2) << tmp4 <<
" "
1112 << std::setfill(
'0') << std::setw(2) << tmp3 <<
" "
1113 << std::setfill(
'0') << std::setw(2) << tmp2 <<
" "
1114 << std::setfill(
'0') << std::setw(2) << tmp1 <<
" "
1115 << std::setfill(
'0') << std::setw(2) << tmp0
1117 <<
" :" << std::setfill(
' ') << std::setw(6) <<
i*8
1123 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1124 <<
" End of FED buffer";
1129 method_name =
"sistrip::RawToDigiUnpacker::" + method_name;
1138 std::stringstream
ss;
1139 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1140 <<
" Caught std::exception!" << std::endl;
1141 if ( extra_info !=
"" ) {
1142 ss <<
" Information: " << extra_info << std::endl;
1144 ss <<
" Caught std::exception in ["
1145 << method_name <<
"] with message:" << std::endl
1153 std::stringstream
ss;
1154 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1155 <<
" Caught unknown exception!" << std::endl;
1156 if ( extra_info !=
"" ) {
1157 ss <<
" Information: " << extra_info << std::endl;
1159 ss <<
"Caught unknown exception in ["
1160 << 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 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
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