Functions
WireCell::Bits Namespace Reference

Functions

int shift_right (int value, int n, int filling, int totalBit)
 
int lowest_bits (int value, int n)
 

Function Documentation

int WireCell::Bits::lowest_bits ( int  value,
int  n 
)

Definition at line 9 of file Bits.cxx.

10 {
11  return ( value & ((1 << n) - 1) );
12 }
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1225
std::size_t n
Definition: format.h:3399
int WireCell::Bits::shift_right ( int  value,
int  n,
int  filling,
int  totalBit 
)

Definition at line 4 of file Bits.cxx.

5 {
6  return (value >> n) | (filling << (totalBit-n));
7 }
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1225
std::size_t n
Definition: format.h:3399