Skip to content
Snippets Groups Projects
Commit fae54dec authored by scott snyder's avatar scott snyder
Browse files

AFP_ByteStream2RawCnv: Comply with ATLAS naming conventions.

Private data members should start with m_.
(Constants may be spelled in all uppercase.)
parent 5c67c638
No related branches found
No related tags found
No related merge requests found
......@@ -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;};
......
......@@ -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; };
......
......@@ -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();
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment