18 #include <boost/format.hpp> 19 #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),
46 <<
"[sistrip::RawToDigiUnpacker::"<<__func__<<
"]" 47 <<
" Constructing object...";
50 edm::LogWarning(
"SiStripRawToDigi") <<
"Warning: Unpacking of bad channels enabled. Only enable this if you know what you are doing. " << std::endl;
57 <<
"[sistrip::RawToDigiUnpacker::"<<__func__<<
"]" 58 <<
" Destructing object...";
78 if ( cabling.
fedIds().empty() ) {
82 std::vector<uint16_t> feds;
85 buffers.
FEDData( static_cast<int>(ifed) ).
size() ) {
90 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 93 <<
" FED buffers with non-zero size!";
98 bool first_fed =
true;
101 std::vector<uint16_t>::const_iterator ifed = cabling.
fedIds().begin();
102 for ( ; ifed != cabling.
fedIds().end(); ifed++ ) {
113 std::stringstream ss;
114 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 116 << std::setw(4) << std::setfill(
' ') << *ifed
117 <<
" in FEDRawDataCollection" 118 <<
" with non-zero pointer 0x" 120 << std::setw(8) << std::setfill(
'0')
121 <<
reinterpret_cast<uint32_t*
>(
const_cast<uint8_t*
>(input.
data()))
124 << std::setw(5) << std::setfill(
' ') << input.
size()
126 LogTrace(
"SiStripRawToDigi") << ss.str();
133 std::stringstream ss;
143 if ( !input.
data() ) {
147 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
148 for ( ; iconn != conns.end(); iconn++ ) {
156 if ( !input.
size() ) {
160 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
161 for ( ; iconn != conns.end(); iconn++ ) {
169 std::unique_ptr<sistrip::FEDBuffer>
buffer;
172 buffer->setLegacyMode(
legacy_);
173 if (!buffer->doChecks(
true)) {
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 <<
".";
184 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
185 for ( ; iconn != conns.end(); iconn++ ) {
197 warnings_.
add(
"EventSummary is not set correctly! Missing information from both \"trigger FED\" and \"DAQ registers\"!");
201 if ( !summary.
valid() ) {
204 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 205 <<
" EventSummary is not valid: skipping...";
221 std::stringstream ss;
228 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
229 for ( ; iconn != conns.end(); iconn++ ) {
232 uint16_t
chan = iconn->fedCh();
235 if ( !iconn->isConnected() ) {
continue; }
265 const uint8_t packet_code = buffer->packetCode(
legacy_, iconn->fedCh());
266 switch (packet_code) {
285 if ( packet_code == 0 ) {
299 if (regItem.length > 0) {
336 if (regItem.length > 0) {
352 size_t bits_shift = 0;
369 if (regItem.length > 0) {
396 if (regItem.length > 0) {
413 uint8_t packet_code = buffer->packetCode(
legacy_);
416 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
425 while (unpacker.
hasData()) {samples.push_back(( unpacker.
adc()<<2 ));unpacker++;}
429 while (unpacker.
hasData()) {samples.push_back(( unpacker.
adc()<<1 ));unpacker++;}
432 if ( !samples.empty() ) {
436 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
439 (
i/128) ? readout=readout*2+1 : readout=readout*2;
456 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
458 if ( !samples.empty() ) {
460 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
477 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
479 if ( !samples.empty() ) {
481 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
498 while (unpacker.
hasData()) {samples.push_back(unpacker.
adc());unpacker++;}
500 if ( !samples.empty() ) {
502 for ( uint16_t
i = 0,
n = samples.size();
i <
n;
i++ ) {
508 std::stringstream ss;
509 ss <<
"Extracted " << samples.size()
510 <<
" SCOPE MODE digis (samples[0] = " 512 <<
") from FED id/ch " 516 LogTrace(
"SiStripRawToDigi") << ss.str();
526 unsigned int detIdsSize = detids.
size();
528 std::ostringstream ss;
529 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 530 <<
" Problems were found in data and " << detIdsSize <<
" channels could not be unpacked. " 531 <<
"See output of FED Hardware monitoring for more information. ";
535 edm::LogError(
"TooManyErrors") <<
"Total number of errors = " << detIdsSize;
539 update(scope_mode, virgin_raw, proc_raw, zero_suppr, cm_values);
555 std::vector< edm::DetSet<SiStripDigi> > sorted_and_merged;
558 bool errorInData =
false;
562 std::vector<SiStripDigi> & digis = sorted_and_merged.back().data;
564 size_t len = it->length;
565 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) { len += it2->length; }
569 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
576 if (!__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() )) {
579 <<
"Container must be already sorted!\nat " 586 std::vector< edm::DetSet<SiStripDigi> >::iterator iii = sorted_and_merged.begin();
587 std::vector< edm::DetSet<SiStripDigi> >::iterator jjj = sorted_and_merged.end();
588 for ( ; iii != jjj; ++iii ) {
589 if ( ! __gnu_cxx::is_sorted( iii->begin(), iii->end() ) ) {
597 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted ZS raw data, and have been skipped in unpacking\n";
601 zero_suppr.
swap( zero_suppr_dsv );
609 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
612 bool errorInData =
false;
616 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
620 int maxFirstStrip = it->first;
621 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
623 if (it2->first <= maxFirstStrip) { isDetOk =
false;
continue; }
624 maxFirstStrip = it2->first;
626 if (!isDetOk) { errorInData =
true; it = it2;
continue; }
629 digis.resize(maxFirstStrip + 256);
631 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
633 if (it->length != 256) { isDetOk =
false;
continue; }
636 if (!isDetOk) { errorInData =
true; digis.clear(); it = it2;
continue; }
641 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted virgin raw data, and have been skipped in unpacking\n";
644 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
647 <<
"Container must be already sorted!\nat " 656 virgin_raw.
swap( virgin_raw_dsv );
663 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
666 bool errorInData =
false;
670 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
674 int maxFirstStrip = it->first;
675 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
677 if (it2->first <= maxFirstStrip) { isDetOk =
false;
continue; }
678 maxFirstStrip = it2->first;
681 if (!isDetOk) { errorInData =
true; it = it2;
continue; }
684 digis.resize(maxFirstStrip + 256);
686 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
688 if (it->length != 256) { isDetOk =
false;
continue; }
692 if (!isDetOk) { errorInData =
true; digis.clear(); it = it2;
continue; }
697 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted proc raw data, and have been skipped in unpacking\n";
700 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
703 <<
"Container must be already sorted!\nat " 712 proc_raw.
swap( proc_raw_dsv );
719 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
722 bool errorInData =
false;
723 std::vector<Registry>::iterator it,
end;
726 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
729 if ( (it +1 != end) && (it->detid == (it+1)->detid) ) {
732 do { ++it; }
while ( ( it+1 != end) && (it->detid == (it+1)->detid) );
737 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some fed keys contained corrupted scope mode data, and have been skipped in unpacking\n";
740 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
743 <<
"Container must be already sorted!\nat " 752 scope_mode.
swap( scope_mode_dsv );
763 std::vector< edm::DetSet<SiStripRawDigi> > sorted_and_merged;
766 bool errorInData =
false;
770 std::vector<SiStripRawDigi> & digis = sorted_and_merged.back().data;
774 int maxFirstStrip = it->first;
775 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
777 if (it2->first <= maxFirstStrip) { isDetOk =
false;
continue; }
778 maxFirstStrip = it2->first;
780 if (!isDetOk) { errorInData =
true; it = it2;
continue; }
783 digis.resize(maxFirstStrip + 2);
785 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
787 if (it->length != 2) { isDetOk =
false;
continue; }
790 if (!isDetOk) { errorInData =
true; digis.clear(); it = it2;
continue; }
795 if (errorInData)
edm::LogWarning(
"CorruptData") <<
"Some modules contained corrupted common mode data, and have been skipped in unpacking\n";
798 if ( !__gnu_cxx::is_sorted( sorted_and_merged.begin(), sorted_and_merged.end() ) ) {
801 <<
"Container must be already sorted!\nat " 810 common_mode.
swap( common_mode_dsv );
831 uint32_t* data_u32 =
nullptr;
832 uint32_t size_u32 = 0;
841 if ( trigger_fed.
data() && trigger_fed.
size() ) {
842 uint8_t*
temp =
const_cast<uint8_t*
>( trigger_fed.
data() );
846 if ( fedTrailer.conscheck() == 0xDEADFACE ) {
849 std::stringstream ss;
850 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 851 <<
" Search mode for 'trigger FED' activated!" 853 LogTrace(
"SiStripRawToDigi") << ss.str();
862 std::stringstream ss;
863 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 864 <<
" Search mode for 'trigger FED' activated!" 865 <<
" 'Trigger FED' info not found!";
875 if ( trigger_fed.
data() && trigger_fed.
size() ) {
876 uint8_t*
temp =
const_cast<uint8_t*
>( trigger_fed.
data() );
880 if ( fedTrailer.conscheck() != 0xDEADFACE ) {
883 <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 884 <<
" Unexpected stamp found in DAQ trailer (ie, not 0xDEADFACE)!" 885 <<
" Buffer appears not to contain 'trigger FED' data!";
903 std::stringstream ss;
904 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 905 <<
" NULL pointer to 'trigger FED' data";
912 std::stringstream ss;
913 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 914 <<
" Unexpected 'Trigger FED' data size [32-bit words]: " << size_u32;
927 uint32_t* head = &data_u32[hsize];
936 std::stringstream ss;
937 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 938 <<
" EventSummary built from \"trigger FED\":" 940 LogTrace(
"SiStripRawToDigi") << ss.str();
949 if ( input.
size() < 24 ) {
953 std::stringstream ss;
954 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"] " 955 <<
"Input FEDRawData with FED id " << fed_id
956 <<
" has size " << input.
size();
965 while ( ichar < input.
size()-16 && !
found ) {
967 uint32_t* input_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( input.
data() ) + offset );
968 uint32_t* fed_trailer =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( input.
data() ) + input.
size() - 8 );
972 bool old_vme_header = ( input_u32[0] & 0xF0000000 ) == 0x50000000 && ( fed_trailer[0] & 0xF0000000 ) == 0xA0000000 && ( (fed_trailer[0] & 0x00FFFFFF)*0x8 ) == (input.
size() -
offset);
974 bool old_slink_header = ( input_u32[1] & 0xF0000000 ) == 0x50000000 && ( fed_trailer[1] & 0xF0000000 ) == 0xA0000000 && ( (fed_trailer[1] & 0x00FFFFFF)*0x8 ) == (input.
size() -
offset);
976 bool old_slink_payload = ( input_u32[3] & 0xFF000000 ) == 0xED000000;
978 bool new_buffer_format = ( input_u32[2] & 0xFF000000 ) == 0xC5000000;
980 if ( old_vme_header ) {
985 memcpy( output.
data(),
990 std::stringstream ss;
991 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 992 <<
" Buffer for FED id " << fed_id
993 <<
" has been found at byte position " << offset
994 <<
" with a size of " << input.
size()-offset <<
" bytes." 995 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
996 LogTrace(
"SiStripRawToDigi") << ss.str();
1000 }
else if ( old_slink_header ) {
1002 if ( old_slink_payload ) {
1007 uint32_t* output_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( output.
data() ) );
1009 while ( iter < output.
size() /
sizeof(uint32_t) ) {
1010 output_u32[iter] = input_u32[iter+1];
1011 output_u32[iter+1] = input_u32[iter];
1016 std::stringstream ss;
1017 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1018 <<
" Buffer (with MSB and LSB 32-bit words swapped) for FED id " << fed_id
1019 <<
" has been found at byte position " << offset
1020 <<
" with a size of " << output.
size() <<
" bytes." 1021 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
1022 LogTrace(
"SiStripRawToDigi") << ss.str();
1026 }
else if ( new_buffer_format ) {
1031 memcpy( output.
data(),
1036 std::stringstream ss;
1037 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1038 <<
" Buffer for FED id " << fed_id
1039 <<
" has been found at byte position " << offset
1040 <<
" with a size of " << input.
size()-offset <<
" bytes." 1041 <<
" Adjust the configurable 'AppendedBytes' to " <<
offset;
1042 LogTrace(
"SiStripRawToDigi") << ss.str();
1046 }
else {
headerBytes_ < 0 ? found =
false : found =
true; }
1047 }
else {
headerBytes_ < 0 ? found =
false : found =
true; }
1052 if ( output.
size() == 0 ) {
1056 memcpy( output.
data(), input.
data(), 0 );
1058 std::stringstream ss;
1060 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1061 <<
" DAQ header not found within buffer for FED id: " << fed_id;
1063 uint32_t* input_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( input.
data() ) );
1064 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1065 <<
" DAQ header not found at expected location for FED id: " << fed_id << std::endl
1066 <<
" First 64-bit word of buffer is 0x" 1068 << std::setfill(
'0') << std::setw(8) << input_u32[0]
1069 << std::setfill(
'0') << std::setw(8) << input_u32[1]
1071 <<
" Adjust 'AppendedBytes' configurable to '-1' to activate 'search mode'";
1076 }
else if ( output.
size() < 24 ) {
1079 std::stringstream ss;
1080 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1081 <<
" Unexpected buffer size! FEDRawData with FED id " << fed_id
1082 <<
" has size " << output.
size();
1102 daq1 =
static_cast<uint32_t
>( header->
daqRegister() );
1103 daq2 =
static_cast<uint32_t
>( header->
daqRegister2() );
1116 std::stringstream ss;
1117 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1118 <<
" EventSummary built from FED DAQ registers:" 1120 LogTrace(
"SiStripRawToDigi") << ss.str();
1129 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1130 <<
" Dump of buffer for FED id " << fed_id << std::endl
1131 <<
" Buffer contains " << buffer.
size()
1132 <<
" bytes (NB: payload is byte-swapped)" << std::endl;
1135 uint32_t* buffer_u32 =
reinterpret_cast<uint32_t*
>(
const_cast<unsigned char*
>( buffer.
data() ) );
1136 unsigned int empty = 0;
1138 ss <<
"Byte-> 4 5 6 7 0 1 2 3\n";
1139 for ( uint32_t
i = 0;
i < buffer.
size()/8;
i++ ) {
1142 if ( !temp0 && !temp1 ) { empty++; }
1145 ss <<
" [ empty words ]" << std::endl;
1149 << std::setfill(
' ') << std::setw(6) <<
i*8 <<
": " 1151 << std::setfill(
'0') << std::setw(8) << temp0
1152 << std::setfill(
'0') << std::setw(8) << temp1
1160 ss <<
" Byte | <---- Byte order ----< | Byte" << std::endl;
1161 ss <<
" cntr | 7 6 5 4 3 2 1 0 | cntr" << std::endl;
1162 for ( uint32_t
i = 0;
i < buffer.
size()/8;
i++ ) {
1164 uint16_t tmp0 = buffer.
data()[
i*8+0] & 0xFF;
1165 uint16_t tmp1 = buffer.
data()[
i*8+1] & 0xFF;
1166 uint16_t tmp2 = buffer.
data()[
i*8+2] & 0xFF;
1167 uint16_t tmp3 = buffer.
data()[
i*8+3] & 0xFF;
1168 uint16_t tmp4 = buffer.
data()[
i*8+4] & 0xFF;
1169 uint16_t tmp5 = buffer.
data()[
i*8+5] & 0xFF;
1170 uint16_t tmp6 = buffer.
data()[
i*8+6] & 0xFF;
1171 uint16_t tmp7 = buffer.
data()[
i*8+7] & 0xFF;
1182 << std::setfill(
' ') << std::setw(6) <<
i*8+7 <<
" : " 1184 << std::setfill(
'0') << std::setw(2) << tmp7 <<
" " 1185 << std::setfill(
'0') << std::setw(2) << tmp6 <<
" " 1186 << std::setfill(
'0') << std::setw(2) << tmp5 <<
" " 1187 << std::setfill(
'0') << std::setw(2) << tmp4 <<
" " 1188 << std::setfill(
'0') << std::setw(2) << tmp3 <<
" " 1189 << std::setfill(
'0') << std::setw(2) << tmp2 <<
" " 1190 << std::setfill(
'0') << std::setw(2) << tmp1 <<
" " 1191 << std::setfill(
'0') << std::setw(2) << tmp0
1193 <<
" :" << std::setfill(
' ') << std::setw(6) <<
i*8
1199 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1200 <<
" End of FED buffer";
1205 method_name =
"sistrip::RawToDigiUnpacker::" + method_name;
1214 std::stringstream ss;
1215 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1216 <<
" Caught std::exception!" << std::endl;
1217 if ( !extra_info.empty() ) {
1218 ss <<
" Information: " << extra_info << std::endl;
1220 ss <<
" Caught std::exception in [" 1221 << method_name <<
"] with message:" << std::endl
1229 std::stringstream ss;
1230 ss <<
"[sistrip::RawToDigiUnpacker::" << __func__ <<
"]" 1231 <<
" Caught unknown exception!" << std::endl;
1232 if ( !extra_info.empty() ) {
1233 ss <<
" Information: " << extra_info << std::endl;
1235 ss <<
"Caught unknown exception in [" 1236 << method_name <<
"]" << std::endl;
void triggerFed(const FEDRawDataCollection &, SiStripEventSummary &, const uint32_t &event)
trigger info
static FEDRawChannelUnpacker procRawModeUnpacker(const FEDChannel &channel)
static const uint8_t PACKET_CODE_ZERO_SUPPRESSED8_BOTBOT
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 FEDBSChannelUnpacker zeroSuppressedModeUnpacker(const FEDChannel &channel, uint16_t num_bits)
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
static const uint8_t PACKET_CODE_ZERO_SUPPRESSED8_TOPBOT
static const uint8_t PACKET_CODE_ZERO_SUPPRESSED10
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
static const uint8_t PACKET_CODE_ZERO_SUPPRESSED
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_
format
Some error handling for the usage.
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 add(const std::string &message, const std::string &details="")
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 constexpr int lastFEDId()
FEDDAQHeader daqHeader() const
static const uint8_t PACKET_CODE_VIRGIN_RAW
std::vector< Registry > virgin_work_registry_
RawToDigiUnpacker()=delete
private default constructor
int16_t headerBytes_
configurables