1 #ifndef DataFormats_FTLDigi_PMTDSimAccumulator_h 2 #define DataFormats_FTLDigi_PMTDSimAccumulator_h 24 unsigned char row()
const {
return row_; }
44 Data(
unsigned short ei,
unsigned short si,
unsigned short d):
45 data_((ei << energyOffset) | (si << sampleOffset) | d)
50 unsigned int data()
const {
return data_ & dataMask; }
66 data_.shrink_to_fit();
76 void emplace_back(
unsigned int detId,
unsigned char row,
unsigned char column,
unsigned short energyIndex,
unsigned short sampleIndex,
unsigned short data) {
80 data_.emplace_back(energyIndex, sampleIndex, data);
91 unsigned char row()
const {
return row_; }
95 unsigned short data()
const {
return data_.data(); }
107 acc_(acc), iDet_(0), iData_(0),
113 acc_(acc), iDet_(detSize), iData_(dataSize), endData_(0)
117 return iDet_ == other.
iDet_ && iData_ == other.
iData_;
124 if(iData_ == endData_) {
126 endData_ += (iDet_ == acc_->detIdSize_.size()) ? 0 : acc_->detIdSize_[iDet_].size();
136 const auto&
id = acc_->detIdSize_[iDet_];
138 acc_->data_[iData_]);
unsigned short sampleIndex() const
const_iterator & operator++()
const_iterator cend() const
unsigned int detId() const
unsigned char row() const
unsigned char column() const
const_iterator(const PMTDSimAccumulator *acc, unsigned int detSize, unsigned int dataSize)
bool operator==(const const_iterator &other) const
void emplace_back(unsigned int detId, unsigned char row, unsigned char column, unsigned short energyIndex, unsigned short sampleIndex, unsigned short data)
std::vector< Data > data_
void reserve(size_t size)
unsigned int data() const
const_iterator(const PMTDSimAccumulator *acc)
const_iterator operator++(int)
bool operator!=(const const_iterator &other) const
const PMTDSimAccumulator * acc_
PMTDSimAccumulator()=default
unsigned int sampleIndex() const
const_iterator end() const
unsigned short energyIndex() const
~PMTDSimAccumulator()=default
bool operator==(const QGLikelihoodParameters &lhs, const QGLikelihoodCategory &rhs)
Test if parameters are compatible with category.
unsigned int size() const
unsigned int energyIndex() const
unsigned char column() const
unsigned int detId() const
std::vector< DetIdSize > detIdSize_
Data(unsigned short ei, unsigned short si, unsigned short d)
unsigned short data() const
TmpElem(unsigned int detId, unsigned char row, unsigned char column, Data data)
std::vector< std::vector< double > > tmp
const_iterator cbegin() const
char data[epos_bytes_allocation]
DetIdSize(unsigned int detId, unsigned char row, unsigned char col)
const_iterator begin() const
unsigned char row() const