#include <CTPPSPixelDataFormatter.h>
Public Types | |
typedef edm::DetSetVector< CTPPSPixelDigi > | Collection |
typedef std::vector< CTPPSPixelDigi > | DetDigis |
typedef std::vector< CTPPSPixelDataError > | DetErrors |
typedef std::map< uint32_t, DetErrors > | Errors |
typedef std::map< int, FEDRawData > | RawData |
typedef uint32_t | Word32 |
typedef uint64_t | Word64 |
Public Member Functions | |
CTPPSPixelDataFormatter (std::map< CTPPSPixelFramePosition, CTPPSPixelROCInfo > const &mapping) | |
void | interpretRawData (bool &errorsInEvent, int fedId, const FEDRawData &data, Collection &digis, Errors &errors) |
int | nWords () const |
void | setErrorStatus (bool theErrorStatus) |
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 |
Word32 | m_DCOL_mask |
int | m_DCOL_shift |
RPixErrorChecker | m_ErrorCheck |
bool | m_IncludeErrors |
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 |
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 49 of file CTPPSPixelDataFormatter.h.
Definition at line 53 of file CTPPSPixelDataFormatter.h.
typedef std::vector<CTPPSPixelDigi> CTPPSPixelDataFormatter::DetDigis |
Definition at line 56 of file CTPPSPixelDataFormatter.h.
typedef std::vector<CTPPSPixelDataError> CTPPSPixelDataFormatter::DetErrors |
Definition at line 58 of file CTPPSPixelDataFormatter.h.
typedef std::map<uint32_t, DetErrors> CTPPSPixelDataFormatter::Errors |
Definition at line 59 of file CTPPSPixelDataFormatter.h.
typedef std::map<int, FEDRawData> CTPPSPixelDataFormatter::RawData |
Definition at line 55 of file CTPPSPixelDataFormatter.h.
typedef uint32_t CTPPSPixelDataFormatter::Word32 |
Definition at line 61 of file CTPPSPixelDataFormatter.h.
typedef uint64_t CTPPSPixelDataFormatter::Word64 |
Definition at line 62 of file CTPPSPixelDataFormatter.h.
CTPPSPixelDataFormatter::CTPPSPixelDataFormatter | ( | std::map< CTPPSPixelFramePosition, CTPPSPixelROCInfo > const & | mapping | ) |
Definition at line 32 of file CTPPSPixelDataFormatter.cc.
References m_ADC_mask, m_ADC_shift, m_DCOL_mask, m_DCOL_shift, m_IncludeErrors, m_LINK_mask, m_LINK_shift, m_PXID_mask, m_PXID_shift, m_ROC_mask, and m_ROC_shift.
|
private |
void CTPPSPixelDataFormatter::interpretRawData | ( | bool & | errorsInEvent, |
int | fedId, | ||
const FEDRawData & | data, | ||
Collection & | digis, | ||
Errors & | errors | ||
) |
check CRC bit
check headers
check trailers
data words
Definition at line 72 of file CTPPSPixelDataFormatter.cc.
References ecalMGPA::adc(), RPixErrorChecker::checkCRC(), RPixErrorChecker::checkHeader(), RPixErrorChecker::checkROC(), RPixErrorChecker::checkTrailer(), RPixErrorChecker::conversionError(), FEDRawData::data(), edm::DetSet< T >::data, RPixErrorChecker::dummyDetId, edm::DetSetVector< T >::find_or_insert(), RecoTauValidation_cfi::header, CTPPSPixelROCInfo::iD, InvalidLinkId, InvalidPixelId, InvalidROCId, LIKELY, LogTrace, m_ADC_mask, m_ADC_shift, m_DCOL_mask, m_DCOL_shift, m_ErrorCheck, m_LINK_mask, m_LINK_shift, m_Mapping, m_PXID_mask, m_PXID_shift, m_ROC_mask, m_ROC_shift, m_WordCounter, nWords(), print(), CTPPSPixelROC::rawId(), CTPPSPixelROCInfo::roc, FEDRawData::size(), CTPPSPixelROC::toGlobalfromDcol(), reco::Unknown, and UNLIKELY.
Referenced by nWords(), and CTPPSPixelRawToDigi::produce().
|
inline |
Definition at line 68 of file CTPPSPixelDataFormatter.h.
References data, l1t::stage2::layer2::fedId, interpretRawData(), and m_WordCounter.
Referenced by interpretRawData().
|
private |
Definition at line 192 of file CTPPSPixelDataFormatter.cc.
References str.
Referenced by interpretRawData().
void CTPPSPixelDataFormatter::setErrorStatus | ( | bool | theErrorStatus | ) |
Definition at line 65 of file CTPPSPixelDataFormatter.cc.
References m_ErrorCheck, m_IncludeErrors, and RPixErrorChecker::setErrorStatus().
Referenced by CTPPSPixelRawToDigi::produce().
|
private |
Definition at line 83 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 82 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 83 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 82 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 80 of file CTPPSPixelDataFormatter.h.
Referenced by interpretRawData(), and setErrorStatus().
|
private |
Definition at line 79 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and setErrorStatus().
|
private |
Definition at line 83 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 82 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 90 of file CTPPSPixelDataFormatter.h.
Referenced by interpretRawData().
|
private |
Definition at line 83 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 82 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 83 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 82 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
mutableprivate |
Definition at line 77 of file CTPPSPixelDataFormatter.h.
Referenced by interpretRawData(), and nWords().