|
ATLAS Offline Software
|
Go to the documentation of this file.
13 #include "Identifier/Identifier.h"
20 const int formatter{
static_cast<int>((fibre/12) & 0x7)};
21 const int linkNum{
static_cast<int>((fibre - (
formatter*12)) & 0xF)};
22 const int rodLink{(
formatter << 4) | linkNum};
26 isOdd(
const int someNumber){
27 return static_cast<bool>(someNumber & 1);
36 const IInterface*
parent) :
55 if (sctDetElement->swapPhiReadoutDirection()) {
59 return StatusCode::SUCCESS;
64 return StatusCode::SUCCESS;
69 const std::vector<const SCT_RDORawData*>& )
const {
85 std::vector<uint32_t>& vec32Words)
const {
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);
111 const unsigned short int* position,
112 const unsigned short int& numWords)
const {
117 uint16Word =
static_cast<uint32_t>(*(arr16Words+
i));
119 uint32Word |= (uint16Word<<
pos);
146 return rodLinkFromOnlineID(
onlineID(rdo));
168 const int rodLink{rodLinkFromOnlineID(
m_cabling->getOnlineIdFromHash(linkHash))};
def retrieve(aClass, aKey=None)
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
virtual StatusCode initialize() override
Initialize.
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.
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.
ITkStripsRodEncoder(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
std::set< Identifier > m_swapModuleID
Swap Module identifier, set by SCTRawContByteStreamTool.
virtual StatusCode finalize() override
Finalize.
uint32_t onlineID(const SCT_RDORawData *rdo) const
Get the online Identifier from the RDO.
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.
BooleanProperty m_condensed
Example Boolean used to determine decoding mode, maybe unused finally.
int getRODLink(const SCT_RDORawData *rdo) const
Get the ROD link number info in the RDO header data.
Identifier offlineID(const SCT_RDORawData *rdo) const
Get the offline Identifier from the RDO.
::StatusCode StatusCode
StatusCode definition for legacy code.
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
uint16_t getHeaderUsingRDO(const SCT_RDORawData *rdo) const
Get the 16-bit word for a header for a hit.
virtual void fillROD(std::vector< uint32_t > &vec32Data, const uint32_t &robID, const std::vector< const SCT_RDORawData * > &vecRDOs) const override
Main Convert method.
int side(const SCT_RDORawData *rdo) const
Get the side info from the RDO.
int getStrip(const SCT_RDORawData *rdo) const
Get the strip number info from the RDO.
uint16_t getTrailer(const int &errorWord) const
Get the 16-bit word for a trailer, with or without ByteStream errors.
int strip(const Identifier &id) const
std::uint32_t fibre() const
Return the fibre.
int side(const Identifier &id) const
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.
virtual Identifier identify() const override final
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
const SCT_ID * m_itkStripsID
Identifier helper class for the ITkStrips subdetector that creates compact Identifier objects and Ide...
ToolHandle< ISCT_CablingTool > m_cabling
Providing mappings of online and offline identifiers and also serial numbers.