|
ATLAS Offline Software
|
Converts the TileRawChannel object into bytes as it.
More...
#include <TileRawChannel2Bytes5.h>
|
| TileRawChannel2Bytes5 () |
|
void | unpack_reco (unsigned int w, unsigned int unit, int &fmt, int &gain, double &, double &time) const |
| Unpack Frag5 reco from 32-bit word w. More...
|
|
bool | unpack_reco_bin (unsigned int w, int &fmt, int &gain, int &, int &time) const |
|
double | getSum (const uint32_t *ptr_frag, int n) const |
| Get SumEt, SumEz, SumE value. More...
|
|
double | getSumEt (const uint32_t *ptr_frag) const |
|
double | getSumEz (const uint32_t *ptr_frag) const |
|
double | getSumE (const uint32_t *ptr_frag) const |
|
void | setVerbose (bool) |
| Sets verbose mode true or false. More...
|
|
int | get_format (int code) const |
|
void | setFormatLookup () |
|
int | amplitude (const uint32_t *ofw, int unit, int chan, int gain, int s[]) const |
|
void | unpack (const uint32_t *ofw, const uint32_t *ptr_frag, TileChanData *ChanData) const |
|
bool | check_raw (const uint32_t *feb, int of_energy[], TileChanData *ChanData) const |
|
bool | check_reco (const uint32_t *frag, int of_energy[]) const |
|
Converts the TileRawChannel object into bytes as it.
Compressed Frag #5 In one 32-bit word
Definition at line 42 of file TileRawChannel2Bytes5.h.
◆ FormatCode
Enumerator |
---|
code_amp5 | |
code_raws | |
code_dump | |
code_ped4 | |
code_ped5 | |
code_rawf | |
code_amp6 | |
code_full | |
code_null | |
Definition at line 46 of file TileRawChannel2Bytes5.h.
◆ TileRawChannel2Bytes5()
TileRawChannel2Bytes5::TileRawChannel2Bytes5 |
( |
| ) |
|
|
inline |
◆ amplitude()
int TileRawChannel2Bytes5::amplitude |
( |
const uint32_t * |
ofw, |
|
|
int |
unit, |
|
|
int |
chan, |
|
|
int |
gain, |
|
|
int |
s[] |
|
) |
| const |
Definition at line 624 of file TileRawChannel2Bytes5.cxx.
629 int amp, ene, ene0, ene_shift;
633 int FRACBITS_MINUS_11 = _sadd(OF_E_FRACBITS[
unit], 11);
635 int s1 =
s[0],
s2 =
s[1],
s3 =
s[2],
s4 =
s[3], s5 =
s[4], s6 =
s[5], s7 =
s[6];
641 UINT32 s76 = _pack2(s7, s6);
643 ene_shift = 512 + _mpy(
gain, 2048 - 512);
654 amp = _mpyh (a1x, s1x)
662 calib_coeff = _ext(
calib, 0, 16);
663 calib_scale = _ssub(_extu(
calib, 16, 16) , FRACBITS_MINUS_11);
665 ene0 =
_round(ene0*calib_coeff, calib_scale);
666 ene = ene0 + ene_shift;
◆ check_raw()
bool TileRawChannel2Bytes5::check_raw |
( |
const uint32_t * |
feb, |
|
|
int |
of_energy[], |
|
|
TileChanData * |
ChanData |
|
) |
| const |
Definition at line 757 of file TileRawChannel2Bytes5.cxx.
761 int gain, ene,
u[7],
s[7];
779 s[1-1] = _extu(s1x, 0, 16);
780 s[2-1] = _extu(s32, 16, 16);
781 s[3-1] = _extu(s32, 0, 16);
782 s[4-1] = _extu(s54, 16, 16);
783 s[5-1] = _extu(s54, 0, 16);
784 s[6-1] = _extu(s76, 16, 16);
785 s[7-1] = _extu(s76, 0, 16);
788 for (
i = 0;
i < 7; ++
i) {
789 if (
s[
i] !=
u[
i]) chOK =
false;
791 if (!chOK) { printf(
"\n %d: Raw Data ERROR",
chan); }
793 ene += (
gain == 0 ? 512 : 2048);
795 if (of_energy[
chan] != ene) {
797 printf(
"\n %d : amp error ene: %d e_t_amp: %d\n",
chan, ene, of_energy[
chan]);
802 printf(
"\n %2d ERROR",
chan);
805 printf(
"\nunpack_data");
806 if (OK) printf(
" OK");
else printf(
" ERROR");
◆ check_reco()
bool TileRawChannel2Bytes5::check_reco |
( |
const uint32_t * |
frag, |
|
|
int |
of_energy[] |
|
) |
| const |
◆ get_code()
static int TileRawChannel2Bytes5::get_code |
( |
uint32_t |
reco | ) |
|
|
inlinestatic |
◆ get_format()
int TileRawChannel2Bytes5::get_format |
( |
int |
code | ) |
const |
|
inline |
◆ get_quality()
static int TileRawChannel2Bytes5::get_quality |
( |
int |
bad, |
|
|
int |
format |
|
) |
| |
|
inlinestatic |
◆ get_size_code()
static int TileRawChannel2Bytes5::get_size_code |
( |
uint32_t |
code | ) |
|
|
inlinestatic |
◆ getSum()
double TileRawChannel2Bytes5::getSum |
( |
const uint32_t * |
ptr_frag, |
|
|
int |
n |
|
) |
| const |
|
inline |
Get SumEt, SumEz, SumE value.
Definition at line 271 of file TileRawChannel2Bytes5.h.
273 int unit = ptr_frag[2] >> (32 - 2);
274 int amp_bin = (
int) (ptr_frag[3 + 48 +
n]);
◆ getSumE()
double TileRawChannel2Bytes5::getSumE |
( |
const uint32_t * |
ptr_frag | ) |
const |
|
inline |
◆ getSumEt()
double TileRawChannel2Bytes5::getSumEt |
( |
const uint32_t * |
ptr_frag | ) |
const |
|
inline |
◆ getSumEz()
double TileRawChannel2Bytes5::getSumEz |
( |
const uint32_t * |
ptr_frag | ) |
const |
|
inline |
◆ is_code_amp()
static bool TileRawChannel2Bytes5::is_code_amp |
( |
uint32_t |
code | ) |
|
|
inlinestatic |
◆ is_code_amp5()
static bool TileRawChannel2Bytes5::is_code_amp5 |
( |
uint32_t |
code | ) |
|
|
inlinestatic |
◆ is_code_amp6()
static bool TileRawChannel2Bytes5::is_code_amp6 |
( |
uint32_t |
code | ) |
|
|
inlinestatic |
◆ is_code_amp_raw_dump()
static bool TileRawChannel2Bytes5::is_code_amp_raw_dump |
( |
uint32_t |
code | ) |
|
|
inlinestatic |
◆ is_code_dump()
static bool TileRawChannel2Bytes5::is_code_dump |
( |
uint32_t |
code | ) |
|
|
inlinestatic |
◆ is_code_full()
static bool TileRawChannel2Bytes5::is_code_full |
( |
uint32_t |
code | ) |
|
|
inlinestatic |
◆ is_code_null()
static bool TileRawChannel2Bytes5::is_code_null |
( |
uint32_t |
code | ) |
|
|
inlinestatic |
◆ is_code_ped()
static bool TileRawChannel2Bytes5::is_code_ped |
( |
uint32_t |
code | ) |
|
|
inlinestatic |
◆ is_code_ped4()
static bool TileRawChannel2Bytes5::is_code_ped4 |
( |
uint32_t |
code | ) |
|
|
inlinestatic |
◆ is_code_ped5()
static bool TileRawChannel2Bytes5::is_code_ped5 |
( |
uint32_t |
code | ) |
|
|
inlinestatic |
◆ is_code_rawf()
static bool TileRawChannel2Bytes5::is_code_rawf |
( |
uint32_t |
code | ) |
|
|
inlinestatic |
◆ is_code_raws()
static bool TileRawChannel2Bytes5::is_code_raws |
( |
uint32_t |
code | ) |
|
|
inlinestatic |
◆ print_code()
static void TileRawChannel2Bytes5::print_code |
( |
uint32_t |
code | ) |
|
|
inlinestatic |
◆ setFormatLookup()
void TileRawChannel2Bytes5::setFormatLookup |
( |
| ) |
|
|
inline |
◆ setVerbose()
void TileRawChannel2Bytes5::setVerbose |
( |
bool |
| ) |
|
|
inline |
◆ unpack()
void TileRawChannel2Bytes5::unpack |
( |
const uint32_t * |
ofw, |
|
|
const uint32_t * |
ptr_frag, |
|
|
TileChanData * |
ChanData |
|
) |
| const |
Definition at line 672 of file TileRawChannel2Bytes5.cxx.
674 int unit = _extu(ptr_frag[2], 0, 32 - 2);
675 int size_L2 = _extu(ptr_frag[2], 2, 32 - 3);
678 const UINT32* ptr_reco = (
const UINT32*) (ptr_frag + 3);
679 const unsigned char* ptr_buff = (
const unsigned char*) (ptr_frag + 3 + 48 + size_L2);
684 const unsigned char* ptr_ped4;
685 const unsigned char* ptr_ped5;
686 const unsigned char* ptr_amp5;
687 const unsigned char* ptr_amp6;
688 const unsigned char* ptr_raws;
689 const unsigned char* ptr_rawf;
690 const unsigned char* ptr_full;
691 const unsigned char* ptr_dump;
693 int cnt_ped4, cnt_ped5, cnt_amp5, cnt_amp6,
694 cnt_raws, cnt_rawf, cnt_full, cnt_null, cnt_dump;
695 cnt_ped4 = cnt_ped5 = cnt_amp5 = cnt_amp6 =
696 cnt_raws = cnt_rawf = cnt_full = cnt_null = cnt_dump = 0;
698 bad_bits[0] = pop_buf(&ptr_buff, 16);
699 bad_bits[1] = pop_buf(&ptr_buff, 16);
700 bad_bits[2] = pop_buf(&ptr_buff, 16);
703 for (
i = 0;
i < 7; ++
i)
u[
i] = 0;
717 ptr_ped5 = ptr_ped4 + cnt_ped4*1;
718 ptr_amp5 = ptr_ped5 + cnt_ped5*2;
719 ptr_amp6 = ptr_amp5 + cnt_amp5*3;
720 ptr_raws = ptr_amp6 + cnt_amp6*4;
721 ptr_rawf = ptr_raws + cnt_raws*5;
722 ptr_full = ptr_rawf + cnt_rawf*6;
723 ptr_dump = ptr_full + cnt_full*6;
726 if (
chan % 16 == 0) bad16 = ~bad_bits[
chan/16];
727 bad = (bad16 & 0x1); bad16 >>= 1;
740 if (
size == 0) printf(
"\nTileRawChannel2Bytes5::unpack ERROR size = 0\n");
746 ChanData[
chan].ene_bin = ene;
753 for (
i = 0;
i < 7; ++
i) ChanData[
chan].
s[
i] =
u[
i];
◆ unpack_reco()
void TileRawChannel2Bytes5::unpack_reco |
( |
unsigned int |
w, |
|
|
unsigned int |
unit, |
|
|
int & |
fmt, |
|
|
int & |
gain, |
|
|
double & |
amp, |
|
|
double & |
time |
|
) |
| const |
|
inline |
◆ unpack_reco_bin()
bool TileRawChannel2Bytes5::unpack_reco_bin |
( |
unsigned int |
w, |
|
|
int & |
fmt, |
|
|
int & |
gain, |
|
|
int & |
amp, |
|
|
int & |
time |
|
) |
| const |
|
inline |
◆ m_FormatLookup
uint8_t TileRawChannel2Bytes5::m_FormatLookup[256] |
The documentation for this class was generated from the following files:
static bool is_code_dump(uint32_t code)
char data[hepevt_bytes_allocation_ATLAS]
#define Frag5_unpack_bin2reco(unit, gain, amp_bin, amp, time_bin, time)
unpack_bin2reco
static bool is_code_amp6(uint32_t code)
static bool is_code_null(uint32_t code)
#define Frag5_unpack_bin2sum(unit, amp_bin)
unpack_bin2sum
const double AMPLITUDE_FACTOR5_LG[4]
const int NOFWORDS_WEIGHTS_7S
static bool is_code_full(uint32_t code)
static bool is_code_amp5(uint32_t code)
Compression Format Code inlile functions.
@ u
Enums for curvilinear frames.
static bool is_code_ped5(uint32_t code)
static int get_code(uint32_t reco)
static bool is_code_rawf(uint32_t code)
uint8_t m_FormatLookup[256]
#define if_Frag5_unpack_reco_bin(w, code, gain, amp, time)
if_unpack_reco_bin
const int AMPLITUDE_OFFSET5[2]
static bool is_code_ped4(uint32_t code)
const int NOFWORDS_WEIGHTS_7S_1GAIN
static bool is_code_raws(uint32_t code)
double getSum(const uint32_t *ptr_frag, int n) const
Get SumEt, SumEz, SumE value.
def time(flags, cells_name, *args, **kw)
bool unpack_reco_bin(unsigned int w, int &fmt, int &gain, int &, int &time) const
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
const double AMPLITUDE_FACTOR5_HG[4]