ATLAS Offline Software
Loading...
Searching...
No Matches
TileRawChannel2Bytes5.h File Reference
#include <vector>
#include <stdio.h>
#include <stdint.h>
Include dependency graph for TileRawChannel2Bytes5.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TileRawChannel2Bytes5
 Converts the TileRawChannel object into bytes as it. More...
struct  TileRawChannel2Bytes5::TileChanData

Macros

#define if_Frag5_DO_PED(w, code, gain, amp, time)
 ped4 | ped5
#define if_Frag5_DO_AMP_RAW_DUMP(w, code, gain, amp, time)
 amp5 | amp6 | raws | rawf | dump
#define if_Frag5_DO_NULL(w, code, gain, amp, time)
 null
#define if_Frag5_DO_FULL(w, code, gain, amp, time)
 full
#define if_Frag5_unpack_reco_bin(w, code, gain, amp, time)
 if_unpack_reco_bin
#define Frag5_unpack_reco_bin(w, code, gain, amp, time)
 unpack_reco_bin
#define Frag5_unpack_bin2reco(unit, gain, amp_bin, amp, time_bin, time)
 unpack_bin2reco
#define Frag5_unpack_bin2sum(unit, amp_bin)
 unpack_bin2sum

Variables

const int AMPLITUDE_OFFSET5 [2] = { 512, 2048 }
const double AMPLITUDE_FACTOR5_LG [4] = { 16.0, 32.0, 32.0, 2.0/64.0 }
const double AMPLITUDE_FACTOR5_HG [4] = { 16.0, 32.0*64, 32.0*64., 2.0 }
const int NOFWORDS_WEIGHTS_7S_1GAIN = 22
const int NOFWORDS_WEIGHTS_7S = 2*NOFWORDS_WEIGHTS_7S_1GAIN
const int RECALIB_OFFSET = 48*NOFWORDS_WEIGHTS_7S + 1

Macro Definition Documentation

◆ Frag5_unpack_bin2reco

#define Frag5_unpack_bin2reco ( unit,
gain,
amp_bin,
amp,
time_bin,
time )
Value:
{ \
time = time_bin/2.0; \
amp = (gain) ? amp_bin/AMPLITUDE_FACTOR5_HG[unit] \
: amp_bin/AMPLITUDE_FACTOR5_LG[unit]; \
}
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
const double AMPLITUDE_FACTOR5_HG[4]
const double AMPLITUDE_FACTOR5_LG[4]

unpack_bin2reco

Definition at line 232 of file TileRawChannel2Bytes5.h.

232#define Frag5_unpack_bin2reco(unit, gain, amp_bin, amp, time_bin, time) \
233{ \
234 time = time_bin/2.0; \
235 amp = (gain) ? amp_bin/AMPLITUDE_FACTOR5_HG[unit] \
236 : amp_bin/AMPLITUDE_FACTOR5_LG[unit]; \
237}

◆ Frag5_unpack_bin2sum

#define Frag5_unpack_bin2sum ( unit,
amp_bin )
Value:

unpack_bin2sum

Definition at line 240 of file TileRawChannel2Bytes5.h.

240#define Frag5_unpack_bin2sum(unit, amp_bin) \
241 amp_bin/AMPLITUDE_FACTOR5_HG[unit]

◆ Frag5_unpack_reco_bin

#define Frag5_unpack_reco_bin ( w,
code,
gain,
amp,
time )
Value:
if_Frag5_unpack_reco_bin(w, code, gain, amp, time);
#define if_Frag5_unpack_reco_bin(w, code, gain, amp, time)
if_unpack_reco_bin

unpack_reco_bin

Definition at line 228 of file TileRawChannel2Bytes5.h.

228#define Frag5_unpack_reco_bin(w, code, gain, amp, time) \
229 if_Frag5_unpack_reco_bin(w, code, gain, amp, time);

◆ if_Frag5_DO_AMP_RAW_DUMP

#define if_Frag5_DO_AMP_RAW_DUMP ( w,
code,
gain,
amp,
time )
Value:
gain = (w >> 31); \
amp = (w & 0x7FFF) - AMPLITUDE_OFFSET5[gain]; \
time = ((int32_t)(w << (32 - 15 - 6)) >> (32 - 6)); \
} else { \
time = 0; \
} \
}
const int AMPLITUDE_OFFSET5[2]
static bool is_code_amp_raw_dump(uint32_t code)
static bool is_code_amp(uint32_t code)

amp5 | amp6 | raws | rawf | dump

Definition at line 191 of file TileRawChannel2Bytes5.h.

191#define if_Frag5_DO_AMP_RAW_DUMP(w, code, gain, amp, time) \
192if (TileRawChannel2Bytes5::is_code_amp_raw_dump(code)) { \
193 gain = (w >> 31); \
194 amp = (w & 0x7FFF) - AMPLITUDE_OFFSET5[gain]; \
195 if (TileRawChannel2Bytes5::is_code_amp(code)) { \
196 time = ((int32_t)(w << (32 - 15 - 6)) >> (32 - 6)); \
197 } else { \
198 time = 0; \
199 } \
200}

◆ if_Frag5_DO_FULL

#define if_Frag5_DO_FULL ( w,
code,
gain,
amp,
time )
Value:
gain = (w >> 31); \
int overflow = (w >> 23) & 0x1; \
amp = (overflow ? 0x7FFF : 0x0) - AMPLITUDE_OFFSET5[gain]; \
time = 0; \
}
static bool is_code_full(uint32_t code)

full

Definition at line 212 of file TileRawChannel2Bytes5.h.

212#define if_Frag5_DO_FULL(w, code, gain, amp, time) \
213if (TileRawChannel2Bytes5::is_code_full(code)) { \
214 gain = (w >> 31); \
215 int overflow = (w >> 23) & 0x1; \
216 amp = (overflow ? 0x7FFF : 0x0) - AMPLITUDE_OFFSET5[gain]; \
217 time = 0; \
218}

◆ if_Frag5_DO_NULL

#define if_Frag5_DO_NULL ( w,
code,
gain,
amp,
time )
Value:
int bit = w & 0x1; \
gain = bit; \
amp = 0; \
time = 0; \
}
static bool is_code_null(uint32_t code)

null

Definition at line 203 of file TileRawChannel2Bytes5.h.

203#define if_Frag5_DO_NULL(w, code, gain, amp, time) \
204if (TileRawChannel2Bytes5::is_code_null(code)) { \
205 int bit = w & 0x1; \
206 gain = bit; \
207 amp = 0; \
208 time = 0; \
209}

◆ if_Frag5_DO_PED

#define if_Frag5_DO_PED ( w,
code,
gain,
amp,
time )
Value:
gain = 1; \
amp = (w & 0x1FF) - 256; \
time = 0; \
}
static bool is_code_ped(uint32_t code)

ped4 | ped5

Definition at line 183 of file TileRawChannel2Bytes5.h.

183#define if_Frag5_DO_PED(w, code, gain, amp, time) \
184if (TileRawChannel2Bytes5::is_code_ped(code)) { \
185 gain = 1; \
186 amp = (w & 0x1FF) - 256; \
187 time = 0; \
188}

◆ if_Frag5_unpack_reco_bin

#define if_Frag5_unpack_reco_bin ( w,
code,
gain,
amp,
time )
Value:
if_Frag5_DO_PED(w, code, gain, amp, time) else \
if_Frag5_DO_AMP_RAW_DUMP(w, code, gain, amp, time) else \
if_Frag5_DO_NULL(w, code, gain, amp, time) else \
if_Frag5_DO_FULL(w, code, gain, amp, time) \
#define if_Frag5_DO_PED(w, code, gain, amp, time)
ped4 | ped5

if_unpack_reco_bin

Definition at line 221 of file TileRawChannel2Bytes5.h.

221#define if_Frag5_unpack_reco_bin(w, code, gain, amp, time) \
222 if_Frag5_DO_PED(w, code, gain, amp, time) else \
223 if_Frag5_DO_AMP_RAW_DUMP(w, code, gain, amp, time) else \
224 if_Frag5_DO_NULL(w, code, gain, amp, time) else \
225 if_Frag5_DO_FULL(w, code, gain, amp, time) \
226

Variable Documentation

◆ AMPLITUDE_FACTOR5_HG

const double AMPLITUDE_FACTOR5_HG[4] = { 16.0, 32.0*64, 32.0*64., 2.0 }

Definition at line 33 of file TileRawChannel2Bytes5.h.

33{ 16.0, 32.0*64, 32.0*64., 2.0 };

◆ AMPLITUDE_FACTOR5_LG

const double AMPLITUDE_FACTOR5_LG[4] = { 16.0, 32.0, 32.0, 2.0/64.0 }

Definition at line 32 of file TileRawChannel2Bytes5.h.

32{ 16.0, 32.0, 32.0, 2.0/64.0 };

◆ AMPLITUDE_OFFSET5

const int AMPLITUDE_OFFSET5[2] = { 512, 2048 }

Definition at line 31 of file TileRawChannel2Bytes5.h.

31{ 512, 2048 };

◆ NOFWORDS_WEIGHTS_7S

const int NOFWORDS_WEIGHTS_7S = 2*NOFWORDS_WEIGHTS_7S_1GAIN

Definition at line 36 of file TileRawChannel2Bytes5.h.

◆ NOFWORDS_WEIGHTS_7S_1GAIN

const int NOFWORDS_WEIGHTS_7S_1GAIN = 22

Definition at line 35 of file TileRawChannel2Bytes5.h.

◆ RECALIB_OFFSET

const int RECALIB_OFFSET = 48*NOFWORDS_WEIGHTS_7S + 1

Definition at line 37 of file TileRawChannel2Bytes5.h.