Athena Algorithm Tool that provides conversion from ITkStrips RDO to ROD format Bytestream.
More...
#include <ITkStripsRodEncoder.h>
Athena Algorithm Tool that provides conversion from ITkStrips RDO to ROD format Bytestream.
Definition at line 30 of file ITkStripsRodEncoder.h.
◆ ITkStripsRodEncoder()
ITkStripsRodEncoder::ITkStripsRodEncoder |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~ITkStripsRodEncoder()
virtual ITkStripsRodEncoder::~ITkStripsRodEncoder |
( |
| ) |
|
|
virtualdefault |
◆ encodeData()
void ITkStripsRodEncoder::encodeData |
( |
const std::vector< int > & |
vecTimeBins, |
|
|
std::vector< uint16_t > & |
vec16Words, |
|
|
const SCT_RDORawData * |
rdo, |
|
|
const int & |
groupSize, |
|
|
const int & |
strip |
|
) |
| const |
|
private |
Method to encode RDO data to vector of 16 bin words.
Methods used by main convert methods fillROD(...).
- Parameters
-
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. |
code to be filled here
Definition at line 76 of file ITkStripsRodEncoder.cxx.
◆ fillROD()
void ITkStripsRodEncoder::fillROD |
( |
std::vector< uint32_t > & |
vec32Data, |
|
|
const uint32_t & |
robID, |
|
|
const std::vector< const SCT_RDORawData * > & |
vecRDOs |
|
) |
| const |
|
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.
- Parameters
-
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 68 of file ITkStripsRodEncoder.cxx.
◆ finalize()
StatusCode ITkStripsRodEncoder::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getHeaderUsingHash()
◆ getHeaderUsingRDO()
◆ getRODLink()
◆ getStrip()
◆ getTimeBin()
Get the time bin info from the RDO.
◆ getTrailer()
uint16_t ITkStripsRodEncoder::getTrailer |
( |
const int & |
errorWord | ) |
const |
|
private |
◆ initialize()
StatusCode ITkStripsRodEncoder::initialize |
( |
| ) |
|
|
overridevirtual |
Initialize.
Definition at line 44 of file ITkStripsRodEncoder.cxx.
55 if (sctDetElement->swapPhiReadoutDirection()) {
59 return StatusCode::SUCCESS;
◆ offlineID()
◆ onlineID()
◆ packFragments()
void ITkStripsRodEncoder::packFragments |
( |
std::vector< uint16_t > & |
vec16Words, |
|
|
std::vector< uint32_t > & |
vec32Words |
|
) |
| const |
|
private |
Method to pack vector of 16 bit words intto a vector of 32 bit words.
Method us used by private method encodeData(...).
- Parameters
-
vec16Words | Vector containing 16 bit words. |
vec32Words | Vector for 32 bit words to be packed. |
Definition at line 84 of file ITkStripsRodEncoder.cxx.
86 int num16Words{
static_cast<int>(vec16Words.size())};
87 if (isOdd(num16Words)) {
89 vec16Words.push_back(0x4000);
93 const unsigned short int numWords{2};
94 const unsigned short int position[numWords]{0, 16};
95 unsigned short int arr16Words[numWords]{0, 0};
96 for (
int i{0};
i<num16Words;
i += numWords) {
97 arr16Words[
i%numWords] = vec16Words[
i+1];
98 arr16Words[(
i+1)%numWords] = vec16Words[
i];
100 vec32Words.push_back(uint32Word);
101 #ifdef ITkStripsDEBUG
102 ATH_MSG_INFO(
"SCT encoder -> PackFragments: Output rod 0x"<<std::hex<<uint32Word<<std::dec);
◆ set32Bits()
uint32_t ITkStripsRodEncoder::set32Bits |
( |
const unsigned short int * |
arr16Words, |
|
|
const unsigned short int * |
position, |
|
|
const unsigned short int & |
numWords |
|
) |
| const |
|
private |
@breif Method to set pairs of 16 bit words to a 32 bit word.
Function used by the packFragments(...) method.
- Parameters
-
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 110 of file ITkStripsRodEncoder.cxx.
117 uint16Word =
static_cast<uint32_t>(*(arr16Words+
i));
119 uint32Word |= (uint16Word<<
pos);
◆ side()
◆ m_cabling
Initial value:{this,
"SCT_CablingTool",
"SCT_CablingTool",
"Tool to retrieve ITkStrips Cabling"}
Providing mappings of online and offline identifiers and also serial numbers.
Definition at line 129 of file ITkStripsRodEncoder.h.
◆ m_condensed
BooleanProperty ITkStripsRodEncoder::m_condensed {this, "CondensedMode", false, "Condensed mode (true) or Expanded mode (false)"} |
|
private |
Example Boolean used to determine decoding mode, maybe unused finally.
Definition at line 139 of file ITkStripsRodEncoder.h.
◆ m_itkStripsID
const SCT_ID* ITkStripsRodEncoder::m_itkStripsID {nullptr} |
|
private |
◆ m_swapModuleID
std::set<Identifier> ITkStripsRodEncoder::m_swapModuleID {} |
|
private |
The documentation for this class was generated from the following files:
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.
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.