#include <PixelDataFormatter.h>
Public Types | |
typedef edm::DetSetVector < PixelDigi > | Collection |
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) |
void | interpretRawData (bool &errorsInEvent, int fedId, const FEDRawData &data, Collection &digis, Errors &errors) |
int | nDigis () const |
int | nWords () const |
void | passFrameReverter (const SiPixelFrameReverter *reverter) |
PixelDataFormatter (const SiPixelFedCabling *map) | |
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 |
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 | |
int | allDetDigis |
const SiPixelQuality * | badPixelInfo |
bool | debug |
ErrorChecker | errorcheck |
int | hasDetDigis |
bool | includeErrors |
const std::set< unsigned int > * | modulesToUnpack |
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 53 of file PixelDataFormatter.h.
Definition at line 57 of file PixelDataFormatter.h.
typedef std::vector<PixelDigi> PixelDataFormatter::DetDigis |
Definition at line 60 of file PixelDataFormatter.h.
typedef std::vector<SiPixelRawDataError> PixelDataFormatter::DetErrors |
Definition at line 63 of file PixelDataFormatter.h.
typedef std::map<cms_uint32_t, DetDigis> PixelDataFormatter::Digis |
Definition at line 61 of file PixelDataFormatter.h.
typedef std::map<cms_uint32_t, DetErrors> PixelDataFormatter::Errors |
Definition at line 64 of file PixelDataFormatter.h.
typedef std::pair<DetDigis::const_iterator, DetDigis::const_iterator> PixelDataFormatter::Range |
Definition at line 62 of file PixelDataFormatter.h.
typedef std::map<int, FEDRawData> PixelDataFormatter::RawData |
Definition at line 59 of file PixelDataFormatter.h.
Definition at line 66 of file PixelDataFormatter.h.
Definition at line 67 of file PixelDataFormatter.h.
PixelDataFormatter::PixelDataFormatter | ( | const SiPixelFedCabling * | map | ) |
Definition at line 46 of file PixelDataFormatter.cc.
References allDetDigis, hitfit::char, hasDetDigis, includeErrors, and useQualityInfo.
|
private |
|
private |
Definition at line 276 of file PixelDataFormatter.cc.
References PixelDigi::adc(), PixelDigi::column(), sipixelobjects::ElectronicIndex::dcol, sipixelobjects::ElectronicIndex::link, LogDebug, print(), sipixelobjects::ElectronicIndex::pxid, sipixelobjects::ElectronicIndex::roc, PixelDigi::row(), theFrameReverter, theWordCounter, and SiPixelFrameReverter::toCabling().
Referenced by formatRawData().
|
private |
void PixelDataFormatter::formatRawData | ( | unsigned int | lvl1_ID, |
RawData & | fedRawData, | ||
const Digis & | digis | ||
) |
Definition at line 208 of file PixelDataFormatter.cc.
References allDetDigis, FEDRawData::data(), digi2word(), edm::hlt::Exception, hasDetDigis, i, LogDebug, LogTrace, print(), alignCSCRings::s, FEDTrailer::set(), FEDHeader::set(), ntuplemaker::status, and theDigiCounter.
void PixelDataFormatter::interpretRawData | ( | bool & | errorsInEvent, |
int | fedId, | ||
const FEDRawData & | data, | ||
Collection & | digis, | ||
Errors & | errors | ||
) |
Definition at line 88 of file PixelDataFormatter.cc.
References ecalMGPA::adc(), badPixelInfo, ErrorChecker::checkCRC(), ErrorChecker::checkHeader(), ErrorChecker::checkROC(), ErrorChecker::checkTrailer(), sipixelobjects::GlobalPixel::col, ErrorChecker::conversionError(), FEDRawData::data(), edm::DetSet< T >::data, errorcheck, edm::DetSetVector< T >::find_or_insert(), SiPixelQuality::IsRocBad(), likely, LogDebug, LogTrace, modulesToUnpack, nWords(), print(), sipixelobjects::GlobalPixel::row, FEDRawData::size(), theCablingTree, theWordCounter, SiPixelFrameConverter::toRoc(), unlikely, useQualityInfo, and sipixelobjects::LocalPixel::DcolPxid::valid().
|
inline |
|
inline |
Definition at line 77 of file PixelDataFormatter.h.
References theWordCounter.
Referenced by interpretRawData().
void PixelDataFormatter::passFrameReverter | ( | const SiPixelFrameReverter * | reverter | ) |
Definition at line 83 of file PixelDataFormatter.cc.
References theFrameReverter.
|
private |
Definition at line 352 of file PixelDataFormatter.cc.
References PixelDigi::adc(), PixelDigi::column(), and PixelDigi::row().
Referenced by digi2word(), formatRawData(), and interpretRawData().
|
private |
Definition at line 359 of file PixelDataFormatter.cc.
void PixelDataFormatter::setErrorStatus | ( | bool | ErrorStatus | ) |
Definition at line 66 of file PixelDataFormatter.cc.
References errorcheck, includeErrors, and ErrorChecker::setErrorStatus().
void PixelDataFormatter::setModulesToUnpack | ( | const std::set< unsigned int > * | moduleIds | ) |
Definition at line 78 of file PixelDataFormatter.cc.
References modulesToUnpack.
void PixelDataFormatter::setQualityStatus | ( | bool | QualityStatus, |
const SiPixelQuality * | QualityInfo | ||
) |
Definition at line 72 of file PixelDataFormatter.cc.
References badPixelInfo, and useQualityInfo.
|
private |
Definition at line 302 of file PixelDataFormatter.cc.
References ecalMGPA::adc(), badPixelInfo, sipixelobjects::DetectorIndex::col, sipixelobjects::ElectronicIndex::dcol, debug, SiPixelFedCabling::findItem(), sipixelobjects::PixelROC::idInDetUnit(), SiPixelQuality::IsRocBad(), sipixelobjects::ElectronicIndex::link, LogTrace, modulesToUnpack, cmsHarvester::path, sipixelobjects::ElectronicIndex::pxid, sipixelobjects::DetectorIndex::rawId, sipixelobjects::ElectronicIndex::roc, sipixelobjects::LocalPixel::rocCol(), sipixelobjects::LocalPixel::rocRow(), sipixelobjects::DetectorIndex::row, ntuplemaker::status, theCablingTree, theDigiCounter, and SiPixelFrameConverter::toDetector().
|
private |
Definition at line 96 of file PixelDataFormatter.h.
Referenced by formatRawData(), and PixelDataFormatter().
|
private |
Definition at line 90 of file PixelDataFormatter.h.
Referenced by interpretRawData(), setQualityStatus(), and word2digi().
|
private |
Definition at line 95 of file PixelDataFormatter.h.
Referenced by rrapi.RRApi::dprint(), pkg.AbstractPkg::generate(), rrapi.RRApi::get(), pkg.AbstractPkg::get_kwds(), word2digi(), and pkg.AbstractPkg::write().
|
private |
Definition at line 98 of file PixelDataFormatter.h.
Referenced by interpretRawData(), and setErrorStatus().
|
private |
Definition at line 97 of file PixelDataFormatter.h.
Referenced by formatRawData(), and PixelDataFormatter().
|
private |
Definition at line 93 of file PixelDataFormatter.h.
Referenced by PixelDataFormatter(), and setErrorStatus().
|
private |
Definition at line 91 of file PixelDataFormatter.h.
Referenced by interpretRawData(), setModulesToUnpack(), and word2digi().
|
private |
Definition at line 88 of file PixelDataFormatter.h.
Referenced by interpretRawData(), and word2digi().
|
mutableprivate |
Definition at line 84 of file PixelDataFormatter.h.
Referenced by formatRawData(), nDigis(), and word2digi().
|
private |
Definition at line 89 of file PixelDataFormatter.h.
Referenced by digi2word(), and passFrameReverter().
|
mutableprivate |
Definition at line 85 of file PixelDataFormatter.h.
Referenced by digi2word(), interpretRawData(), and nWords().
|
private |
Definition at line 94 of file PixelDataFormatter.h.
Referenced by interpretRawData(), PixelDataFormatter(), and setQualityStatus().