CMS 3D CMS Logo

List of all members | Static Public Member Functions
L1MuUnsignedPackingGeneric Class Reference

#include <L1MuPacking.h>

Inheritance diagram for L1MuUnsignedPackingGeneric:
L1MuPacking

Static Public Member Functions

static int idxFromPacked (unsigned packed, unsigned int nbits)
 get the value from the packed notation (always positive) More...
 
static unsigned packedFromIdx (int idx, unsigned int nbits)
 get the packed notation of a value, check the range More...
 
static int signFromPacked (unsigned packed, unsigned int nbits)
 get the sign from the packed notation. always psitive (0) More...
 

Additional Inherited Members

- Public Member Functions inherited from L1MuPacking
virtual int idxFromPacked (unsigned packed) const =0
 get the value from the packed notation More...
 
virtual unsigned packedFromIdx (int idx) const =0
 get the packed notation of a value More...
 
virtual int signFromPacked (unsigned packed) const =0
 get the sign from the packed notation (0=positive, 1=negative) More...
 
virtual ~L1MuPacking ()
 

Detailed Description

Definition at line 72 of file L1MuPacking.h.

Member Function Documentation

◆ idxFromPacked()

static int L1MuUnsignedPackingGeneric::idxFromPacked ( unsigned  packed,
unsigned int  nbits 
)
inlinestatic

get the value from the packed notation (always positive)

Definition at line 77 of file L1MuPacking.h.

Referenced by L1MuBinnedScale::get_idx().

77 { return (int)packed; };

◆ packedFromIdx()

static unsigned L1MuUnsignedPackingGeneric::packedFromIdx ( int  idx,
unsigned int  nbits 
)
inlinestatic

get the packed notation of a value, check the range

Definition at line 79 of file L1MuPacking.h.

References heavyIonCSV_trainingSettings::idx.

Referenced by L1MuBinnedScale::getPacked().

79  {
80  if (idx >= (1 << nbits))
81  edm::LogWarning("ScaleRangeViolation")
82  << "L1MuUnignedPacking::packedFromIdx: warning value " << idx << "exceeds " << nbits << "-bit range !!!";
83  return (unsigned)idx;
84  };
Log< level::Warning, false > LogWarning

◆ signFromPacked()

static int L1MuUnsignedPackingGeneric::signFromPacked ( unsigned  packed,
unsigned int  nbits 
)
inlinestatic

get the sign from the packed notation. always psitive (0)

Definition at line 75 of file L1MuPacking.h.

75 { return 0; };