ATLAS Offline Software
Static Public Member Functions | Static Private Attributes | List of all members
LVL1::QuadLinear Class Reference

QuadLinear encoding is used for transmission of ET/Ex/Ey sums from JEM to CMM. More...

#include <QuadLinear.h>

Collaboration diagram for LVL1::QuadLinear:

Static Public Member Functions

static unsigned int Compress (int Et)
 Compress data. More...
 
static unsigned int Expand (int Code)
 Uncompress data. More...
 

Static Private Attributes

static const unsigned int m_mask = 0x3F
 Mask to select 6-bit field. More...
 
static const int m_nRanges = 4
 Number of ET ranges to encode in. More...
 
static const int m_nShift = 2
 Number of bits to shift by in each step. More...
 
static const int m_Offset = 6
 Offset for compression code. More...
 

Detailed Description

QuadLinear encoding is used for transmission of ET/Ex/Ey sums from JEM to CMM.

This class compresses/uncompresses 8 bit ET (JEM energy sums) to/from quad linear scale

Todo:
this should probably be a static class.

Definition at line 29 of file QuadLinear.h.

Member Function Documentation

◆ Compress()

unsigned int LVL1::QuadLinear::Compress ( int  Et)
static

Compress data.

Definition at line 21 of file QuadLinear.cxx.

22  {
23  if ( code <= m_mask ) {
24  quadEt = code + (i<<m_Offset);
25  break;
26  }
27  code >>= m_nShift;
28  }
29  return quadEt;
30 }
31 
32 unsigned int LVL1::QuadLinear::Expand(int Code) {
33 
34  // Compressed codes are unsigned. Calling function should keep track of sign
35  int range = Code >> m_Offset;

◆ Expand()

unsigned int LVL1::QuadLinear::Expand ( int  Code)
static

Uncompress data.

Definition at line 37 of file QuadLinear.cxx.

Member Data Documentation

◆ m_mask

const unsigned int LVL1::QuadLinear::m_mask = 0x3F
staticprivate

Mask to select 6-bit field.

Definition at line 44 of file QuadLinear.h.

◆ m_nRanges

const int LVL1::QuadLinear::m_nRanges = 4
staticprivate

Number of ET ranges to encode in.

Definition at line 46 of file QuadLinear.h.

◆ m_nShift

const int LVL1::QuadLinear::m_nShift = 2
staticprivate

Number of bits to shift by in each step.

Definition at line 48 of file QuadLinear.h.

◆ m_Offset

const int LVL1::QuadLinear::m_Offset = 6
staticprivate

Offset for compression code.

Definition at line 50 of file QuadLinear.h.


The documentation for this class was generated from the following files:
LVL1::QuadLinear::Expand
static unsigned int Expand(int Code)
Uncompress data.
Definition: QuadLinear.cxx:37
LVL1::QuadLinear::m_nShift
static const int m_nShift
Number of bits to shift by in each step.
Definition: QuadLinear.h:48
LVL1::QuadLinear::m_mask
static const unsigned int m_mask
Mask to select 6-bit field.
Definition: QuadLinear.h:44
histSizes.code
code
Definition: histSizes.py:129
lumiFormat.i
int i
Definition: lumiFormat.py:85
LVL1::QuadLinear::m_Offset
static const int m_Offset
Offset for compression code.
Definition: QuadLinear.h:50
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195