|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef TILEBYTESTREAM_TILERAWCHANNEL2BYTES5_H
6 #define TILEBYTESTREAM_TILERAWCHANNEL2BYTES5_H
118 printf(
"\nTileRawChannel2Bytes5::get_code ERROR\n");
178 bool check_raw(
const uint32_t* feb,
int of_energy[], TileChanData* ChanData)
const;
183 #define if_Frag5_DO_PED(w, code, gain, amp, time) \
184 if (TileRawChannel2Bytes5::is_code_ped(code)) { \
186 amp = (w & 0x1FF) - 256; \
191 #define if_Frag5_DO_AMP_RAW_DUMP(w, code, gain, amp, time) \
192 if (TileRawChannel2Bytes5::is_code_amp_raw_dump(code)) { \
194 amp = (w & 0x7FFF) - AMPLITUDE_OFFSET5[gain]; \
195 if (TileRawChannel2Bytes5::is_code_amp(code)) { \
196 time = ((int32_t)(w << (32 - 15 - 6)) >> (32 - 6)); \
203 #define if_Frag5_DO_NULL(w, code, gain, amp, time) \
204 if (TileRawChannel2Bytes5::is_code_null(code)) { \
212 #define if_Frag5_DO_FULL(w, code, gain, amp, time) \
213 if (TileRawChannel2Bytes5::is_code_full(code)) { \
215 int overflow = (w >> 23) & 0x1; \
216 amp = (overflow ? 0x7FFF : 0x0) - AMPLITUDE_OFFSET5[gain]; \
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) \
227 #define Frag5_unpack_reco_bin(w, code, gain, amp, time) \
229 if_Frag5_unpack_reco_bin(w, code, gain, amp, time);
232 #define Frag5_unpack_bin2reco(unit, gain, amp_bin, amp, time_bin, time) \
234 time = time_bin/2.0; \
235 amp = (gain) ? amp_bin/AMPLITUDE_FACTOR5_HG[unit] \
236 : amp_bin/AMPLITUDE_FACTOR5_LG[unit]; \
240 #define Frag5_unpack_bin2sum(unit, amp_bin) \
241 amp_bin/AMPLITUDE_FACTOR5_HG[unit]
254 printf(
"\nTileRawChannel2Bytes5::unpack_reco_bin.ERROR reco = %08X\n",
w);
261 int &
fmt,
int &
gain,
double &,
double &
time)
const
263 int amp_bin, time_bin;
267 amp = 0.0;
time = 0.0;
273 int unit = ptr_frag[2] >> (32 - 2);
274 int amp_bin = (
int) (ptr_frag[3 + 48 +
n]);
static bool is_code_dump(uint32_t code)
#define Frag5_unpack_bin2reco(unit, gain, amp_bin, amp, time_bin, time)
unpack_bin2reco
static bool is_code_amp6(uint32_t code)
void unpack(const uint32_t *ofw, const uint32_t *ptr_frag, TileChanData *ChanData) const
static void print_code(uint32_t code)
static bool is_code_null(uint32_t code)
#define Frag5_unpack_bin2sum(unit, amp_bin)
unpack_bin2sum
double getSumEt(const uint32_t *ptr_frag) const
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.
static bool is_code_ped5(uint32_t code)
static int get_code(uint32_t reco)
static bool is_code_rawf(uint32_t code)
static bool is_code_ped(uint32_t code)
static int get_size_code(uint32_t code)
uint8_t m_FormatLookup[256]
bool check_reco(const uint32_t *frag, int of_energy[]) const
#define if_Frag5_unpack_reco_bin(w, code, gain, amp, time)
if_unpack_reco_bin
int get_format(int code) const
Converts the TileRawChannel object into bytes as it.
const int AMPLITUDE_OFFSET5[2]
static int get_quality(int bad, int format)
static bool is_code_ped4(uint32_t code)
static bool is_code_amp_raw_dump(uint32_t code)
const int NOFWORDS_WEIGHTS_7S_1GAIN
static bool is_code_raws(uint32_t code)
double getSumE(const uint32_t *ptr_frag) const
double getSum(const uint32_t *ptr_frag, int n) const
Get SumEt, SumEz, SumE value.
int amplitude(const uint32_t *ofw, int unit, int chan, int gain, int s[]) const
def time(flags, cells_name, *args, **kw)
bool unpack_reco_bin(unsigned int w, int &fmt, int &gain, int &, int &time) const
void setVerbose(bool)
Sets verbose mode true or false.
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
static bool is_code_amp(uint32_t code)
bool check_raw(const uint32_t *feb, int of_energy[], TileChanData *ChanData) const
const double AMPLITUDE_FACTOR5_HG[4]
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.
double getSumEz(const uint32_t *ptr_frag) const