1 #ifndef DIGIHGCAL_HGCSAMPLE_H
2 #define DIGIHGCAL_HGCSAMPLE_H
6 #include <boost/cstdint.hpp>
43 <<
" Mode: " <<
mode()
45 <<
" Data: " <<
data()
46 <<
" Raw=0x" << std::hex <<
raw() <<
std::dec << std::endl;
55 uint32_t
toa()
const {
return ((
value_ >> 16) & 0x3ff); }
56 uint32_t
data()
const {
return ((
value_ >> 0) & 0xfff); }
64 void setWord(uint32_t word, uint32_t mask, uint32_t pos)
67 value_ &= ~((word & mask) << pos);
69 value_ |= ((word & mask) << pos);
void print(std::ostream &out=std::cout)
HGCSample(uint32_t value)
void setThreshold(bool thr)
setters
void setToA(uint16_t toa)
void setWord(uint32_t word, uint32_t mask, uint32_t pos)
wrapper to reset words at a given position
uint32_t raw() const
getters
void set(bool thr, bool mode, uint16_t toa, uint16_t data)
void setData(uint16_t data)