1 #ifndef DataFormats_HGCDigi_PHGCSimAccumulator_h 2 #define DataFormats_HGCDigi_PHGCSimAccumulator_h 36 Data(
unsigned short ei,
unsigned short si,
unsigned short d)
37 :
data_((ei << energyOffset) | (si << sampleOffset) | d) {}
41 unsigned int data()
const {
return data_ & dataMask; }
57 data_.shrink_to_fit();
67 void emplace_back(
unsigned int detId,
unsigned short energyIndex,
unsigned short sampleIndex,
unsigned short data) {
71 data_.emplace_back(energyIndex, sampleIndex, data);
82 unsigned short data()
const {
return data_.data(); }
97 : acc_(acc), iDet_(detSize), iData_(dataSize), endData_(0) {}
103 if (iData_ == endData_) {
105 endData_ += (iDet_ == acc_->detIdSize_.size()) ? 0 : acc_->detIdSize_[iDet_].size();
unsigned short data() const
unsigned int data() const
const PHGCSimAccumulator * acc_
void emplace_back(unsigned int detId, unsigned short energyIndex, unsigned short sampleIndex, unsigned short data)
std::vector< Data > data_
bool operator!=(const const_iterator &other) const
const_iterator cend() const
const_iterator begin() const
unsigned int energyIndex() const
TmpElem(unsigned int detId, Data data)
bool operator==(const QGLikelihoodParameters &lhs, const QGLikelihoodCategory &rhs)
Test if parameters are compatible with category.
~PHGCSimAccumulator()=default
unsigned int size() const
PHGCSimAccumulator()=default
unsigned int sampleIndex() const
unsigned short sampleIndex() const
const_iterator(const PHGCSimAccumulator *acc)
void reserve(size_t size)
unsigned short energyIndex() const
std::vector< DetIdSize > detIdSize_
const_iterator operator++(int)
char data[epos_bytes_allocation]
const_iterator & operator++()
const_iterator cbegin() const
bool operator==(const const_iterator &other) const
unsigned int detId() const
const_iterator(const PHGCSimAccumulator *acc, unsigned int detSize, unsigned int dataSize)
Data(unsigned short ei, unsigned short si, unsigned short d)
DetIdSize(unsigned int detId)
const_iterator end() const
unsigned int detId() const