#include <PixelDataFormatter.h>
Public Types | |
typedef std::map< cms_uint32_t, DetBadChannels > | BadChannels |
typedef edm::DetSetVector< PixelDigi > | Collection |
typedef std::vector< PixelFEDChannel > | DetBadChannels |
typedef std::vector< PixelDigi > | DetDigis |
typedef std::vector< SiPixelRawDataError > | DetErrors |
typedef std::map< cms_uint32_t, DetDigis > | Digis |
typedef std::map< cms_uint32_t, DetErrors > | Errors |
typedef std::pair< DetDigis::const_iterator, DetDigis::const_iterator > | Range |
typedef std::map< int, FEDRawData > | RawData |
typedef cms_uint32_t | Word32 |
typedef cms_uint64_t | Word64 |
Public Member Functions | |
void | formatRawData (unsigned int lvl1_ID, RawData &fedRawData, const Digis &digis, const BadChannels &badChannels) |
void | interpretRawData (bool &errorsInEvent, int fedId, const FEDRawData &data, Collection &digis, Errors &errors) |
cms_uint32_t | linkId (cms_uint32_t word32) |
int | nDigis () const |
int | nWords () const |
void | passFrameReverter (const SiPixelFrameReverter *reverter) |
PixelDataFormatter (const SiPixelFedCabling *map, bool phase1=false) | |
void | setErrorStatus (bool ErrorStatus) |
void | setModulesToUnpack (const std::set< unsigned int > *moduleIds) |
void | setQualityStatus (bool QualityStatus, const SiPixelQuality *QualityInfo) |
Private Member Functions | |
int | checkError (const Word32 &data) const |
int | digi2word (cms_uint32_t detId, const PixelDigi &digi, std::map< int, std::vector< Word32 > > &words) const |
int | digi2wordPhase1Layer1 (cms_uint32_t detId, const PixelDigi &digi, std::map< int, std::vector< Word32 > > &words) const |
cms_uint32_t | errorDetId (const SiPixelFrameConverter *converter, int fedId, int errorType, const Word32 &word) const |
std::string | print (const PixelDigi &digi) const |
std::string | print (const Word64 &word) const |
int | word2digi (const int fedId, const SiPixelFrameConverter *converter, const bool includeError, const bool useQuality, const Word32 &word, Digis &digis) const |
Private Attributes | |
Word32 | ADC_mask |
int | ADC_shift |
int | allDetDigis |
const SiPixelQuality * | badPixelInfo |
Word32 | COL_mask |
int | COL_shift |
Word32 | DCOL_mask |
int | DCOL_shift |
bool | debug |
std::unique_ptr< ErrorCheckerBase > | errorcheck |
int | hasDetDigis |
bool | includeErrors |
Word32 | LINK_mask |
int | LINK_shift |
int | maxROCIndex |
const std::set< unsigned int > * | modulesToUnpack |
bool | phase1 |
Word32 | PXID_mask |
int | PXID_shift |
Word32 | ROC_mask |
int | ROC_shift |
Word32 | ROW_mask |
int | ROW_shift |
SiPixelFedCabling const * | theCablingTree |
int | theDigiCounter |
const SiPixelFrameReverter * | theFrameReverter |
int | theWordCounter |
bool | useQualityInfo |
Transforms Pixel raw data of a given FED to orca digi and vice versa.
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 PixelDataFormatter interpret/format ONLY detector data words (not FED headers or trailer, which are treated elsewhere).
Definition at line 57 of file PixelDataFormatter.h.
typedef std::map<cms_uint32_t, DetBadChannels> PixelDataFormatter::BadChannels |
Definition at line 68 of file PixelDataFormatter.h.
Definition at line 59 of file PixelDataFormatter.h.
typedef std::vector<PixelFEDChannel> PixelDataFormatter::DetBadChannels |
Definition at line 67 of file PixelDataFormatter.h.
typedef std::vector<PixelDigi> PixelDataFormatter::DetDigis |
Definition at line 62 of file PixelDataFormatter.h.
typedef std::vector<SiPixelRawDataError> PixelDataFormatter::DetErrors |
Definition at line 65 of file PixelDataFormatter.h.
typedef std::map<cms_uint32_t, DetDigis> PixelDataFormatter::Digis |
Definition at line 63 of file PixelDataFormatter.h.
typedef std::map<cms_uint32_t, DetErrors> PixelDataFormatter::Errors |
Definition at line 66 of file PixelDataFormatter.h.
typedef std::pair<DetDigis::const_iterator, DetDigis::const_iterator> PixelDataFormatter::Range |
Definition at line 64 of file PixelDataFormatter.h.
typedef std::map<int, FEDRawData> PixelDataFormatter::RawData |
Definition at line 61 of file PixelDataFormatter.h.
Definition at line 70 of file PixelDataFormatter.h.
Definition at line 71 of file PixelDataFormatter.h.
PixelDataFormatter::PixelDataFormatter | ( | const SiPixelFedCabling * | map, |
bool | phase1 = false |
||
) |
Definition at line 57 of file PixelDataFormatter.cc.
References ADC_mask, ADC_shift, allDetDigis, COL_mask, COL_shift, DCOL_mask, DCOL_shift, errorcheck, hasDetDigis, includeErrors, LINK_mask, LINK_shift, maxROCIndex, phase1, PXID_mask, PXID_shift, ROC_mask, ROC_shift, ROW_mask, ROW_shift, and useQualityInfo.
|
private |
|
private |
Definition at line 405 of file PixelDataFormatter.cc.
References PixelDigi::adc(), ADC_shift, PixelDigi::column(), sipixelobjects::ElectronicIndex::dcol, DCOL_shift, hgcalTestNeighbor_cfi::detector, l1tstage2_dqm_sourceclient-live_cfg::fedId, sipixelobjects::ElectronicIndex::link, LINK_shift, LogDebug, print(), sipixelobjects::ElectronicIndex::pxid, PXID_shift, sipixelobjects::ElectronicIndex::roc, ROC_shift, PixelDigi::row(), theFrameReverter, theWordCounter, and SiPixelFrameReverter::toCabling().
Referenced by formatRawData().
|
private |
Definition at line 428 of file PixelDataFormatter.cc.
References PixelDigi::adc(), ADC_shift, cuy::col, COL_shift, PixelDigi::column(), sipixelobjects::ElectronicIndex::dcol, hgcalTestNeighbor_cfi::detector, l1tstage2_dqm_sourceclient-live_cfg::fedId, sipixelobjects::ElectronicIndex::link, LINK_shift, LogDebug, phase1PixelTopology::numRowsInRoc, print(), sipixelobjects::ElectronicIndex::pxid, sipixelobjects::ElectronicIndex::roc, ROC_shift, PixelDigi::row(), ROW_shift, theFrameReverter, theWordCounter, and SiPixelFrameReverter::toCabling().
Referenced by formatRawData().
|
private |
void PixelDataFormatter::formatRawData | ( | unsigned int | lvl1_ID, |
RawData & | fedRawData, | ||
const Digis & | digis, | ||
const BadChannels & | badChannels | ||
) |
Definition at line 301 of file PixelDataFormatter.cc.
References allDetDigis, Reference_intrackfit_cff::barrel, digi2word(), digi2wordPhase1Layer1(), Exception, l1tstage2_dqm_sourceclient-live_cfg::fedId, l1t_dqm_sourceclient-live_cfg::fedRawData, hasDetDigis, mps_fire::i, PixelModuleName::isBarrel(), LINK_shift, linkId(), LogDebug, LogTrace, phase1, print(), l1tstage2_dqm_sourceclient-live_cfg::rawData, ROC_shift, alignCSCRings::s, FEDHeader::set(), FEDTrailer::set(), theDigiCounter, and theWordCounter.
void PixelDataFormatter::interpretRawData | ( | bool & | errorsInEvent, |
int | fedId, | ||
const FEDRawData & | data, | ||
Collection & | digis, | ||
Errors & | errors | ||
) |
Definition at line 125 of file PixelDataFormatter.cc.
References ecalMGPA::adc(), ADC_mask, ADC_shift, badPixelInfo, Reference_intrackfit_cff::barrel, sipixelobjects::GlobalPixel::col, cuy::col, COL_mask, COL_shift, edm::DetSet< T >::data, DCOL_mask, DCOL_shift, errorcheck, funct::false, l1tstage2_dqm_sourceclient-live_cfg::fedId, edm::DetSetVector< T >::find_or_insert(), RecoTauValidation_cfi::header, sipixelobjects::PixelROC::idInDetUnit(), PixelModuleName::isBarrel(), SiPixelQuality::IsRocBad(), LIKELY, MainPageGenerator::link, LINK_mask, LINK_shift, DTRecHitClients_cfi::local, LogDebug, LogTrace, maxROCIndex, modulesToUnpack, nWords(), phase1, print(), PXID_mask, PXID_shift, l1tstage2_dqm_sourceclient-live_cfg::rawData, sipixelobjects::PixelROC::rawId(), PixelMapPlotter::roc, ROC_mask, ROC_shift, sipixelobjects::GlobalPixel::row, ROW_mask, ROW_shift, theCablingTree, theWordCounter, sipixelobjects::PixelROC::toGlobal(), UNLIKELY, useQualityInfo, sipixelobjects::LocalPixel::RocRowCol::valid(), and sipixelobjects::LocalPixel::DcolPxid::valid().
|
inline |
Definition at line 87 of file PixelDataFormatter.h.
References LINK_mask, and LINK_shift.
Referenced by formatRawData().
|
inline |
|
inline |
Definition at line 81 of file PixelDataFormatter.h.
References theWordCounter.
Referenced by interpretRawData().
void PixelDataFormatter::passFrameReverter | ( | const SiPixelFrameReverter * | reverter | ) |
Definition at line 123 of file PixelDataFormatter.cc.
References theFrameReverter.
Referenced by SiPixelDigiToRaw::produce().
|
private |
Definition at line 516 of file PixelDataFormatter.cc.
References PixelDigi::adc(), PixelDigi::column(), PixelDigi::row(), and str.
Referenced by digi2word(), digi2wordPhase1Layer1(), formatRawData(), and interpretRawData().
|
private |
void PixelDataFormatter::setErrorStatus | ( | bool | ErrorStatus | ) |
Definition at line 111 of file PixelDataFormatter.cc.
References errorcheck, and includeErrors.
Referenced by SiPixelRawToDigi::produce().
void PixelDataFormatter::setModulesToUnpack | ( | const std::set< unsigned int > * | moduleIds | ) |
void PixelDataFormatter::setQualityStatus | ( | bool | QualityStatus, |
const SiPixelQuality * | QualityInfo | ||
) |
Definition at line 116 of file PixelDataFormatter.cc.
References badPixelInfo, and useQualityInfo.
|
private |
Definition at line 457 of file PixelDataFormatter.cc.
References ecalMGPA::adc(), ADC_mask, ADC_shift, badPixelInfo, sipixelobjects::DetectorIndex::col, sipixelobjects::ElectronicIndex::dcol, DCOL_mask, DCOL_shift, debug, l1tstage2_dqm_sourceclient-live_cfg::fedId, SiPixelFedCabling::findItem(), SiPixelQuality::IsRocBad(), sipixelobjects::ElectronicIndex::link, LINK_mask, LINK_shift, DTRecHitClients_cfi::local, LogTrace, modulesToUnpack, castor_dqm_sourceclient_file_cfg::path, muonClassificationByHits_cfi::pixel, sipixelobjects::ElectronicIndex::pxid, PXID_mask, PXID_shift, sipixelobjects::DetectorIndex::rawId, sipixelobjects::ElectronicIndex::roc, PixelMapPlotter::roc, ROC_mask, ROC_shift, sipixelobjects::DetectorIndex::row, mps_update::status, theCablingTree, theDigiCounter, and bysipixelclustmulteventfilter_cfi::useQuality.
|
private |
Definition at line 108 of file PixelDataFormatter.h.
Referenced by interpretRawData(), PixelDataFormatter(), and word2digi().
|
private |
Definition at line 107 of file PixelDataFormatter.h.
Referenced by digi2word(), digi2wordPhase1Layer1(), interpretRawData(), PixelDataFormatter(), and word2digi().
|
private |
Definition at line 101 of file PixelDataFormatter.h.
Referenced by formatRawData(), and PixelDataFormatter().
|
private |
Definition at line 95 of file PixelDataFormatter.h.
Referenced by interpretRawData(), setQualityStatus(), and word2digi().
|
private |
Definition at line 108 of file PixelDataFormatter.h.
Referenced by interpretRawData(), and PixelDataFormatter().
|
private |
Definition at line 107 of file PixelDataFormatter.h.
Referenced by digi2wordPhase1Layer1(), interpretRawData(), and PixelDataFormatter().
|
private |
Definition at line 108 of file PixelDataFormatter.h.
Referenced by interpretRawData(), PixelDataFormatter(), and word2digi().
|
private |
Definition at line 107 of file PixelDataFormatter.h.
Referenced by digi2word(), interpretRawData(), PixelDataFormatter(), and word2digi().
|
private |
Definition at line 100 of file PixelDataFormatter.h.
Referenced by rrapi.RRApi::dprint(), pkg.AbstractPkg::generate(), rrapi.RRApi::get(), pkg.AbstractPkg::get_kwds(), runTauIdMVA.TauIDEmbedder::loadMVA_WPs_run2_2017(), runTauIdMVA.TauIDEmbedder::runTauID(), word2digi(), and pkg.AbstractPkg::write().
|
private |
Definition at line 103 of file PixelDataFormatter.h.
Referenced by interpretRawData(), PixelDataFormatter(), and setErrorStatus().
|
private |
Definition at line 102 of file PixelDataFormatter.h.
Referenced by formatRawData(), and PixelDataFormatter().
|
private |
Definition at line 98 of file PixelDataFormatter.h.
Referenced by PixelDataFormatter(), and setErrorStatus().
|
private |
Definition at line 108 of file PixelDataFormatter.h.
Referenced by interpretRawData(), linkId(), PixelDataFormatter(), and word2digi().
|
private |
Definition at line 107 of file PixelDataFormatter.h.
Referenced by digi2word(), digi2wordPhase1Layer1(), formatRawData(), interpretRawData(), linkId(), PixelDataFormatter(), and word2digi().
|
private |
Definition at line 109 of file PixelDataFormatter.h.
Referenced by interpretRawData(), and PixelDataFormatter().
|
private |
Definition at line 96 of file PixelDataFormatter.h.
Referenced by interpretRawData(), setModulesToUnpack(), and word2digi().
|
private |
Definition at line 110 of file PixelDataFormatter.h.
Referenced by formatRawData(), interpretRawData(), and PixelDataFormatter().
|
private |
Definition at line 108 of file PixelDataFormatter.h.
Referenced by interpretRawData(), PixelDataFormatter(), and word2digi().
|
private |
Definition at line 107 of file PixelDataFormatter.h.
Referenced by digi2word(), interpretRawData(), PixelDataFormatter(), and word2digi().
|
private |
Definition at line 108 of file PixelDataFormatter.h.
Referenced by interpretRawData(), PixelDataFormatter(), and word2digi().
|
private |
Definition at line 107 of file PixelDataFormatter.h.
Referenced by digi2word(), digi2wordPhase1Layer1(), formatRawData(), interpretRawData(), PixelDataFormatter(), and word2digi().
|
private |
Definition at line 108 of file PixelDataFormatter.h.
Referenced by interpretRawData(), and PixelDataFormatter().
|
private |
Definition at line 107 of file PixelDataFormatter.h.
Referenced by digi2wordPhase1Layer1(), interpretRawData(), and PixelDataFormatter().
|
private |
Definition at line 93 of file PixelDataFormatter.h.
Referenced by interpretRawData(), and word2digi().
|
mutableprivate |
Definition at line 90 of file PixelDataFormatter.h.
Referenced by formatRawData(), nDigis(), and word2digi().
|
private |
Definition at line 94 of file PixelDataFormatter.h.
Referenced by digi2word(), digi2wordPhase1Layer1(), and passFrameReverter().
|
mutableprivate |
Definition at line 91 of file PixelDataFormatter.h.
Referenced by digi2word(), digi2wordPhase1Layer1(), formatRawData(), interpretRawData(), and nWords().
|
private |
Definition at line 99 of file PixelDataFormatter.h.
Referenced by interpretRawData(), PixelDataFormatter(), and setQualityStatus().