ATLAS Offline Software
|
Athena Algorithm Tool that provides conversion from SCT RDO to ROD format Bytestream. More...
#include <SCT_RodEncoder.h>
Public Member Functions | |
SCT_RodEncoder (const std::string &type, const std::string &name, const IInterface *parent) | |
Constructor. More... | |
virtual | ~SCT_RodEncoder ()=default |
Destructor. More... | |
virtual StatusCode | initialize () override |
Initialize. More... | |
virtual StatusCode | finalize () override |
Finalize. More... | |
virtual void | fillROD (std::vector< uint32_t > &vec32Data, const uint32_t &robID, const std::vector< const SCT_RDORawData * > &vecRDOs) const override |
Main Convert method. More... | |
Private Types | |
enum | ErrorWords { TIMEOUT_ERR =(1<<11), L1_ERR =(1<<10), BCID_ERR =(1<<9), PREAMBLE_ERR =(1<<12), FORMATTER_ERR =12, TRAILER_ERR =(1<<12), NULL_HEADER_ERR =0, HEADER_TRAILER_ERR =(1<<11), TRAILER_OVFLW_ERR =(1<<10), ABCD_ERR =0, RAWDATA_ERR =(3<<13), NULL_TRAILER_ERR =0 } |
Definitions of enum error words to be retrived from SCT_ByteStreamErrorSvc in fillROD(...) method. More... | |
Private Member Functions | |
void | encodeData (const std::vector< int > &vecTimeBins, std::vector< uint16_t > &vec16Words, const SCT_RDORawData *rdo, const int &groupSize, const int &strip) const |
Method to encode RDO data to vector of 16 bin words. More... | |
void | packFragments (std::vector< uint16_t > &vec16Words, std::vector< uint32_t > &vec32Words) const |
Method to pack vector of 16 bit words intto a vector of 32 bit words. More... | |
uint32_t | set32Bits (const unsigned short int *arr16Words, const unsigned short int *position, const unsigned short int &numWords) const |
@breif Method to set pairs of 16 bit words to a 32 bit word. More... | |
int | side (const SCT_RDORawData *rdo) const |
Get the side info from the RDO. More... | |
int | getTimeBin (const SCT_RDORawData *rdo) const |
Get the time bin info from the RDO. More... | |
int | getStrip (const SCT_RDORawData *rdo) const |
Get the strip number info from the RDO. More... | |
Identifier | offlineID (const SCT_RDORawData *rdo) const |
Get the offline Identifier from the RDO. More... | |
uint32_t | onlineID (const SCT_RDORawData *rdo) const |
Get the online Identifier from the RDO. More... | |
int | getRODLink (const SCT_RDORawData *rdo) const |
Get the ROD link number info in the RDO header data. More... | |
uint16_t | getHeaderUsingRDO (const SCT_RDORawData *rdo) const |
Get the 16-bit word for a header for a hit. More... | |
uint16_t | getHeaderUsingHash (const IdentifierHash &linkHash, const int &errorWord) const |
Get the 16-bit word for a header for a link with a ByteStream error. More... | |
uint16_t | getTrailer (const int &errorWord) const |
Get the 16-bit word for a trailer, with or without ByteStream errors. More... | |
void | addHeadersWithErrors (const uint32_t &robID, const std::set< IdentifierHash > *errors, const ErrorWords &errType, std::vector< uint16_t > &vec16Data) const |
Add header with errors for ROB to the vector of 16 bit words. More... | |
void | addTrailersWithErrors (const uint32_t &robID, const std::set< IdentifierHash > *errors, const ErrorWords &errType, std::vector< uint16_t > &vec16Data) const |
Add trailers with errors for ROB to the vector of 16 bit words. More... | |
void | addSpecificErrors (const uint32_t &robID, const std::set< IdentifierHash > *errors, const ErrorWords &errType, std::vector< uint16_t > &vec16Data) const |
Add specific errors for ROB to the vector of 16 bit words. More... | |
Private Attributes | |
ToolHandle< ISCT_ByteStreamErrorsTool > | m_bsErrTool |
Tool that keeps track of modules that give rise to errors in the bytestream. More... | |
ToolHandle< ISCT_CablingTool > | m_cabling |
Providing mappings of online and offline identifiers and also serial numbers. More... | |
const SCT_ID * | m_sctID {nullptr} |
Identifier helper class for the SCT subdetector that creates compact Identifier objects and IdentifierHash or hash IDs. More... | |
BooleanProperty | m_condensed |
Boolean used to determine if fillROD(...) should use Condensed or Expanded mode when decoding. More... | |
std::set< Identifier > | m_swapModuleID {} |
Swap Module identifier, set by SCTRawContByteStreamTool. More... | |
Athena Algorithm Tool that provides conversion from SCT RDO to ROD format Bytestream.
This class inherits from AthAlgTool and ISCT_RodEncoder.
Note from Jan 09: Make SCT_RodEncoder an AlgTool again, of which there is one instance per job, rather than the lightweight class of which there was one instance per ROD. This change is motivated by the changes to write ByteStream errors back into the bytestream, as we don't want to access the ByteStreamErrorsSvc 90 times per event if we can avoid it..
Definition at line 40 of file SCT_RodEncoder.h.
|
private |
Definitions of enum error words to be retrived from SCT_ByteStreamErrorSvc in fillROD(...) method.
Enumerator | |
---|---|
TIMEOUT_ERR | |
L1_ERR | |
BCID_ERR | |
PREAMBLE_ERR | |
FORMATTER_ERR | |
TRAILER_ERR | |
NULL_HEADER_ERR | |
HEADER_TRAILER_ERR | |
TRAILER_OVFLW_ERR | |
ABCD_ERR | |
RAWDATA_ERR | |
NULL_TRAILER_ERR |
Definition at line 73 of file SCT_RodEncoder.h.
SCT_RodEncoder::SCT_RodEncoder | ( | const std::string & | type, |
const std::string & | name, | ||
const IInterface * | parent | ||
) |
Constructor.
Definition at line 45 of file SCT_RodEncoder.cxx.
|
virtualdefault |
Destructor.
|
private |
Add header with errors for ROB to the vector of 16 bit words.
Definition at line 415 of file SCT_RodEncoder.cxx.
|
private |
Add specific errors for ROB to the vector of 16 bit words.
Definition at line 444 of file SCT_RodEncoder.cxx.
|
private |
Add trailers with errors for ROB to the vector of 16 bit words.
Definition at line 430 of file SCT_RodEncoder.cxx.
|
private |
Method to encode RDO data to vector of 16 bin words.
Methods used by main convert methods fillROD(...).
vecTimeBins | Vector of time bins for RDOs. |
vec16Words | Vector of 16 bit words to filled from encoded RDO data. |
rdo | RDO raw data object to be encoded. |
groupSize | Group size info from the RDO. |
strip | Strip number info from the RDO. |
Definition at line 243 of file SCT_RodEncoder.cxx.
|
overridevirtual |
Main Convert method.
Converts SCT RDO to a vector of 32 bit words. Starts by retrieving and collecting errors, then loops through RDO's and decode them to 16 bit words, and then finally it packs the 16 bit word into 32 bit words vector.
vec32Data | Vector of 32 bit words to be filled with encoded RDOs from the SCT. |
robID | ID of the current readout buffer (ROB). |
vecRDOs | Vector containing the RDOs to be coverted to vector of 32 bit words. |
Definition at line 91 of file SCT_RodEncoder.cxx.
|
overridevirtual |
Finalize.
Definition at line 84 of file SCT_RodEncoder.cxx.
|
private |
Get the 16-bit word for a header for a link with a ByteStream error.
Definition at line 400 of file SCT_RodEncoder.cxx.
|
private |
Get the 16-bit word for a header for a hit.
Definition at line 393 of file SCT_RodEncoder.cxx.
|
private |
Get the ROD link number info in the RDO header data.
Definition at line 368 of file SCT_RodEncoder.cxx.
|
private |
Get the strip number info from the RDO.
Definition at line 349 of file SCT_RodEncoder.cxx.
|
private |
|
private |
Get the 16-bit word for a trailer, with or without ByteStream errors.
Definition at line 407 of file SCT_RodEncoder.cxx.
|
overridevirtual |
Initialize.
Definition at line 53 of file SCT_RodEncoder.cxx.
|
private |
|
private |
|
private |
Method to pack vector of 16 bit words intto a vector of 32 bit words.
Method us used by private method encodeData(...).
vec16Words | Vector containing 16 bit words. |
vec32Words | Vector for 32 bit words to be packed. |
Definition at line 304 of file SCT_RodEncoder.cxx.
|
private |
@breif Method to set pairs of 16 bit words to a 32 bit word.
Function used by the packFragments(...) method.
arr16Words | Pointer to array containing a pair of 16 bit words. |
position | Pointer to an array that gives the 32 bit starting positions of the 16 bit words and corresponding to arr16Words. |
numWords | Number of word to be set to a 32 bit word. |
Definition at line 332 of file SCT_RodEncoder.cxx.
|
private |
|
private |
Tool that keeps track of modules that give rise to errors in the bytestream.
Definition at line 163 of file SCT_RodEncoder.h.
|
private |
Providing mappings of online and offline identifiers and also serial numbers.
Definition at line 169 of file SCT_RodEncoder.h.
|
private |
Boolean used to determine if fillROD(...) should use Condensed or Expanded mode when decoding.
Definition at line 179 of file SCT_RodEncoder.h.
Identifier helper class for the SCT subdetector that creates compact Identifier objects and IdentifierHash or hash IDs.
Also allows decoding of these IDs.
Definition at line 176 of file SCT_RodEncoder.h.
|
private |
Swap Module identifier, set by SCTRawContByteStreamTool.
Definition at line 185 of file SCT_RodEncoder.h.