#include <VFATdata.h>
|
uint8_t | b1010 () const |
| v2 More...
|
|
uint8_t | b1100 () const |
|
uint8_t | b1110 () const |
|
uint16_t | bc () const |
|
uint16_t | checkCRC () |
|
uint16_t | chipID () const |
|
uint16_t | crc () const |
|
uint16_t | crc_cal (uint16_t crc_in, uint16_t dato) |
|
uint8_t | crcCheck () const |
|
uint8_t | ec () const |
|
uint8_t | flag () const |
|
uint64_t | get_fw () const |
|
uint64_t | get_sw () const |
|
uint64_t | get_tw () const |
|
uint8_t | header () const |
| v3 More...
|
|
uint64_t | lsData () const |
|
uint64_t | msData () const |
|
int | phi () const |
|
uint8_t | position () const |
|
uint8_t | quality () |
| quality flag - bit: 0 good, 1 crc fail, 2 b1010 fail, 3 b1100 fail, 4 b1110 More...
|
|
void | read_fw (uint64_t word) |
| Read first word from the block. More...
|
|
void | read_sw (uint64_t word) |
| Read second word from the block. More...
|
|
void | read_tw (uint64_t word) |
| Read third word from the block. More...
|
|
void | setPhi (int i) |
|
void | setVersion (int i) |
|
int | version () const |
|
| VFATdata () |
|
| VFATdata (const int vfatVer, const uint16_t BC, const uint8_t EC, const uint16_t chipID, const uint64_t lsDatas, const uint64_t msDatas) |
|
uint16_t | vfatId () const |
|
| ~VFATdata () |
|
Definition at line 48 of file VFATdata.h.
◆ VFATdata() [1/2]
◆ VFATdata() [2/2]
VFATdata::VFATdata |
( |
const int |
vfatVer, |
|
|
const uint16_t |
BC, |
|
|
const uint8_t |
EC, |
|
|
const uint16_t |
chipID, |
|
|
const uint64_t |
lsDatas, |
|
|
const uint64_t |
msDatas |
|
) |
| |
Definition at line 7 of file VFATdata.cc.
33 sw.lsData1 = lsDatas >> 48;
34 tw.lsData2 = lsDatas & 0x0000ffffffffffff;
36 fw.msData1 = msDatas >> 48;
37 sw.msData2 = msDatas & 0x0000ffffffffffff;
References checkCRC(), chipID(), fw_, sw_, tw_, and ver_.
◆ ~VFATdata()
gem::VFATdata::~VFATdata |
( |
| ) |
|
|
inline |
◆ b1010()
uint8_t gem::VFATdata::b1010 |
( |
| ) |
const |
|
inline |
v2
Definition at line 107 of file VFATdata.h.
107 {
return VFATfirst{
fw_}.b1010; }
References fw_.
◆ b1100()
uint8_t gem::VFATdata::b1100 |
( |
| ) |
const |
|
inline |
Definition at line 108 of file VFATdata.h.
108 {
return VFATfirst{
fw_}.b1100; }
References fw_.
◆ b1110()
uint8_t gem::VFATdata::b1110 |
( |
| ) |
const |
|
inline |
Definition at line 109 of file VFATdata.h.
109 {
return VFATfirst{
fw_}.b1110; }
References fw_.
◆ bc()
uint16_t gem::VFATdata::bc |
( |
| ) |
const |
|
inline |
◆ checkCRC()
uint16_t VFATdata::checkCRC |
( |
| ) |
|
Definition at line 86 of file VFATdata.cc.
87 uint16_t vfatBlockWords[12];
92 vfatBlockWords[8] = (0xffff000000000000 &
msData()) >> 48;
93 vfatBlockWords[7] = (0x0000ffff00000000 &
msData()) >> 32;
94 vfatBlockWords[6] = (0x00000000ffff0000 &
msData()) >> 16;
95 vfatBlockWords[5] = (0x000000000000ffff &
msData());
96 vfatBlockWords[4] = (0xffff000000000000 &
lsData()) >> 48;
97 vfatBlockWords[3] = (0x0000ffff00000000 &
lsData()) >> 32;
98 vfatBlockWords[2] = (0x00000000ffff0000 &
lsData()) >> 16;
99 vfatBlockWords[1] = (0x000000000000ffff &
lsData());
101 uint16_t crc_fin = 0xffff;
102 for (
int i = 11;
i >= 1;
i--) {
103 crc_fin =
crc_cal(crc_fin, vfatBlockWords[
i]);
References crc_cal(), fw_, mps_fire::i, lsData(), and msData().
Referenced by quality(), and VFATdata().
◆ chipID()
uint16_t gem::VFATdata::chipID |
( |
| ) |
const |
|
inline |
◆ crc()
uint16_t gem::VFATdata::crc |
( |
| ) |
const |
|
inline |
◆ crc_cal()
uint16_t VFATdata::crc_cal |
( |
uint16_t |
crc_in, |
|
|
uint16_t |
dato |
|
) |
| |
Definition at line 66 of file VFATdata.cc.
68 uint16_t mask = 0x0001;
70 uint16_t crc_temp = crc_in;
71 unsigned char datalen = 16;
72 for (
int i = 0;
i < datalen;
i++) {
77 if ((crc_temp & mask) ^
d)
78 crc_temp = crc_temp >> 1 ^ 0x8408;
80 crc_temp = crc_temp >> 1;
References ztail::d, mps_fire::i, and findQualityFiles::v.
Referenced by checkCRC().
◆ crcCheck()
uint8_t gem::VFATdata::crcCheck |
( |
| ) |
const |
|
inline |
◆ ec()
uint8_t gem::VFATdata::ec |
( |
| ) |
const |
|
inline |
◆ flag()
uint8_t gem::VFATdata::flag |
( |
| ) |
const |
|
inline |
◆ get_fw()
uint64_t gem::VFATdata::get_fw |
( |
| ) |
const |
|
inline |
◆ get_sw()
uint64_t gem::VFATdata::get_sw |
( |
| ) |
const |
|
inline |
◆ get_tw()
uint64_t gem::VFATdata::get_tw |
( |
| ) |
const |
|
inline |
◆ header()
uint8_t gem::VFATdata::header |
( |
| ) |
const |
|
inline |
v3
Definition at line 102 of file VFATdata.h.
102 {
return VFATfirst{
fw_}.header; }
References fw_.
◆ lsData()
uint64_t gem::VFATdata::lsData |
( |
| ) |
const |
|
inline |
◆ msData()
uint64_t gem::VFATdata::msData |
( |
| ) |
const |
|
inline |
◆ phi()
int gem::VFATdata::phi |
( |
| ) |
const |
|
inline |
◆ position()
uint8_t gem::VFATdata::position |
( |
| ) |
const |
|
inline |
◆ quality()
uint8_t VFATdata::quality |
( |
| ) |
|
◆ read_fw()
void gem::VFATdata::read_fw |
( |
uint64_t |
word | ) |
|
|
inline |
Read first word from the block.
Definition at line 61 of file VFATdata.h.
References fw_.
◆ read_sw()
void gem::VFATdata::read_sw |
( |
uint64_t |
word | ) |
|
|
inline |
Read second word from the block.
Definition at line 65 of file VFATdata.h.
References sw_.
◆ read_tw()
void gem::VFATdata::read_tw |
( |
uint64_t |
word | ) |
|
|
inline |
Read third word from the block.
Definition at line 69 of file VFATdata.h.
References tw_.
◆ setPhi()
void gem::VFATdata::setPhi |
( |
int |
i | ) |
|
|
inline |
◆ setVersion()
void gem::VFATdata::setVersion |
( |
int |
i | ) |
|
|
inline |
◆ version()
int gem::VFATdata::version |
( |
| ) |
const |
|
inline |
◆ vfatId()
uint16_t gem::VFATdata::vfatId |
( |
| ) |
const |
|
inline |
Definition at line 89 of file VFATdata.h.
91 return VFATfirst{
fw_}.chipID;
92 return VFATfirst{
fw_}.pos;
References fw_, and ver_.
◆ fw_
uint64_t gem::VFATdata::fw_ |
|
private |
phi position of vfat in chamber
Definition at line 124 of file VFATdata.h.
Referenced by b1010(), b1100(), b1110(), bc(), checkCRC(), chipID(), crcCheck(), ec(), flag(), get_fw(), header(), msData(), position(), quality(), read_fw(), VFATdata(), and vfatId().
◆ nChannels
const int gem::VFATdata::nChannels = 128 |
|
static |
◆ phiPos_
int gem::VFATdata::phiPos_ |
|
private |
◆ sizeChipID
const int gem::VFATdata::sizeChipID = 12 |
|
static |
◆ sw_
uint64_t gem::VFATdata::sw_ |
|
private |
◆ tw_
uint64_t gem::VFATdata::tw_ |
|
private |
◆ ver_