1 #ifndef DataFormats_HGCDigi_PHGCSimAccumulator_h 2 #define DataFormats_HGCDigi_PHGCSimAccumulator_h 38 Data(
unsigned short ei,
unsigned short si,
unsigned short d):
39 data_((ei << energyOffset) | (si << sampleOffset) | d)
44 unsigned int data()
const {
return data_ & dataMask; }
60 data_.shrink_to_fit();
70 void emplace_back(
unsigned int detId,
unsigned short energyIndex,
unsigned short sampleIndex,
unsigned short data) {
74 data_.emplace_back(energyIndex, sampleIndex, data);
85 unsigned short data()
const {
return data_.data(); }
95 acc_(acc), iDet_(0), iData_(0),
101 acc_(acc), iDet_(detSize), iData_(dataSize), endData_(0)
105 return iDet_ == other.
iDet_ && iData_ == other.
iData_;
112 if(iData_ == endData_) {
114 endData_ += (iDet_ == acc_->detIdSize_.size()) ? 0 : acc_->detIdSize_[iDet_].size();
124 return TmpElem(acc_->detIdSize_[iDet_].detId(),
125 acc_->data_[iData_]);
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)
std::vector< std::vector< double > > tmp
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