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 errorThreshold_(errorThreshold)
42 <<
"[sistrip::RawToDigiUnpacker::"<<__func__<<
"]"
43 <<
" Constructing object...";
46 edm::LogWarning(
"SiStripRawToDigi") <<
"Warning: Unpacking of bad channels enabled. Only enable this if you know what you are doing. " << std::endl;
53 <<
"[sistrip::RawToDigiUnpacker::"<<__func__<<
"]"
54 <<
" Destructing object...";
67 if ( cabling.
feds().empty() ) {
69 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
70 <<
" No FEDs found in cabling map!";
72 std::vector<uint16_t> feds;
75 buffers.
FEDData( static_cast<int>(ifed) ).
size() ) {
80 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
83 <<
" FED buffers with non-zero size!";
88 bool first_fed =
true;
91 std::vector<uint16_t>::const_iterator ifed = cabling.
feds().begin();
92 for ( ; ifed != cabling.
feds().end(); ifed++ ) {
103 std::stringstream ss;
104 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
106 << std::setw(4) << std::setfill(
' ') << *ifed
107 <<
" in FEDRawDataCollection"
108 <<
" with non-zero pointer 0x"
110 << std::setw(8) << std::setfill(
'0')
111 <<
reinterpret_cast<uint32_t*
>(
const_cast<uint8_t*
>(input.
data()))
114 << std::setw(5) << std::setfill(
' ') << input.
size()
116 LogTrace(
"SiStripRawToDigi") << ss.str();
123 std::stringstream ss;
130 const std::vector<FedChannelConnection>& conns = cabling.
connections(*ifed);
133 if ( !input.
data() ) {
136 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
137 <<
" NULL pointer to FEDRawData for FED id "
142 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
143 for ( ; iconn != conns.end(); iconn++ ) {
151 if ( !input.
size() ) {
154 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
155 <<
" FEDRawData has zero size for FED id "
160 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
161 for ( ; iconn != conns.end(); iconn++ ) {
169 std::auto_ptr<sistrip::FEDBuffer> buffer;
172 if (!buffer->doChecks()) {
174 throw cms::Exception(
"FEDBuffer") <<
"FED Buffer check fails for FED ID " << *ifed <<
".";
177 throw cms::Exception(
"FEDBuffer") <<
"FED corrupt buffer check fails for FED ID " << *ifed <<
".";
182 edm::LogWarning(
"sistrip::RawToDigiUnpacker") <<
"Exception caught when creating FEDBuffer object for FED " << *ifed <<
": " << e.
what();
185 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
186 for ( ; iconn != conns.end(); iconn++ ) {
199 std::stringstream ss;
200 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
201 <<
" EventSummary is not set correctly!"
202 <<
" Missing information from both \"trigger FED\" and \"DAQ registers\"!";
208 if ( !summary.
valid() ) {
211 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
212 <<
" EventSummary is not valid: skipping...";
227 std::stringstream ss;
234 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
235 for ( ; iconn != conns.end(); iconn++ ) {
238 uint16_t chan = iconn->fedCh();
241 if ( !iconn->isConnected() ) {
continue; }
247 if (!buffer->channelGood(iconn->fedCh())) {
278 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
279 <<
" Clusters are not ordered for FED "
280 << *ifed <<
" channel " << iconn->fedCh()
288 if (regItem.length > 0) {
304 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
305 <<
" Problem extracting common modes for FED id "
306 << *ifed <<
" and channel " << iconn->fedCh()
307 <<
": " << std::endl << e.
what();
327 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
328 <<
" Clusters are not ordered for FED "
329 << *ifed <<
" channel " << iconn->fedCh()
337 if (regItem.length > 0) {
347 std::vector<uint16_t> samples;
353 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
355 if ( !samples.empty() ) {
359 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
362 (
i/128) ? readout=readout*2+1 : readout=readout*2;
371 std::vector<uint16_t> samples;
377 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
379 if ( !samples.empty() ) {
381 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
390 std::vector<uint16_t> samples;
396 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
398 if ( !samples.empty() ) {
400 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
410 std::stringstream ss;
411 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
412 <<
" Unknown FED readout mode (" << mode
413 <<
")! Assuming SCOPE MODE...";
417 std::vector<uint16_t> samples;
423 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
425 if ( !samples.empty() ) {
427 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
433 std::stringstream ss;
434 ss <<
"Extracted " << samples.size()
435 <<
" SCOPE MODE digis (samples[0] = "
437 <<
") from FED id/ch "
441 LogTrace(
"SiStripRawToDigi") << ss.str();
446 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
447 <<
" No SM digis found!";
454 unsigned int detIdsSize = detids.
size();
456 std::ostringstream ss;
457 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
458 <<
" Problems were found in data and " << detIdsSize <<
" channels could not be unpacked. "
459 <<
"See output of FED Hardware monitoring for more information. ";
463 edm::LogError(
"TooManyErrors") <<
"Total number of errors = " << detIdsSize;
467 update(scope_mode, virgin_raw, proc_raw, zero_suppr, cm_values);
483 std::vector< edm::DetSet<SiStripDigi> > sorted_and_merged;
486 bool errorInData =
false;
490 std::vector<SiStripDigi> & digis = sorted_and_merged.back().data;
492 size_t len = it->length;
493 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) { len += it2->length; }
497 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
504 if (!__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() )) {
507 <<
"Container must be already sorted!\nat "
514 std::vector< edm::DetSet<SiStripDigi> >::iterator iii = sorted_and_merged.begin();
515 std::vector< edm::DetSet<SiStripDigi> >::iterator jjj = sorted_and_merged.end();
516 for ( ; iii != jjj; ++iii ) {
517 if ( ! __gnu_cxx::is_sorted( iii->begin(), iii->end() ) ) {
525 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted ZS raw data, and have been skipped in unpacking\n";
529 zero_suppr.
swap( zero_suppr_dsv );
537 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
540 bool errorInData =
false;
544 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
548 int maxFirstStrip = it->first;
549 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
551 if (it2->first <= maxFirstStrip) { isDetOk =
false;
continue; }
552 maxFirstStrip = it2->first;
554 if (!isDetOk) { errorInData =
true; it = it2;
continue; }
557 digis.resize(maxFirstStrip + 256);
559 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
561 if (it->length != 256) { isDetOk =
false;
continue; }
564 if (!isDetOk) { errorInData =
true; digis.clear(); it = it2;
continue; }
569 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted virgin raw data, and have been skipped in unpacking\n";
572 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
575 <<
"Container must be already sorted!\nat "
584 virgin_raw.
swap( virgin_raw_dsv );
591 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
594 bool errorInData =
false;
598 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
602 int maxFirstStrip = it->first;
603 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
605 if (it2->first <= maxFirstStrip) { isDetOk =
false;
continue; }
606 maxFirstStrip = it2->first;
609 if (!isDetOk) { errorInData =
true; it = it2;
continue; }
612 digis.resize(maxFirstStrip + 256);
614 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
616 if (it->length != 256) { isDetOk =
false;
continue; }
620 if (!isDetOk) { errorInData =
true; digis.clear(); it = it2;
continue; }
625 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted proc raw data, and have been skipped in unpacking\n";
628 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
631 <<
"Container must be already sorted!\nat "
640 proc_raw.
swap( proc_raw_dsv );
647 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
650 bool errorInData =
false;
651 std::vector<Registry>::iterator it,
end;
654 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
657 if ( (it +1 != end) && (it->detid == (it+1)->
detid) ) {
660 do { ++it; }
while ( ( it+1 != end) && (it->detid == (it+1)->
detid) );
665 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some fed keys contained corrupted scope mode data, and have been skipped in unpacking\n";
668 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
671 <<
"Container must be already sorted!\nat "
680 scope_mode.
swap( scope_mode_dsv );
691 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
694 bool errorInData =
false;
698 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
702 int maxFirstStrip = it->first;
703 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
705 if (it2->first <= maxFirstStrip) { isDetOk =
false;
continue; }
706 maxFirstStrip = it2->first;
708 if (!isDetOk) { errorInData =
true; it = it2;
continue; }
711 digis.resize(maxFirstStrip + 2);
713 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
715 if (it->length != 2) { isDetOk =
false;
continue; }
718 if (!isDetOk) { errorInData =
true; digis.clear(); it = it2;
continue; }
723 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted common mode data, and have been skipped in unpacking\n";
726 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
729 <<
"Container must be already sorted!\nat "
738 common_mode.
swap( common_mode_dsv );
757 uint32_t* data_u32 = 0;
758 uint32_t size_u32 = 0;
767 if ( trigger_fed.
data() && trigger_fed.
size() ) {
768 uint8_t*
temp =
const_cast<uint8_t*
>( trigger_fed.
data() );
769 data_u32 =
reinterpret_cast<uint32_t*
>(
temp ) +
sizeof(
fedh_t)/
sizeof(uint32_t) + 1;
770 size_u32 = trigger_fed.
size()/
sizeof(uint32_t) -
sizeof(
fedh_t)/
sizeof(uint32_t) - 1;
772 if ( fed_trailer->
conscheck == 0xDEADFACE ) {
775 std::stringstream ss;
776 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
777 <<
" Search mode for 'trigger FED' activated!"
779 LogTrace(
"SiStripRawToDigi") << ss.str();
788 std::stringstream ss;
789 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
790 <<
" Search mode for 'trigger FED' activated!"
791 <<
" 'Trigger FED' info not found!";
801 if ( trigger_fed.
data() && trigger_fed.
size() ) {
802 uint8_t*
temp =
const_cast<uint8_t*
>( trigger_fed.
data() );
803 data_u32 =
reinterpret_cast<uint32_t*
>(
temp ) +
sizeof(
fedh_t)/
sizeof(uint32_t) + 1;
804 size_u32 = trigger_fed.
size()/
sizeof(uint32_t) -
sizeof(
fedh_t)/
sizeof(uint32_t) - 1;
806 if ( fed_trailer->
conscheck != 0xDEADFACE ) {
809 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
810 <<
" Unexpected stamp found in DAQ trailer (ie, not 0xDEADFACE)!"
811 <<
" Buffer appears not to contain 'trigger FED' data!";
829 std::stringstream ss;
830 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
831 <<
" NULL pointer to 'trigger FED' data";
838 std::stringstream ss;
839 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
840 <<
" Unexpected 'Trigger FED' data size [32-bit words]: " << size_u32;
853 uint32_t* head = &data_u32[hsize];
862 std::stringstream ss;
863 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
864 <<
" EventSummary built from \"trigger FED\":"
866 LogTrace(
"SiStripRawToDigi") << ss.str();
875 if ( input.
size() < 24 ) {
879 std::stringstream ss;
880 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"] "
881 <<
"Input FEDRawData with FED id " << fed_id
882 <<
" has size " << input.
size();
891 while ( ichar < input.
size()-16 && !
found ) {
893 uint32_t* input_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( input.
data() ) + offset );
894 uint32_t* fed_trailer =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( input.
data() ) + input.
size() - 8 );
898 bool old_vme_header = ( input_u32[0] & 0xF0000000 ) == 0x50000000 && ( fed_trailer[0] & 0xF0000000 ) == 0xA0000000 && ( (fed_trailer[0] & 0x00FFFFFF)*0x8 ) == (input.
size() -
offset);
900 bool old_slink_header = ( input_u32[1] & 0xF0000000 ) == 0x50000000 && ( fed_trailer[1] & 0xF0000000 ) == 0xA0000000 && ( (fed_trailer[1] & 0x00FFFFFF)*0x8 ) == (input.
size() -
offset);
902 bool old_slink_payload = ( input_u32[3] & 0xFF000000 ) == 0xED000000;
904 bool new_buffer_format = ( input_u32[2] & 0xFF000000 ) == 0xC5000000;
906 if ( old_vme_header ) {
911 memcpy( output.
data(),
916 std::stringstream ss;
917 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
918 <<
" Buffer for FED id " << fed_id
919 <<
" has been found at byte position " << offset
920 <<
" with a size of " << input.
size()-offset <<
" bytes."
921 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
922 LogTrace(
"SiStripRawToDigi") << ss.str();
926 }
else if ( old_slink_header ) {
928 if ( old_slink_payload ) {
933 uint32_t* output_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( output.
data() ) );
935 while ( iter < output.
size() /
sizeof(uint32_t) ) {
936 output_u32[iter] = input_u32[iter+1];
937 output_u32[iter+1] = input_u32[iter];
942 std::stringstream ss;
943 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
944 <<
" Buffer (with MSB and LSB 32-bit words swapped) for FED id " << fed_id
945 <<
" has been found at byte position " << offset
946 <<
" with a size of " << output.
size() <<
" bytes."
947 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
948 LogTrace(
"SiStripRawToDigi") << ss.str();
952 }
else if ( new_buffer_format ) {
957 memcpy( output.
data(),
962 std::stringstream ss;
963 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
964 <<
" Buffer for FED id " << fed_id
965 <<
" has been found at byte position " << offset
966 <<
" with a size of " << input.
size()-offset <<
" bytes."
967 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
968 LogTrace(
"SiStripRawToDigi") << ss.str();
972 }
else {
headerBytes_ < 0 ? found =
false : found =
true; }
973 }
else {
headerBytes_ < 0 ? found =
false : found =
true; }
978 if ( output.
size() == 0 ) {
982 memcpy( output.
data(), input.
data(), 0 );
984 std::stringstream ss;
986 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
987 <<
" DAQ header not found within buffer for FED id: " << fed_id;
989 uint32_t* input_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( input.
data() ) );
990 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
991 <<
" DAQ header not found at expected location for FED id: " << fed_id << std::endl
992 <<
" First 64-bit word of buffer is 0x"
994 << std::setfill(
'0') << std::setw(8) << input_u32[0]
995 << std::setfill(
'0') << std::setw(8) << input_u32[1]
996 << std::dec << std::endl
997 <<
" Adjust 'AppendedBytes' configurable to '-1' to activate 'search mode'";
1002 }
else if ( output.
size() < 24 ) {
1005 std::stringstream ss;
1006 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1007 <<
" Unexpected buffer size! FEDRawData with FED id " << fed_id
1008 <<
" has size " << output.
size();
1025 daq1 =
static_cast<uint32_t
>( header->
daqRegister() );
1026 daq2 =
static_cast<uint32_t
>( header->
daqRegister2() );
1039 std::stringstream ss;
1040 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1041 <<
" EventSummary built from FED DAQ registers:"
1043 LogTrace(
"SiStripRawToDigi") << ss.str();
1052 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1053 <<
" Dump of buffer for FED id " << fed_id << std::endl
1054 <<
" Buffer contains " << buffer.
size()
1055 <<
" bytes (NB: payload is byte-swapped)" << std::endl;
1056 uint32_t* buffer_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( buffer.
data() ) );
1057 unsigned int empty = 0;
1061 ss <<
"Byte-> 4 5 6 7 0 1 2 3\n";
1062 for ( uint32_t
i = 0;
i < buffer.
size()/8;
i++ ) {
1065 if ( !temp0 && !temp1 ) { empty++; }
1068 ss <<
" [ empty words ]" << std::endl;
1072 << std::setfill(
' ') << std::setw(6) <<
i*8 <<
": "
1074 << std::setfill(
'0') << std::setw(8) << temp0
1075 << std::setfill(
'0') << std::setw(8) << temp1
1083 ss <<
" Byte | <---- Byte order ----< | Byte" << std::endl;
1084 ss <<
" cntr | 7 6 5 4 3 2 1 0 | cntr" << std::endl;
1085 for ( uint32_t
i = 0;
i < buffer.
size()/8;
i++ ) {
1087 uint16_t tmp0 = buffer.
data()[
i*8+0] & 0xFF;
1088 uint16_t tmp1 = buffer.
data()[
i*8+1] & 0xFF;
1089 uint16_t tmp2 = buffer.
data()[
i*8+2] & 0xFF;
1090 uint16_t tmp3 = buffer.
data()[
i*8+3] & 0xFF;
1091 uint16_t tmp4 = buffer.
data()[
i*8+4] & 0xFF;
1092 uint16_t tmp5 = buffer.
data()[
i*8+5] & 0xFF;
1093 uint16_t tmp6 = buffer.
data()[
i*8+6] & 0xFF;
1094 uint16_t tmp7 = buffer.
data()[
i*8+7] & 0xFF;
1105 << std::setfill(
' ') << std::setw(6) <<
i*8+7 <<
" : "
1107 << std::setfill(
'0') << std::setw(2) << tmp7 <<
" "
1108 << std::setfill(
'0') << std::setw(2) << tmp6 <<
" "
1109 << std::setfill(
'0') << std::setw(2) << tmp5 <<
" "
1110 << std::setfill(
'0') << std::setw(2) << tmp4 <<
" "
1111 << std::setfill(
'0') << std::setw(2) << tmp3 <<
" "
1112 << std::setfill(
'0') << std::setw(2) << tmp2 <<
" "
1113 << std::setfill(
'0') << std::setw(2) << tmp1 <<
" "
1114 << std::setfill(
'0') << std::setw(2) << tmp0
1116 <<
" :" << std::setfill(
' ') << std::setw(6) <<
i*8
1122 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1123 <<
" End of FED buffer";
1128 method_name =
"sistrip::RawToDigiUnpacker::" + method_name;
1137 std::stringstream ss;
1138 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1139 <<
" Caught std::exception!" << std::endl;
1140 if ( extra_info !=
"" ) {
1141 ss <<
" Information: " << extra_info << std::endl;
1143 ss <<
" Caught std::exception in ["
1144 << method_name <<
"] with message:" << std::endl
1152 std::stringstream ss;
1153 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1154 <<
" Caught unknown exception!" << std::endl;
1155 if ( extra_info !=
"" ) {
1156 ss <<
" Information: " << extra_info << std::endl;
1158 ss <<
"Caught unknown exception in ["
1159 << 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_
struct fedt_struct fedt_t
const std::vector< uint16_t > & feds() const
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
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
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
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_
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 ...
std::vector< Registry > virgin_work_registry_
const std::vector< FedChannelConnection > & connections(uint16_t fed_id) const
int16_t headerBytes_
configurables