#include <CTPPSPixelDataFormatter.h>
Public Types | |
typedef edm::DetSetVector< CTPPSPixelDigi > | Collection |
typedef std::vector< CTPPSPixelDigi > | DetDigis |
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) |
int | nWords () const |
Private Member Functions | |
int | checkError (const Word32 &data) const |
std::string | print (const Word64 &word) const |
Private Attributes | |
RPixErrorChecker | errorcheck |
Word32 | m_ADC_mask |
int | m_ADC_shift |
Word32 | m_DCOL_mask |
int | m_DCOL_shift |
Word32 | m_LINK_mask |
int | m_LINK_shift |
Word32 | m_PXID_mask |
int | m_PXID_shift |
Word32 | m_ROC_mask |
int | m_ROC_shift |
const std::map< CTPPSPixelFramePosition, CTPPSPixelROCInfo > & | mapping_ |
int | maxROCIndex |
int | theWordCounter |
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 47 of file CTPPSPixelDataFormatter.h.
Definition at line 51 of file CTPPSPixelDataFormatter.h.
typedef std::vector<CTPPSPixelDigi> CTPPSPixelDataFormatter::DetDigis |
Definition at line 54 of file CTPPSPixelDataFormatter.h.
typedef std::map<int, FEDRawData> CTPPSPixelDataFormatter::RawData |
Definition at line 53 of file CTPPSPixelDataFormatter.h.
typedef uint32_t CTPPSPixelDataFormatter::Word32 |
Definition at line 56 of file CTPPSPixelDataFormatter.h.
typedef uint64_t CTPPSPixelDataFormatter::Word64 |
Definition at line 57 of file CTPPSPixelDataFormatter.h.
CTPPSPixelDataFormatter::CTPPSPixelDataFormatter | ( | std::map< CTPPSPixelFramePosition, CTPPSPixelROCInfo > const & | mapping | ) |
Definition at line 27 of file CTPPSPixelDataFormatter.cc.
References m_ADC_mask, m_ADC_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, and maxROCIndex.
|
private |
void CTPPSPixelDataFormatter::interpretRawData | ( | bool & | errorsInEvent, |
int | fedId, | ||
const FEDRawData & | data, | ||
Collection & | digis | ||
) |
check CRC bit
check headers
check trailers
data words
Definition at line 60 of file CTPPSPixelDataFormatter.cc.
References ecalMGPA::adc(), RPixErrorChecker::checkCRC(), RPixErrorChecker::checkHeader(), RPixErrorChecker::checkROC(), RPixErrorChecker::checkTrailer(), FEDRawData::data(), edm::DetSet< T >::data, errorcheck, edm::DetSetVector< T >::find_or_insert(), RecoTauValidation_cfi::header, CTPPSPixelROCInfo::iD, likely, LogTrace, m_ADC_mask, m_ADC_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, mapping_, maxROCIndex, nWords(), print(), CTPPSPixelROC::rawId(), CTPPSPixelROCInfo::roc, FEDRawData::size(), theWordCounter, CTPPSPixelROC::toGlobalfromDcol(), and unlikely.
Referenced by nWords().
|
inline |
Definition at line 61 of file CTPPSPixelDataFormatter.h.
References data, l1t::stage2::layer2::fedId, interpretRawData(), and theWordCounter.
Referenced by interpretRawData().
|
private |
Definition at line 168 of file CTPPSPixelDataFormatter.cc.
References harvestTrackValidationPlots::str.
Referenced by interpretRawData().
|
private |
Definition at line 71 of file CTPPSPixelDataFormatter.h.
Referenced by interpretRawData().
|
private |
Definition at line 74 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 73 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 74 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 73 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 74 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 73 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 74 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 73 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 74 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 73 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
private |
Definition at line 82 of file CTPPSPixelDataFormatter.h.
Referenced by interpretRawData().
|
private |
Definition at line 75 of file CTPPSPixelDataFormatter.h.
Referenced by CTPPSPixelDataFormatter(), and interpretRawData().
|
mutableprivate |
Definition at line 69 of file CTPPSPixelDataFormatter.h.
Referenced by interpretRawData(), and nWords().