diff --git a/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/AFP_ByteStream2RawCnv/AFP_RawDataCollectionReadOut.h b/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/AFP_ByteStream2RawCnv/AFP_RawDataCollectionReadOut.h index 69d8dce32b22b98b7dbb15d072c61ab12222d1d5..d1549689b52dee85cde4af786f5f33e0ed516683 100644 --- a/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/AFP_ByteStream2RawCnv/AFP_RawDataCollectionReadOut.h +++ b/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/AFP_ByteStream2RawCnv/AFP_RawDataCollectionReadOut.h @@ -27,20 +27,20 @@ private: uint16_t m_row; uint16_t m_column; uint32_t m_ToT1; - static const uint16_t headerPos = 24; - static const uint16_t headerBits = 0xff; - static const uint16_t headerPos2 = 20; - static const uint16_t headerBits2 = 0xfff; - static const uint16_t BOBvalue = + static const uint16_t HEADERPOS = 24; + static const uint16_t HEADERBITS = 0xff; + static const uint16_t HEADERPOS2 = 20; + static const uint16_t HEADERBITS2 = 0xfff; + static const uint16_t BOBVALUE = 0x3; // Header identifier, getBits(31,28) == 0011 (I think) - static const uint16_t LWCvalue = + static const uint16_t LWCVALUE = 0x3; // Have no idea what this is, let it be Data record id, // getBits(31,30) == 11. Could in princpile use BOBvalue, but need a // different boolean anyway, so for consistency define this again.; - static const uint16_t BOLvalue = 0x18; - static const uint16_t TLPvalue = 0x890; - static const uint16_t TWCvalue = 0x8a; - static const uint16_t EOBvalue = 0xf0; + static const uint16_t BOLVALUE = 0x18; + static const uint16_t TLPVALUE = 0x890; + static const uint16_t TWCVALUE = 0x8a; + static const uint16_t EOBVALUE = 0xf0; public: AFP_RawDataCollectionReadOut(); @@ -49,9 +49,9 @@ public: void decodeWord(uint32_t dataWord); bool is_BOB() { - return m_wordHeader == BOBvalue; + return m_wordHeader == BOBVALUE; }; // This is going to be is_Header - bool is_LWC() { return m_wordHeader2 == LWCvalue; }; + bool is_LWC() { return m_wordHeader2 == LWCVALUE; }; // bool is_BOL() {return m_wordHeader == BOLvalue;}; // bool is_TLP() {return m_wordHeader2 == TLPvalue;}; // bool is_TWC() {return m_wordHeader == TWCvalue;}; diff --git a/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/AFP_ByteStream2RawCnv/AFP_RawDataContainerReadOut.h b/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/AFP_ByteStream2RawCnv/AFP_RawDataContainerReadOut.h index 9e3a50e86e00f118423dd755aab75881deb10783..a72383608d9a45e803749da8a4dd2f24f502cb1f 100644 --- a/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/AFP_ByteStream2RawCnv/AFP_RawDataContainerReadOut.h +++ b/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/AFP_ByteStream2RawCnv/AFP_RawDataContainerReadOut.h @@ -25,18 +25,18 @@ private: uint32_t m_DetEventType; uint32_t m_timestamp; uint32_t m_BCId; - static const uint32_t FullEVmarker = 0xaa1234aa; - static const uint32_t ROBmarker = 0xdd1234dd; - static const uint32_t RODmarker = 0xee1234ee; - static const uint32_t RODheadersize = 0x00000009; - static const uint32_t RODversion = 0x03010000; + static const uint32_t FULLEVMARKER = 0xaa1234aa; + static const uint32_t ROBMARKER = 0xdd1234dd; + static const uint32_t RODMARKER = 0xee1234ee; + static const uint32_t RODHEADERSIZE = 0x00000009; + static const uint32_t RODVERSION = 0x03010000; public: AFP_RawDataContainerReadOut(); ~AFP_RawDataContainerReadOut(); - bool is_FullEVmarker() { return m_wordMarker == FullEVmarker; }; - bool is_ROBmarker() { return m_wordMarker == ROBmarker; }; - bool is_RODmarker() { return m_wordMarker == RODmarker; }; + bool is_FullEVmarker() { return m_wordMarker == FULLEVMARKER; }; + bool is_ROBmarker() { return m_wordMarker == ROBMARKER; }; + bool is_RODmarker() { return m_wordMarker == RODMARKER; }; diff --git a/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/AFP_ByteStream2RawCnv/AFP_RawDataReadOut.h b/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/AFP_ByteStream2RawCnv/AFP_RawDataReadOut.h index 7b5def761c74ccb6f0c331a3e90c7b3f4d97ec34..6335b36b05595942ef797ca5769e0eb81238f8be 100644 --- a/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/AFP_ByteStream2RawCnv/AFP_RawDataReadOut.h +++ b/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/AFP_ByteStream2RawCnv/AFP_RawDataReadOut.h @@ -33,13 +33,13 @@ private: bool m_bit16; bool m_error_bit17; bool m_bit18; - std::vector<uint32_t> ToT; + std::vector<uint32_t> m_ToT; - static const uint16_t headerPos = 28; - static const uint16_t headerBits = 0xf; - static const uint16_t BOTvalue = 0xa; - static const uint16_t EOTvalue = 0xc; - static const uint16_t TSMvalue = 0x3; + static const uint16_t HEADERPOS = 28; + static const uint16_t HEADERBITS = 0xf; + static const uint16_t BOTVALUE = 0xa; + static const uint16_t EOTVALUE = 0xc; + static const uint16_t TSMVALUE = 0x3; public: AFP_RawDataReadOut(); @@ -47,11 +47,11 @@ public: void decodeWord(uint32_t dataWord); - bool is_BOT() { return (m_wordHeader == BOTvalue); }; + bool is_BOT() { return (m_wordHeader == BOTVALUE); }; - bool is_EOT() { return (m_wordHeader == EOTvalue); }; + bool is_EOT() { return (m_wordHeader == EOTVALUE); }; - bool is_TDCt() { return (m_wordHeader == TSMvalue); }; + bool is_TDCt() { return (m_wordHeader == TSMVALUE); }; uint16_t Column() { return m_Column; } uint16_t SlotId() { return m_SlotId; } @@ -72,7 +72,7 @@ public: uint16_t bit26_27() { return m_bit26_27; } uint16_t bit24_27() { return m_bit24_27; } - std::vector<uint32_t> HitChan() const { return ToT; } + std::vector<uint32_t> HitChan() const { return m_ToT; } private: void setZero(); diff --git a/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/src/AFP_RawDataReadOut.cxx b/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/src/AFP_RawDataReadOut.cxx index c0a85be8b31901334932c56864e44a1a89219906..d517e243356ffe4365814aa5e037bf07c5928c6e 100644 --- a/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/src/AFP_RawDataReadOut.cxx +++ b/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/src/AFP_RawDataReadOut.cxx @@ -8,7 +8,7 @@ AFP_RawDataReadOut::AFP_RawDataReadOut() : m_dataWord(0), m_wordHeader(0), m_SlotId(0), m_LsbTdcId(0), m_ecnt_BOT(0), m_ecnt_EOT(0), m_bcId(0), m_wcnt(0), m_Column(0), m_bit26_27(0), m_bit24_27(0), m_HitDiscConfig(0), m_Link(0), m_fiber(0), m_ADC(0), - m_pattern(), m_BCId(0), m_bit16(0), m_error_bit17(0), m_bit18(0), ToT() {} + m_pattern(), m_BCId(0), m_bit16(0), m_error_bit17(0), m_bit18(0), m_ToT() {} AFP_RawDataReadOut::~AFP_RawDataReadOut() {} @@ -16,7 +16,7 @@ void AFP_RawDataReadOut::decodeWord(uint32_t dataWord) { setZero(); m_dataWord = dataWord; - m_wordHeader = (dataWord >> headerPos) & headerBits; + m_wordHeader = (dataWord >> HEADERPOS) & HEADERBITS; if (is_TDCt()) { m_bit18 = (bool)getBits(18, 18);