#include <CTPPSPixelDataFormatter.h>
Classes | |
struct | PPSPixelIndex |
Public Types | |
typedef edm::DetSetVector< CTPPSPixelDigi > | Collection |
typedef std::vector< CTPPSPixelDigi > | DetDigis |
typedef std::vector< CTPPSPixelDataError > | DetErrors |
typedef std::unordered_map< cms_uint32_t, DetDigis > | Digis |
typedef std::map< uint32_t, DetErrors > | Errors |
typedef std::unordered_map< int, FEDRawData > | RawData |
typedef uint32_t | Word32 |
typedef uint64_t | Word64 |
Public Member Functions | |
CTPPSPixelDataFormatter (std::map< CTPPSPixelFramePosition, CTPPSPixelROCInfo > const &mapping, CTPPSPixelErrorSummary &) | |
void | formatRawData (const bool &isRun3, unsigned int lvl1_ID, RawData &fedRawData, const Digis &digis, std::vector< PPSPixelIndex > v_iDdet2fed) |
void | interpretRawData (const bool &isRun3, bool &errorsInEvent, int fedId, const FEDRawData &data, Collection &digis, Errors &errors) |
int | nDigis () const |
int | nWords () const |
void | printErrorSummary () const |
void | setErrorStatus (bool theErrorStatus) |
Static Public Member Functions | |
static bool | compare (const PPSPixelIndex &a, const PPSPixelIndex &b) |
Private Member Functions | |
int | checkError (const Word32 &data) const |
std::string | print (const Word64 &word) const |
Private Attributes | |
Word32 | m_ADC_mask |
int | m_ADC_shift |
int | m_allDetDigis |
Word32 | m_COL_mask |
int | m_COL_shift |
Word32 | m_DCOL_mask |
int | m_DCOL_shift |
int | m_DigiCounter |
RPixErrorChecker | m_ErrorCheck |
CTPPSPixelErrorSummary & | m_ErrorSummary |
int | m_hasDetDigis |
bool | m_IncludeErrors |
CTPPSPixelIndices | m_Indices |
Word32 | m_LINK_mask |
int | m_LINK_shift |
const std::map< CTPPSPixelFramePosition, CTPPSPixelROCInfo > & | m_Mapping |
Word32 | m_PXID_mask |
int | m_PXID_shift |
Word32 | m_ROC_mask |
int | m_ROC_shift |
Word32 | m_ROW_mask |
int | m_ROW_shift |
int | m_WordCounter |
Transform CTPPSPixel raw data of a given FED to digi
The output is transmitted through a 64 bit S-link connection. The packet format is defined by the CMS RU group to be : 1st packet header, 64 bits, includes a 6 bit FED id. 2nd packet header, 64 bits. .......................... (detector data) packet trailer, 64 bits. of the 64 bit pixel data records consists of 2 32 bit words. Each 32 bit word includes data from 1 pixel, the bit fields are the following:
6 bit link ID (max 36) - this defines the input link within 1 FED. 5 bit ROC ID (max 24) - this defines the readout chip within one link. 5 bit DCOL ID (max 26) - this defines the double column index with 1 chip. 8 bit pixel ID (max 180) - this defines the pixel address within 1 DCOL. 8 bit ADC vales - this has the charge amplitude.
So, 1 pixel occupies 4 bytes. If the number of pixels is odd, one extra 32 bit word is added (value 0) to fill all 64 bits.
The CTPPSPixelDataFormatter interpret/format ONLY detector data words (not FED headers or trailer, which are treated elsewhere).
Definition at line 55 of file CTPPSPixelDataFormatter.h.
Definition at line 57 of file CTPPSPixelDataFormatter.h.
typedef std::vector<CTPPSPixelDigi> CTPPSPixelDataFormatter::DetDigis |
Definition at line 60 of file CTPPSPixelDataFormatter.h.
typedef std::vector<CTPPSPixelDataError> CTPPSPixelDataFormatter::DetErrors |
Definition at line 62 of file CTPPSPixelDataFormatter.h.
typedef std::unordered_map<cms_uint32_t, DetDigis> CTPPSPixelDataFormatter::Digis |
Definition at line 68 of file CTPPSPixelDataFormatter.h.
typedef std::map<uint32_t, DetErrors> CTPPSPixelDataFormatter::Errors |
Definition at line 63 of file CTPPSPixelDataFormatter.h.
typedef std::unordered_map<int, FEDRawData> CTPPSPixelDataFormatter::RawData |
Definition at line 59 of file CTPPSPixelDataFormatter.h.
typedef uint32_t CTPPSPixelDataFormatter::Word32 |
Definition at line 65 of file CTPPSPixelDataFormatter.h.
typedef uint64_t CTPPSPixelDataFormatter::Word64 |
Definition at line 66 of file CTPPSPixelDataFormatter.h.
CTPPSPixelDataFormatter::CTPPSPixelDataFormatter | ( | std::map< CTPPSPixelFramePosition, CTPPSPixelROCInfo > const & | mapping, |
CTPPSPixelErrorSummary & | eSummary | ||
) |
Definition at line 40 of file CTPPSPixelDataFormatter.cc.
References m_ADC_mask, m_ADC_shift, m_COL_mask, m_COL_shift, m_DCOL_mask, m_DCOL_shift, m_LINK_mask, m_LINK_shift, m_PXID_mask, m_PXID_shift, m_ROC_mask, m_ROC_shift, m_ROW_mask, and m_ROW_shift.
|
private |
|
inlinestatic |
Definition at line 95 of file CTPPSPixelDataFormatter.h.
Referenced by formatRawData(), and CTPPSPixelDigiToRaw::produce().
void CTPPSPixelDataFormatter::formatRawData | ( | const bool & | isRun3, |
unsigned int | lvl1_ID, | ||
RawData & | fedRawData, | ||
const Digis & | digis, | ||
std::vector< PPSPixelIndex > | v_iDdet2fed | ||
) |
Definition at line 260 of file CTPPSPixelDataFormatter.cc.
References compare(), pps::pixel::ElectronicIndex::dcol, CTPPSPixelIndices::DColumn(), Exception, l1tstage2_dqm_sourceclient-live_cfg::fedId, l1t_dqm_sourceclient-live_cfg::fedRawData, mps_fire::i, L1TdeCSCTPG_cfi::isRun3, pps::pixel::ElectronicIndex::link, LogDebug, LogTrace, m_ADC_shift, m_allDetDigis, m_COL_shift, m_DCOL_shift, m_hasDetDigis, m_Indices, m_LINK_shift, m_PXID_shift, m_ROC_shift, m_ROW_shift, m_WordCounter, print(), pps::pixel::ElectronicIndex::pxid, FastTimerService_cff::range, l1tstage2_dqm_sourceclient-live_cfg::rawData, nano_mu_digi_cff::rawId, pps::pixel::ElectronicIndex::roc, rpixValues::ROCSizeInX, alignCSCRings::s, FEDHeader::set(), FEDTrailer::set(), and CTPPSPixelIndices::transformToROC().
Referenced by CTPPSPixelDigiToRaw::produce().
void CTPPSPixelDataFormatter::interpretRawData | ( | const bool & | isRun3, |
bool & | errorsInEvent, | ||
int | fedId, | ||
const FEDRawData & | data, | ||
Collection & | digis, | ||
Errors & | errors | ||
) |
check CRC bit
check headers
check trailers
data words
Definition at line 83 of file CTPPSPixelDataFormatter.cc.
References gpuClustering::adc, CTPPSPixelErrorSummary::add(), RPixErrorChecker::checkCRC(), RPixErrorChecker::checkHeader(), RPixErrorChecker::checkROC(), RPixErrorChecker::checkTrailer(), cuy::col, RPixErrorChecker::conversionError(), edm::DetSet< T >::data, RPixErrorChecker::dummyDetId, l1tstage2_dqm_sourceclient-live_cfg::fedId, edm::DetSetVector< T >::find_or_insert(), dqm-mbProfile::format, RecoTauValidation_cfi::header, CTPPSPixelROCInfo::iD, InvalidLinkId, InvalidPixelId, InvalidROCId, L1TdeCSCTPG_cfi::isRun3, LogTrace, m_ADC_mask, m_ADC_shift, m_COL_mask, m_COL_shift, m_DCOL_mask, m_DCOL_shift, m_ErrorCheck, m_ErrorSummary, m_LINK_mask, m_LINK_shift, m_Mapping, m_PXID_mask, m_PXID_shift, m_ROC_mask, m_ROC_shift, m_ROW_mask, m_ROW_shift, m_WordCounter, nWords(), print(), l1tstage2_dqm_sourceclient-live_cfg::rawData, CTPPSPixelROC::rawId(), nano_mu_digi_cff::rawId, CTPPSPixelROCInfo::roc, PixelMapPlotter::roc, CTPPSPixelROC::setParameters(), CTPPSPixelROC::toGlobal(), CTPPSPixelROC::toGlobalfromDcol(), Unknown, and UNLIKELY.
Referenced by CTPPSPixelRawToDigi::produce().
|
inline |
Definition at line 79 of file CTPPSPixelDataFormatter.h.
References m_DigiCounter.
Referenced by CTPPSPixelDigiToRaw::produce().
|
inline |
Definition at line 74 of file CTPPSPixelDataFormatter.h.
References m_WordCounter.
Referenced by interpretRawData(), and CTPPSPixelDigiToRaw::produce().
|
private |
Definition at line 361 of file CTPPSPixelDataFormatter.cc.
References str.
Referenced by formatRawData(), and interpretRawData().
|
inline |
Definition at line 99 of file CTPPSPixelDataFormatter.h.
References m_ErrorSummary, and CTPPSPixelErrorSummary::printSummary().
void CTPPSPixelDataFormatter::setErrorStatus | ( | bool | theErrorStatus | ) |
Definition at line 78 of file CTPPSPixelDataFormatter.cc.
References m_ErrorCheck, m_IncludeErrors, and RPixErrorChecker::setErrorStatus().
Referenced by CTPPSPixelRawToDigi::produce().
|
private |
Definition at line 108 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 107 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), formatRawData(), and interpretRawData().
|
private |
Definition at line 117 of file CTPPSPixelDataFormatter.h.
Referenced by formatRawData().
|
private |
Definition at line 108 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 107 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), formatRawData(), and interpretRawData().
|
private |
Definition at line 108 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 107 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), formatRawData(), and interpretRawData().
|
private |
Definition at line 116 of file CTPPSPixelDataFormatter.h.
Referenced by nDigis().
|
private |
Definition at line 105 of file CTPPSPixelDataFormatter.h.
Referenced by interpretRawData(), and setErrorStatus().
|
private |
Definition at line 120 of file CTPPSPixelDataFormatter.h.
Referenced by interpretRawData(), and printErrorSummary().
|
private |
Definition at line 118 of file CTPPSPixelDataFormatter.h.
Referenced by formatRawData().
|
private |
Definition at line 104 of file CTPPSPixelDataFormatter.h.
Referenced by setErrorStatus().
|
private |
Definition at line 119 of file CTPPSPixelDataFormatter.h.
Referenced by formatRawData().
|
private |
Definition at line 108 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 107 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), formatRawData(), and interpretRawData().
|
private |
Definition at line 114 of file CTPPSPixelDataFormatter.h.
Referenced by interpretRawData().
|
private |
Definition at line 108 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 107 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), formatRawData(), and interpretRawData().
|
private |
Definition at line 108 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 107 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), formatRawData(), and interpretRawData().
|
private |
Definition at line 108 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 107 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), formatRawData(), and interpretRawData().
|
private |
Definition at line 102 of file CTPPSPixelDataFormatter.h.
Referenced by formatRawData(), interpretRawData(), and nWords().