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 buffer->setLegacyMode(
legacy_);
184 if (!buffer->doChecks()) {
186 throw cms::Exception(
"FEDBuffer") <<
"FED Buffer check fails for FED ID " << *ifed <<
".";
189 throw cms::Exception(
"FEDBuffer") <<
"FED corrupt buffer check fails for FED ID " << *ifed <<
".";
194 edm::LogWarning(
"sistrip::RawToDigiUnpacker") <<
"Exception caught when creating FEDBuffer object for FED " << *ifed <<
": " << e.
what();
197 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
198 for ( ; iconn != conns.end(); iconn++ ) {
211 std::stringstream ss;
212 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 213 <<
" EventSummary is not set correctly!" 214 <<
" Missing information from both \"trigger FED\" and \"DAQ registers\"!";
220 if ( !summary.
valid() ) {
223 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 224 <<
" EventSummary is not valid: skipping...";
240 std::stringstream ss;
247 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
248 for ( ; iconn != conns.end(); iconn++ ) {
251 uint16_t
chan = iconn->fedCh();
254 if ( !iconn->isConnected() ) {
continue; }
291 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 292 <<
" Clusters are not ordered for FED " 293 << *ifed <<
" channel " << iconn->fedCh()
301 if (regItem.length > 0) {
317 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 318 <<
" Problem extracting common modes for FED id " 319 << *ifed <<
" and channel " << iconn->fedCh()
320 <<
": " << std::endl << e.
what();
340 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 341 <<
" Clusters are not ordered for FED " 342 << *ifed <<
" channel " << iconn->fedCh()
350 if (regItem.length > 0) {
366 size_t bits_shift = 0;
379 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 380 <<
" Clusters are not ordered for FED " 381 << *ifed <<
" channel " << iconn->fedCh()
389 if (regItem.length > 0) {
412 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 413 <<
" Clusters are not ordered for FED " 414 << *ifed <<
" channel " << iconn->fedCh()
422 if (regItem.length > 0) {
439 uint8_t packet_code = buffer->packetCode(
legacy_);
442 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
451 while (unpacker.
hasData()) {samples.push_back(( unpacker.
adc()<<2 ));unpacker++;}
455 while (unpacker.
hasData()) {samples.push_back(( unpacker.
adc()<<1 ));unpacker++;}
458 if ( !samples.empty() ) {
462 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
465 (
i/128) ? readout=readout*2+1 : readout=readout*2;
482 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
484 if ( !samples.empty() ) {
486 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
503 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
505 if ( !samples.empty() ) {
507 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
517 std::stringstream ss;
518 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 519 <<
" Unknown FED readout mode (" << mode
520 <<
")! Assuming SCOPE MODE...";
530 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
532 if ( !samples.empty() ) {
534 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
540 std::stringstream ss;
541 ss <<
"Extracted " << samples.size()
542 <<
" SCOPE MODE digis (samples[0] = " 544 <<
") from FED id/ch " 548 LogTrace(
"SiStripRawToDigi") << ss.str();
553 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 554 <<
" No SM digis found!";
561 unsigned int detIdsSize = detids.
size();
563 std::ostringstream ss;
564 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 565 <<
" Problems were found in data and " << detIdsSize <<
" channels could not be unpacked. " 566 <<
"See output of FED Hardware monitoring for more information. ";
570 edm::LogError(
"TooManyErrors") <<
"Total number of errors = " << detIdsSize;
574 update(scope_mode, virgin_raw, proc_raw, zero_suppr, cm_values);
590 std::vector< edm::DetSet<SiStripDigi> > sorted_and_merged;
593 bool errorInData =
false;
597 std::vector<SiStripDigi> & digis = sorted_and_merged.back().data;
599 size_t len = it->length;
600 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) { len += it2->length; }
604 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
611 if (!__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() )) {
614 <<
"Container must be already sorted!\nat " 621 std::vector< edm::DetSet<SiStripDigi> >::iterator iii = sorted_and_merged.begin();
622 std::vector< edm::DetSet<SiStripDigi> >::iterator jjj = sorted_and_merged.end();
623 for ( ; iii != jjj; ++iii ) {
624 if ( ! __gnu_cxx::is_sorted( iii->begin(), iii->end() ) ) {
632 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted ZS raw data, and have been skipped in unpacking\n";
636 zero_suppr.
swap( zero_suppr_dsv );
644 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
647 bool errorInData =
false;
651 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
655 int maxFirstStrip = it->first;
656 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
658 if (it2->first <= maxFirstStrip) { isDetOk =
false;
continue; }
659 maxFirstStrip = it2->first;
661 if (!isDetOk) { errorInData =
true; it = it2;
continue; }
664 digis.resize(maxFirstStrip + 256);
666 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
668 if (it->length != 256) { isDetOk =
false;
continue; }
671 if (!isDetOk) { errorInData =
true; digis.clear(); it = it2;
continue; }
676 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted virgin raw 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 virgin_raw.
swap( virgin_raw_dsv );
698 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
701 bool errorInData =
false;
705 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
709 int maxFirstStrip = it->first;
710 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
712 if (it2->first <= maxFirstStrip) { isDetOk =
false;
continue; }
713 maxFirstStrip = it2->first;
716 if (!isDetOk) { errorInData =
true; it = it2;
continue; }
719 digis.resize(maxFirstStrip + 256);
721 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
723 if (it->length != 256) { isDetOk =
false;
continue; }
727 if (!isDetOk) { errorInData =
true; digis.clear(); it = it2;
continue; }
732 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted proc raw data, and have been skipped in unpacking\n";
735 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
738 <<
"Container must be already sorted!\nat " 747 proc_raw.
swap( proc_raw_dsv );
754 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
757 bool errorInData =
false;
758 std::vector<Registry>::iterator it,
end;
761 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
764 if ( (it +1 != end) && (it->detid == (it+1)->detid) ) {
767 do { ++it; }
while ( ( it+1 != end) && (it->detid == (it+1)->detid) );
772 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some fed keys contained corrupted scope mode data, and have been skipped in unpacking\n";
775 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
778 <<
"Container must be already sorted!\nat " 787 scope_mode.
swap( scope_mode_dsv );
798 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
801 bool errorInData =
false;
805 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
809 int maxFirstStrip = it->first;
810 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
812 if (it2->first <= maxFirstStrip) { isDetOk =
false;
continue; }
813 maxFirstStrip = it2->first;
815 if (!isDetOk) { errorInData =
true; it = it2;
continue; }
818 digis.resize(maxFirstStrip + 2);
820 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
822 if (it->length != 2) { isDetOk =
false;
continue; }
825 if (!isDetOk) { errorInData =
true; digis.clear(); it = it2;
continue; }
830 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted common mode data, and have been skipped in unpacking\n";
833 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
836 <<
"Container must be already sorted!\nat " 845 common_mode.
swap( common_mode_dsv );
866 uint32_t* data_u32 =
nullptr;
867 uint32_t size_u32 = 0;
876 if ( trigger_fed.
data() && trigger_fed.
size() ) {
877 uint8_t*
temp =
const_cast<uint8_t*
>( trigger_fed.
data() );
881 if ( fedTrailer.conscheck() == 0xDEADFACE ) {
884 std::stringstream ss;
885 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 886 <<
" Search mode for 'trigger FED' activated!" 888 LogTrace(
"SiStripRawToDigi") << ss.str();
897 std::stringstream ss;
898 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 899 <<
" Search mode for 'trigger FED' activated!" 900 <<
" 'Trigger FED' info not found!";
910 if ( trigger_fed.
data() && trigger_fed.
size() ) {
911 uint8_t*
temp =
const_cast<uint8_t*
>( trigger_fed.
data() );
915 if ( fedTrailer.conscheck() != 0xDEADFACE ) {
918 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 919 <<
" Unexpected stamp found in DAQ trailer (ie, not 0xDEADFACE)!" 920 <<
" Buffer appears not to contain 'trigger FED' data!";
938 std::stringstream ss;
939 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 940 <<
" NULL pointer to 'trigger FED' data";
947 std::stringstream ss;
948 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 949 <<
" Unexpected 'Trigger FED' data size [32-bit words]: " << size_u32;
962 uint32_t* head = &data_u32[hsize];
971 std::stringstream ss;
972 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 973 <<
" EventSummary built from \"trigger FED\":" 975 LogTrace(
"SiStripRawToDigi") << ss.str();
984 if ( input.
size() < 24 ) {
988 std::stringstream ss;
989 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"] " 990 <<
"Input FEDRawData with FED id " << fed_id
991 <<
" has size " << input.
size();
1000 while ( ichar < input.
size()-16 && !
found ) {
1002 uint32_t* input_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( input.
data() ) + offset );
1003 uint32_t* fed_trailer =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( input.
data() ) + input.
size() - 8 );
1007 bool old_vme_header = ( input_u32[0] & 0xF0000000 ) == 0x50000000 && ( fed_trailer[0] & 0xF0000000 ) == 0xA0000000 && ( (fed_trailer[0] & 0x00FFFFFF)*0x8 ) == (input.
size() -
offset);
1009 bool old_slink_header = ( input_u32[1] & 0xF0000000 ) == 0x50000000 && ( fed_trailer[1] & 0xF0000000 ) == 0xA0000000 && ( (fed_trailer[1] & 0x00FFFFFF)*0x8 ) == (input.
size() -
offset);
1011 bool old_slink_payload = ( input_u32[3] & 0xFF000000 ) == 0xED000000;
1013 bool new_buffer_format = ( input_u32[2] & 0xFF000000 ) == 0xC5000000;
1015 if ( old_vme_header ) {
1020 memcpy( output.
data(),
1025 std::stringstream ss;
1026 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1027 <<
" Buffer for FED id " << fed_id
1028 <<
" has been found at byte position " << offset
1029 <<
" with a size of " << input.
size()-offset <<
" bytes." 1030 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
1031 LogTrace(
"SiStripRawToDigi") << ss.str();
1035 }
else if ( old_slink_header ) {
1037 if ( old_slink_payload ) {
1042 uint32_t* output_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( output.
data() ) );
1044 while ( iter < output.
size() /
sizeof(uint32_t) ) {
1045 output_u32[iter] = input_u32[iter+1];
1046 output_u32[iter+1] = input_u32[iter];
1051 std::stringstream ss;
1052 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1053 <<
" Buffer (with MSB and LSB 32-bit words swapped) for FED id " << fed_id
1054 <<
" has been found at byte position " << offset
1055 <<
" with a size of " << output.
size() <<
" bytes." 1056 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
1057 LogTrace(
"SiStripRawToDigi") << ss.str();
1061 }
else if ( new_buffer_format ) {
1066 memcpy( output.
data(),
1071 std::stringstream ss;
1072 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1073 <<
" Buffer for FED id " << fed_id
1074 <<
" has been found at byte position " << offset
1075 <<
" with a size of " << input.
size()-offset <<
" bytes." 1076 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
1077 LogTrace(
"SiStripRawToDigi") << ss.str();
1081 }
else {
headerBytes_ < 0 ? found =
false : found =
true; }
1082 }
else {
headerBytes_ < 0 ? found =
false : found =
true; }
1087 if ( output.
size() == 0 ) {
1091 memcpy( output.
data(), input.
data(), 0 );
1093 std::stringstream ss;
1095 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1096 <<
" DAQ header not found within buffer for FED id: " << fed_id;
1098 uint32_t* input_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( input.
data() ) );
1099 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1100 <<
" DAQ header not found at expected location for FED id: " << fed_id << std::endl
1101 <<
" First 64-bit word of buffer is 0x" 1103 << std::setfill(
'0') << std::setw(8) << input_u32[0]
1104 << std::setfill(
'0') << std::setw(8) << input_u32[1]
1106 <<
" Adjust 'AppendedBytes' configurable to '-1' to activate 'search mode'";
1111 }
else if ( output.
size() < 24 ) {
1114 std::stringstream ss;
1115 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1116 <<
" Unexpected buffer size! FEDRawData with FED id " << fed_id
1117 <<
" has size " << output.
size();
1134 daq1 =
static_cast<uint32_t
>( header->
daqRegister() );
1135 daq2 =
static_cast<uint32_t
>( header->
daqRegister2() );
1148 std::stringstream ss;
1149 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1150 <<
" EventSummary built from FED DAQ registers:" 1152 LogTrace(
"SiStripRawToDigi") << ss.str();
1161 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1162 <<
" Dump of buffer for FED id " << fed_id << std::endl
1163 <<
" Buffer contains " << buffer.
size()
1164 <<
" bytes (NB: payload is byte-swapped)" << std::endl;
1167 uint32_t* buffer_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( buffer.
data() ) );
1168 unsigned int empty = 0;
1170 ss <<
"Byte-> 4 5 6 7 0 1 2 3\n";
1171 for ( uint32_t
i = 0;
i < buffer.
size()/8;
i++ ) {
1174 if ( !temp0 && !temp1 ) { empty++; }
1177 ss <<
" [ empty words ]" << std::endl;
1181 << std::setfill(
' ') << std::setw(6) <<
i*8 <<
": " 1183 << std::setfill(
'0') << std::setw(8) << temp0
1184 << std::setfill(
'0') << std::setw(8) << temp1
1192 ss <<
" Byte | <---- Byte order ----< | Byte" << std::endl;
1193 ss <<
" cntr | 7 6 5 4 3 2 1 0 | cntr" << std::endl;
1194 for ( uint32_t
i = 0;
i < buffer.
size()/8;
i++ ) {
1196 uint16_t tmp0 = buffer.
data()[
i*8+0] & 0xFF;
1197 uint16_t tmp1 = buffer.
data()[
i*8+1] & 0xFF;
1198 uint16_t tmp2 = buffer.
data()[
i*8+2] & 0xFF;
1199 uint16_t tmp3 = buffer.
data()[
i*8+3] & 0xFF;
1200 uint16_t tmp4 = buffer.
data()[
i*8+4] & 0xFF;
1201 uint16_t tmp5 = buffer.
data()[
i*8+5] & 0xFF;
1202 uint16_t tmp6 = buffer.
data()[
i*8+6] & 0xFF;
1203 uint16_t tmp7 = buffer.
data()[
i*8+7] & 0xFF;
1214 << std::setfill(
' ') << std::setw(6) <<
i*8+7 <<
" : " 1216 << std::setfill(
'0') << std::setw(2) << tmp7 <<
" " 1217 << std::setfill(
'0') << std::setw(2) << tmp6 <<
" " 1218 << std::setfill(
'0') << std::setw(2) << tmp5 <<
" " 1219 << std::setfill(
'0') << std::setw(2) << tmp4 <<
" " 1220 << std::setfill(
'0') << std::setw(2) << tmp3 <<
" " 1221 << std::setfill(
'0') << std::setw(2) << tmp2 <<
" " 1222 << std::setfill(
'0') << std::setw(2) << tmp1 <<
" " 1223 << std::setfill(
'0') << std::setw(2) << tmp0
1225 <<
" :" << std::setfill(
' ') << std::setw(6) <<
i*8
1231 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1232 <<
" End of FED buffer";
1237 method_name =
"sistrip::RawToDigiUnpacker::" + method_name;
1246 std::stringstream ss;
1247 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1248 <<
" Caught std::exception!" << std::endl;
1249 if ( extra_info !=
"" ) {
1250 ss <<
" Information: " << extra_info << std::endl;
1252 ss <<
" Caught std::exception in [" 1253 << method_name <<
"] with message:" << std::endl
1261 std::stringstream ss;
1262 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1263 <<
" Caught unknown exception!" << std::endl;
1264 if ( extra_info !=
"" ) {
1265 ss <<
" Information: " << extra_info << std::endl;
1267 ss <<
"Caught unknown exception in [" 1268 << method_name <<
"]" << std::endl;
void triggerFed(const FEDRawDataCollection &, SiStripEventSummary &, const uint32_t &event)
trigger info
static FEDRawChannelUnpacker procRawModeUnpacker(const FEDChannel &channel)
void update(RawDigis &scope_mode, RawDigis &virgin_raw, RawDigis &proc_raw, Digis &zero_suppr, RawDigis &common_mode)
fill DetSetVectors using registries
std::vector< Registry > proc_work_registry_
void updateEventSummary(const sistrip::FEDBuffer &, SiStripEventSummary &)
sets the SiStripEventSummary -> not yet implemented for FEDBuffer class
static FEDZSChannelUnpacker zeroSuppressedModeUnpacker(const FEDChannel &channel)
std::vector< SiStripDigi > zs_work_digis_
digi collections
std::vector< Registry > scope_work_registry_
void cleanupWorkVectors()
method to clear registries and digi collections
static const uint32_t length
std::vector< Registry > zs_work_registry_
registries
static FEDZSChannelUnpacker preMixRawModeUnpacker(const FEDChannel &channel)
static const uint32_t invalid32_
void locateStartOfFedBuffer(const uint16_t &fed_id, const FEDRawData &input, FEDRawData &output)
Removes any data appended prior to FED buffer and reorders 32-bit words if swapped.
static FEDRawChannelUnpacker scopeModeUnpacker(const FEDChannel &channel)
static FEDRawChannelUnpacker virginRawModeUnpacker(const FEDChannel &channel)
static const char mlRawToDigi_[]
void push_back(T const &t)
char const * what() const override
static FEDBSChannelUnpacker zeroSuppressedLiteModeUnpacker(const FEDChannel &channel, uint16_t num_bits)
int16_t fedEventDumpFreq_
static FEDBSChannelUnpacker virginRawModeUnpacker(const FEDChannel &channel, uint16_t num_bits)
const FEDFEHeader * feHeader() const
void swap(DetSetVector &other)
size_t size() const
Lenght of the data buffer in bytes.
FEDDAQEventType daqEventType() const
private class to register start and end index of digis in a collection
static std::string const input
const sistrip::RunType & runType() const
std::vector< SiStripRawDigi > virgin_work_digis_
static const uint8_t PACKET_CODE_VIRGIN_RAW10
uint8_t sampleNumber() const
const uint32_t & bx() const
void readoutOrder(uint16_t &physical_order, uint16_t &readout_order)
order of strips
~RawToDigiUnpacker()
default constructor
uint16_t adcPreMix() const
uint32_t event_
other values
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
static void dumpRawData(uint16_t fed_id, const FEDRawData &, std::stringstream &)
dumps raw data to stdout (NB: payload is byte-swapped,headers/trailer are not).
void resize(size_t newsize)
int16_t fedBufferDumpFreq_
void commissioningInfo(const uint32_t *const buffer, const uint32_t &event)
const uint32_t & event() const
FedsConstIterRange fedIds() const
uint8_t sampleNumber() const
FEDHeaderType headerType() const
std::vector< SiStripRawDigi > scope_work_digis_
bool doFullCorruptBufferChecks_
A Digi for the silicon strip detector, containing both strip and adc information, and suitable for st...
static const uint8_t PACKET_CODE_VIRGIN_RAW8_TOPBOT
std::vector< SiStripRawDigi > proc_work_digis_
void handleException(std::string method_name, std::string extra_info="")
catches all possible exceptions and rethrows them as cms::Exceptions
void reserve(size_type n)
std::vector< SiStripRawDigi > cm_work_digis_
static const uint8_t PACKET_CODE_VIRGIN_RAW8_BOTBOT
static FEDZSChannelUnpacker zeroSuppressedLiteModeUnpacker(const FEDChannel &channel)
static const uint16_t FEDCH_PER_FEUNIT
uint16_t triggerFed() const
static const uint16_t invalid_
ConnsConstIterRange fedConnections(uint16_t fed_id) const
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
const sistrip::FedReadoutMode & fedReadoutMode() const
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
void createDigis(const SiStripFedCabling &, const FEDRawDataCollection &, SiStripEventSummary &, RawDigis &scope_mode, RawDigis &virgin_raw, RawDigis &proc_raw, Digis &zero_suppr, DetIdCollection &, RawDigis &common_mode)
creates digis
std::vector< Registry > cm_work_registry_
A Digi for the silicon strip detector, containing only adc information, and suitable for storing raw ...
static const uint8_t PACKET_CODE_VIRGIN_RAW
std::vector< Registry > virgin_work_registry_
RawToDigiUnpacker()=delete
private default constructor
int16_t headerBytes_
configurables