74 snprintf(what,
sizeof(what),
"layer (which is %u) >= _layers (which is %u)", layer,
_layers);
75 throw std::out_of_range(what);
81 snprintf(what,
sizeof(what),
"unit (which is %u) >= _units (which is %u)", unit,
_units);
82 throw std::out_of_range(what);
95 const unsigned int mask = UINT64_BITS - 1;
98 const unsigned int n3 = (n1 == 0) ? n2 + 1 : n2;
100 unsigned int i = 0,
j = 0, j_curr = 0, j_next = 0;
109 j_curr = (n2 +
j) % _units;
110 j_next = (n3 +
j + _units - 1) % _units;
111 _buffer[
i][
j] = (tmp[
i][j_curr] << n1) | (tmp[i][j_next] >> (-n1 & mask));
123 const unsigned int mask = UINT64_BITS - 1;
126 const unsigned int n3 = (n1 == 0) ? n2 + _units - 1 : n2;
128 unsigned int i = 0,
j = 0, j_curr = 0, j_next = 0;
137 j_curr = (n2 +
j) % _units;
138 j_next = (n3 +
j + 1) % _units;
139 _buffer[
i][
j] = (tmp[
i][j_curr] >> n1) | (tmp[i][j_next] << (-n1 & mask));
145 static_assert((
_layers == 4 &&
_units == 3),
"This function assumes (_layers == 4 && _units == 3)");
160 unsigned int ly = (b_st1 << 2) | (b_st2 << 1) | (b_st3 << 0) | (b_st4 << 0);
165 constexpr
int N = 160;
166 out << std::bitset<N - 128>(
_buffer[3][2]) << std::bitset<128 - 64>(
_buffer[3][1]) << std::bitset<64>(
_buffer[3][0])
168 out << std::bitset<N - 128>(
_buffer[2][2]) << std::bitset<128 - 64>(
_buffer[2][1]) << std::bitset<64>(
_buffer[2][0])
170 out << std::bitset<N - 128>(
_buffer[1][2]) << std::bitset<128 - 64>(
_buffer[1][1]) << std::bitset<64>(
_buffer[1][0])
172 out << std::bitset<N - 128>(
_buffer[0][2]) << std::bitset<128 - 64>(
_buffer[0][1]) << std::bitset<64>(
_buffer[0][0]);
unsigned int op_and(const PhiMemoryImage &other) const
void set_word(unsigned int layer, unsigned int unit, value_type value)
void set_bit(unsigned int layer, unsigned int bit)
static const unsigned int _units
std::ostream & operator<<(std::ostream &out, const ALILine &li)
constexpr std::array< uint8_t, layerIndexSize > layer
value_type get_word(unsigned int layer, unsigned int unit) const
void check_input(unsigned int layer, unsigned int bit) const
void clear_bit(unsigned int layer, unsigned int bit)
void print(std::ostream &out) const
value_type _buffer[_layers][_units]
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
void rotr(unsigned int n)
void rotl(unsigned int n)
void fill(std::map< std::string, TH1 * > &h, const std::string &s, double x)
PhiMemoryImage & operator=(PhiMemoryImage other)
bool test_bit(unsigned int layer, unsigned int bit) const
void swap(PhiMemoryImage &other)
static const unsigned int _layers
Basic3DVector unit() const