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) {
358 std::vector<uint16_t> samples;
364 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
366 if ( !samples.empty() ) {
370 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
373 (
i/128) ? readout=readout*2+1 : readout=readout*2;
382 std::vector<uint16_t> samples;
388 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
390 if ( !samples.empty() ) {
392 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
401 std::vector<uint16_t> samples;
407 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
409 if ( !samples.empty() ) {
411 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
421 std::stringstream
ss;
422 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
423 <<
" Unknown FED readout mode (" << mode
424 <<
")! Assuming SCOPE MODE...";
428 std::vector<uint16_t> samples;
434 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
436 if ( !samples.empty() ) {
438 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
444 std::stringstream
ss;
445 ss <<
"Extracted " << samples.size()
446 <<
" SCOPE MODE digis (samples[0] = "
448 <<
") from FED id/ch "
452 LogTrace(
"SiStripRawToDigi") << ss.str();
457 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
458 <<
" No SM digis found!";
465 unsigned int detIdsSize = detids.
size();
467 std::ostringstream
ss;
468 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
469 <<
" Problems were found in data and " << detIdsSize <<
" channels could not be unpacked. "
470 <<
"See output of FED Hardware monitoring for more information. ";
474 edm::LogError(
"TooManyErrors") <<
"Total number of errors = " << detIdsSize;
478 update(scope_mode, virgin_raw, proc_raw, zero_suppr, cm_values);
494 std::vector< edm::DetSet<SiStripDigi> > sorted_and_merged;
497 bool errorInData =
false;
501 std::vector<SiStripDigi> & digis = sorted_and_merged.back().data;
503 size_t len = it->length;
504 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) { len += it2->length; }
508 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
515 if (!__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() )) {
518 <<
"Container must be already sorted!\nat "
525 std::vector< edm::DetSet<SiStripDigi> >::iterator iii = sorted_and_merged.begin();
526 std::vector< edm::DetSet<SiStripDigi> >::iterator jjj = sorted_and_merged.end();
527 for ( ; iii != jjj; ++iii ) {
528 if ( ! __gnu_cxx::is_sorted( iii->begin(), iii->end() ) ) {
536 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted ZS raw data, and have been skipped in unpacking\n";
540 zero_suppr.
swap( zero_suppr_dsv );
548 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
551 bool errorInData =
false;
555 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
559 int maxFirstStrip = it->first;
560 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
562 if (it2->first <= maxFirstStrip) { isDetOk =
false;
continue; }
563 maxFirstStrip = it2->first;
565 if (!isDetOk) { errorInData =
true; it = it2;
continue; }
568 digis.resize(maxFirstStrip + 256);
570 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
572 if (it->length != 256) { isDetOk =
false;
continue; }
575 if (!isDetOk) { errorInData =
true; digis.clear(); it = it2;
continue; }
580 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted virgin raw data, and have been skipped in unpacking\n";
583 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
586 <<
"Container must be already sorted!\nat "
595 virgin_raw.
swap( virgin_raw_dsv );
602 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
605 bool errorInData =
false;
609 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
613 int maxFirstStrip = it->first;
614 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
616 if (it2->first <= maxFirstStrip) { isDetOk =
false;
continue; }
617 maxFirstStrip = it2->first;
620 if (!isDetOk) { errorInData =
true; it = it2;
continue; }
623 digis.resize(maxFirstStrip + 256);
625 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
627 if (it->length != 256) { isDetOk =
false;
continue; }
631 if (!isDetOk) { errorInData =
true; digis.clear(); it = it2;
continue; }
636 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted proc raw data, and have been skipped in unpacking\n";
639 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
642 <<
"Container must be already sorted!\nat "
651 proc_raw.
swap( proc_raw_dsv );
658 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
661 bool errorInData =
false;
662 std::vector<Registry>::iterator it,
end;
665 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
668 if ( (it +1 != end) && (it->detid == (it+1)->
detid) ) {
671 do { ++it; }
while ( ( it+1 != end) && (it->detid == (it+1)->
detid) );
676 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some fed keys contained corrupted scope mode data, and have been skipped in unpacking\n";
679 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
682 <<
"Container must be already sorted!\nat "
691 scope_mode.
swap( scope_mode_dsv );
702 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
705 bool errorInData =
false;
709 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
713 int maxFirstStrip = it->first;
714 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
716 if (it2->first <= maxFirstStrip) { isDetOk =
false;
continue; }
717 maxFirstStrip = it2->first;
719 if (!isDetOk) { errorInData =
true; it = it2;
continue; }
722 digis.resize(maxFirstStrip + 2);
724 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
726 if (it->length != 2) { isDetOk =
false;
continue; }
729 if (!isDetOk) { errorInData =
true; digis.clear(); it = it2;
continue; }
734 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted common mode data, and have been skipped in unpacking\n";
737 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
740 <<
"Container must be already sorted!\nat "
749 common_mode.
swap( common_mode_dsv );
770 uint32_t* data_u32 = 0;
771 uint32_t size_u32 = 0;
780 if ( trigger_fed.
data() && trigger_fed.
size() ) {
781 uint8_t*
temp =
const_cast<uint8_t*
>( trigger_fed.
data() );
782 data_u32 =
reinterpret_cast<uint32_t*
>(
temp ) +
sizeof(
fedh_t)/
sizeof(uint32_t) + 1;
783 size_u32 = trigger_fed.
size()/
sizeof(uint32_t) -
sizeof(
fedh_t)/
sizeof(uint32_t) - 1;
785 if ( fed_trailer->
conscheck == 0xDEADFACE ) {
788 std::stringstream
ss;
789 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
790 <<
" Search mode for 'trigger FED' activated!"
792 LogTrace(
"SiStripRawToDigi") << ss.str();
801 std::stringstream
ss;
802 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
803 <<
" Search mode for 'trigger FED' activated!"
804 <<
" 'Trigger FED' info not found!";
814 if ( trigger_fed.
data() && trigger_fed.
size() ) {
815 uint8_t*
temp =
const_cast<uint8_t*
>( trigger_fed.
data() );
816 data_u32 =
reinterpret_cast<uint32_t*
>(
temp ) +
sizeof(
fedh_t)/
sizeof(uint32_t) + 1;
817 size_u32 = trigger_fed.
size()/
sizeof(uint32_t) -
sizeof(
fedh_t)/
sizeof(uint32_t) - 1;
819 if ( fed_trailer->
conscheck != 0xDEADFACE ) {
822 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
823 <<
" Unexpected stamp found in DAQ trailer (ie, not 0xDEADFACE)!"
824 <<
" Buffer appears not to contain 'trigger FED' data!";
842 std::stringstream
ss;
843 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
844 <<
" NULL pointer to 'trigger FED' data";
851 std::stringstream
ss;
852 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
853 <<
" Unexpected 'Trigger FED' data size [32-bit words]: " << size_u32;
866 uint32_t* head = &data_u32[hsize];
875 std::stringstream
ss;
876 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
877 <<
" EventSummary built from \"trigger FED\":"
879 LogTrace(
"SiStripRawToDigi") << ss.str();
888 if ( input.
size() < 24 ) {
892 std::stringstream
ss;
893 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"] "
894 <<
"Input FEDRawData with FED id " << fed_id
895 <<
" has size " << input.
size();
904 while ( ichar < input.
size()-16 && !
found ) {
906 uint32_t* input_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( input.
data() ) + offset );
907 uint32_t* fed_trailer =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( input.
data() ) + input.
size() - 8 );
911 bool old_vme_header = ( input_u32[0] & 0xF0000000 ) == 0x50000000 && ( fed_trailer[0] & 0xF0000000 ) == 0xA0000000 && ( (fed_trailer[0] & 0x00FFFFFF)*0x8 ) == (input.
size() -
offset);
913 bool old_slink_header = ( input_u32[1] & 0xF0000000 ) == 0x50000000 && ( fed_trailer[1] & 0xF0000000 ) == 0xA0000000 && ( (fed_trailer[1] & 0x00FFFFFF)*0x8 ) == (input.
size() -
offset);
915 bool old_slink_payload = ( input_u32[3] & 0xFF000000 ) == 0xED000000;
917 bool new_buffer_format = ( input_u32[2] & 0xFF000000 ) == 0xC5000000;
919 if ( old_vme_header ) {
924 memcpy( output.
data(),
929 std::stringstream
ss;
930 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
931 <<
" Buffer for FED id " << fed_id
932 <<
" has been found at byte position " << offset
933 <<
" with a size of " << input.
size()-offset <<
" bytes."
934 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
935 LogTrace(
"SiStripRawToDigi") << ss.str();
939 }
else if ( old_slink_header ) {
941 if ( old_slink_payload ) {
946 uint32_t* output_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( output.
data() ) );
948 while ( iter < output.
size() /
sizeof(uint32_t) ) {
949 output_u32[
iter] = input_u32[iter+1];
950 output_u32[iter+1] = input_u32[
iter];
955 std::stringstream
ss;
956 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
957 <<
" Buffer (with MSB and LSB 32-bit words swapped) for FED id " << fed_id
958 <<
" has been found at byte position " << offset
959 <<
" with a size of " << output.
size() <<
" bytes."
960 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
961 LogTrace(
"SiStripRawToDigi") << ss.str();
965 }
else if ( new_buffer_format ) {
970 memcpy( output.
data(),
975 std::stringstream
ss;
976 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
977 <<
" Buffer for FED id " << fed_id
978 <<
" has been found at byte position " << offset
979 <<
" with a size of " << input.
size()-offset <<
" bytes."
980 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
981 LogTrace(
"SiStripRawToDigi") << ss.str();
985 }
else {
headerBytes_ < 0 ? found =
false : found =
true; }
986 }
else {
headerBytes_ < 0 ? found =
false : found =
true; }
991 if ( output.
size() == 0 ) {
995 memcpy( output.
data(), input.
data(), 0 );
997 std::stringstream
ss;
999 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1000 <<
" DAQ header not found within buffer for FED id: " << fed_id;
1002 uint32_t* input_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( input.
data() ) );
1003 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1004 <<
" DAQ header not found at expected location for FED id: " << fed_id << std::endl
1005 <<
" First 64-bit word of buffer is 0x"
1007 << std::setfill(
'0') << std::setw(8) << input_u32[0]
1008 << std::setfill(
'0') << std::setw(8) << input_u32[1]
1009 << std::dec << std::endl
1010 <<
" Adjust 'AppendedBytes' configurable to '-1' to activate 'search mode'";
1015 }
else if ( output.
size() < 24 ) {
1018 std::stringstream
ss;
1019 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1020 <<
" Unexpected buffer size! FEDRawData with FED id " << fed_id
1021 <<
" has size " << output.
size();
1038 daq1 =
static_cast<uint32_t
>( header->
daqRegister() );
1039 daq2 =
static_cast<uint32_t
>( header->
daqRegister2() );
1052 std::stringstream
ss;
1053 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1054 <<
" EventSummary built from FED DAQ registers:"
1056 LogTrace(
"SiStripRawToDigi") << ss.str();
1065 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1066 <<
" Dump of buffer for FED id " << fed_id << std::endl
1067 <<
" Buffer contains " << buffer.
size()
1068 <<
" bytes (NB: payload is byte-swapped)" << std::endl;
1069 uint32_t* buffer_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( buffer.
data() ) );
1070 unsigned int empty = 0;
1074 ss <<
"Byte-> 4 5 6 7 0 1 2 3\n";
1075 for ( uint32_t
i = 0;
i < buffer.
size()/8;
i++ ) {
1078 if ( !temp0 && !temp1 ) { empty++; }
1081 ss <<
" [ empty words ]" << std::endl;
1085 << std::setfill(
' ') << std::setw(6) <<
i*8 <<
": "
1087 << std::setfill(
'0') << std::setw(8) << temp0
1088 << std::setfill(
'0') << std::setw(8) << temp1
1096 ss <<
" Byte | <---- Byte order ----< | Byte" << std::endl;
1097 ss <<
" cntr | 7 6 5 4 3 2 1 0 | cntr" << std::endl;
1098 for ( uint32_t
i = 0;
i < buffer.
size()/8;
i++ ) {
1100 uint16_t tmp0 = buffer.
data()[
i*8+0] & 0xFF;
1101 uint16_t tmp1 = buffer.
data()[
i*8+1] & 0xFF;
1102 uint16_t tmp2 = buffer.
data()[
i*8+2] & 0xFF;
1103 uint16_t tmp3 = buffer.
data()[
i*8+3] & 0xFF;
1104 uint16_t tmp4 = buffer.
data()[
i*8+4] & 0xFF;
1105 uint16_t tmp5 = buffer.
data()[
i*8+5] & 0xFF;
1106 uint16_t tmp6 = buffer.
data()[
i*8+6] & 0xFF;
1107 uint16_t tmp7 = buffer.
data()[
i*8+7] & 0xFF;
1118 << std::setfill(
' ') << std::setw(6) <<
i*8+7 <<
" : "
1120 << std::setfill(
'0') << std::setw(2) << tmp7 <<
" "
1121 << std::setfill(
'0') << std::setw(2) << tmp6 <<
" "
1122 << std::setfill(
'0') << std::setw(2) << tmp5 <<
" "
1123 << std::setfill(
'0') << std::setw(2) << tmp4 <<
" "
1124 << std::setfill(
'0') << std::setw(2) << tmp3 <<
" "
1125 << std::setfill(
'0') << std::setw(2) << tmp2 <<
" "
1126 << std::setfill(
'0') << std::setw(2) << tmp1 <<
" "
1127 << std::setfill(
'0') << std::setw(2) << tmp0
1129 <<
" :" << std::setfill(
' ') << std::setw(6) <<
i*8
1135 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1136 <<
" End of FED buffer";
1141 method_name =
"sistrip::RawToDigiUnpacker::" + method_name;
1150 std::stringstream
ss;
1151 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1152 <<
" Caught std::exception!" << std::endl;
1153 if ( extra_info !=
"" ) {
1154 ss <<
" Information: " << extra_info << std::endl;
1156 ss <<
" Caught std::exception in ["
1157 << method_name <<
"] with message:" << std::endl
1165 std::stringstream
ss;
1166 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]"
1167 <<
" Caught unknown exception!" << std::endl;
1168 if ( extra_info !=
"" ) {
1169 ss <<
" Information: " << extra_info << std::endl;
1171 ss <<
"Caught unknown exception in ["
1172 << 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