ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
CaloTowerStore::cell_iterator Class Reference

#include <CaloTowerStore.h>

Collaboration diagram for CaloTowerStore::cell_iterator:

Public Member Functions

 cell_iterator (std::vector< Entry >::const_iterator it, unsigned int n1, unsigned int offs1, unsigned int offs2, std::vector< double >::const_iterator weights)
 
 cell_iterator (std::vector< Entry >::const_iterator it)
 
unsigned int hash ()
 
double weight () const
 
cell_iteratoroperator++ ()
 
bool operator!= (const cell_iterator &other)
 

Private Attributes

std::vector< double >::const_iterator m_weights
 
std::vector< Entry >::const_iterator m_it
 
unsigned int m_hash
 
unsigned int m_nleft
 
unsigned int m_n1
 
unsigned int m_offs
 
unsigned int m_offs2
 
unsigned int m_stride
 

Detailed Description

Definition at line 226 of file CaloTowerStore.h.

Constructor & Destructor Documentation

◆ cell_iterator() [1/2]

CaloTowerStore::cell_iterator::cell_iterator ( std::vector< Entry >::const_iterator  it,
unsigned int  n1,
unsigned int  offs1,
unsigned int  offs2,
std::vector< double >::const_iterator  weights 
)
inline

Definition at line 229 of file CaloTowerStore.h.

234  : m_weights (weights),
235  m_it (it),
236  m_hash (0),
237  m_nleft (0),
238  m_n1 (n1),
239  m_offs (offs1),
240  m_offs2 (offs2),
241  m_stride (0)
242  { }

◆ cell_iterator() [2/2]

CaloTowerStore::cell_iterator::cell_iterator ( std::vector< Entry >::const_iterator  it)
inline

Definition at line 243 of file CaloTowerStore.h.

244  : m_it (it),
245  m_hash(0),
246  m_nleft(0),
247  m_n1(0),
248  m_offs(0),
249  m_offs2(0),
250  m_stride(0)
251  { }

Member Function Documentation

◆ hash()

unsigned int CaloTowerStore::cell_iterator::hash ( )
inline

Definition at line 252 of file CaloTowerStore.h.

253  {
254  if (m_nleft == 0) {
255  m_hash = m_it->hash + m_offs;
256  m_nleft = m_it->ncells;
258  }
259  return m_hash;
260  }

◆ operator!=()

Definition at line 276 of file CaloTowerStore.h.

277  { return this->m_it != other.m_it;}

◆ operator++()

cell_iterator& CaloTowerStore::cell_iterator::operator++ ( )
inline

Definition at line 262 of file CaloTowerStore.h.

262  {
263  if (m_nleft == 0) hash();
264  --m_nleft;
265  if (m_nleft > 0) {
266  m_hash += m_stride;
267  }
268  else {
269  ++m_it;
270  if (m_n1 && --m_n1 == 0) {
271  m_offs = m_offs2;
272  }
273  }
274  return *this;
275  }

◆ weight()

double CaloTowerStore::cell_iterator::weight ( ) const
inline

Definition at line 261 of file CaloTowerStore.h.

261 { return m_weights[m_it->windex]; }

Member Data Documentation

◆ m_hash

unsigned int CaloTowerStore::cell_iterator::m_hash
private

Definition at line 283 of file CaloTowerStore.h.

◆ m_it

std::vector<Entry>::const_iterator CaloTowerStore::cell_iterator::m_it
private

Definition at line 282 of file CaloTowerStore.h.

◆ m_n1

unsigned int CaloTowerStore::cell_iterator::m_n1
private

Definition at line 285 of file CaloTowerStore.h.

◆ m_nleft

unsigned int CaloTowerStore::cell_iterator::m_nleft
private

Definition at line 284 of file CaloTowerStore.h.

◆ m_offs

unsigned int CaloTowerStore::cell_iterator::m_offs
private

Definition at line 286 of file CaloTowerStore.h.

◆ m_offs2

unsigned int CaloTowerStore::cell_iterator::m_offs2
private

Definition at line 287 of file CaloTowerStore.h.

◆ m_stride

unsigned int CaloTowerStore::cell_iterator::m_stride
private

Definition at line 288 of file CaloTowerStore.h.

◆ m_weights

std::vector<double>::const_iterator CaloTowerStore::cell_iterator::m_weights
private

Definition at line 281 of file CaloTowerStore.h.


The documentation for this class was generated from the following file:
skel.it
it
Definition: skel.GENtoEVGEN.py:423
CaloTowerStore::cell_iterator::hash
unsigned int hash()
Definition: CaloTowerStore.h:252
CaloTowerStore::cell_iterator::m_weights
std::vector< double >::const_iterator m_weights
Definition: CaloTowerStore.h:281
CaloTowerStore::cell_iterator::m_stride
unsigned int m_stride
Definition: CaloTowerStore.h:288
CaloTowerStore::cell_iterator::m_nleft
unsigned int m_nleft
Definition: CaloTowerStore.h:284
CaloTowerStore::cell_iterator::m_hash
unsigned int m_hash
Definition: CaloTowerStore.h:283
CaloTowerStore::cell_iterator::m_offs
unsigned int m_offs
Definition: CaloTowerStore.h:286
CaloTowerStore::cell_iterator::m_n1
unsigned int m_n1
Definition: CaloTowerStore.h:285
Rtt_histogram.n1
n1
Definition: Rtt_histogram.py:21
CaloTowerStore::cell_iterator::m_it
std::vector< Entry >::const_iterator m_it
Definition: CaloTowerStore.h:282
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
CaloTowerStore::Entry::large_stride
@ large_stride
Definition: CaloTowerStore.h:174
CaloTowerStore::cell_iterator::m_offs2
unsigned int m_offs2
Definition: CaloTowerStore.h:287
CaloTowerStore::Entry::small_stride
@ small_stride
Definition: CaloTowerStore.h:175