CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Attributes
SeedingLayerSetsHits::SeedingLayerSet Class Reference

#include <SeedingLayerSetsHits.h>

Classes

class  const_iterator
 

Public Member Functions

const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_iterator end () const
 
SeedingLayer operator[] (LayerSetIndex index) const
 Get a given SeedingLayer (index is between 0 and size()-1) More...
 
 SeedingLayerSet ()
 
 SeedingLayerSet (const SeedingLayerSetsHits *sls, std::vector< LayerSetIndex >::const_iterator begin, std::vector< LayerSetIndex >::const_iterator end)
 
LayerSetIndex size () const
 Number of layers in this set. More...
 
SeedingLayerSet slice (size_t begin, size_t end) const
 

Private Attributes

std::vector< LayerSetIndex >::const_iterator begin_
 
std::vector< LayerSetIndex >::const_iterator end_
 
const SeedingLayerSetsHitsseedingLayerSets_
 

Detailed Description

Auxiliary class to represent a set of SeedingLayers (e.g. BPIX1+BPIX2+BPIX3).

Holds a pointer to SeedingLayerSetsHits, and iterators to SeedingLayerSetsHits::layerSetIndices_ to for the first and last+1 layer of the set.

Definition at line 65 of file SeedingLayerSetsHits.h.

Constructor & Destructor Documentation

◆ SeedingLayerSet() [1/2]

SeedingLayerSetsHits::SeedingLayerSet::SeedingLayerSet ( )
inline

Definition at line 97 of file SeedingLayerSetsHits.h.

97 : seedingLayerSets_(nullptr) {}

Referenced by slice().

◆ SeedingLayerSet() [2/2]

SeedingLayerSetsHits::SeedingLayerSet::SeedingLayerSet ( const SeedingLayerSetsHits sls,
std::vector< LayerSetIndex >::const_iterator  begin,
std::vector< LayerSetIndex >::const_iterator  end 
)
inline

Definition at line 98 of file SeedingLayerSetsHits.h.

101  : seedingLayerSets_(sls), begin_(begin), end_(end) {}

Member Function Documentation

◆ begin()

const_iterator SeedingLayerSetsHits::SeedingLayerSet::begin ( void  ) const
inline

Definition at line 129 of file SeedingLayerSetsHits.h.

129 { return const_iterator(seedingLayerSets_, begin_); }

References begin_, and seedingLayerSets_.

Referenced by cbegin(), and slice().

◆ cbegin()

const_iterator SeedingLayerSetsHits::SeedingLayerSet::cbegin ( ) const
inline

Definition at line 130 of file SeedingLayerSetsHits.h.

130 { return begin(); }

References begin().

◆ cend()

const_iterator SeedingLayerSetsHits::SeedingLayerSet::cend ( ) const
inline

Definition at line 132 of file SeedingLayerSetsHits.h.

132 { return end(); }

References end().

◆ end()

const_iterator SeedingLayerSetsHits::SeedingLayerSet::end ( void  ) const
inline

Definition at line 131 of file SeedingLayerSetsHits.h.

131 { return const_iterator(seedingLayerSets_, end_); }

References end_, and seedingLayerSets_.

Referenced by cend(), and slice().

◆ operator[]()

SeedingLayer SeedingLayerSetsHits::SeedingLayerSet::operator[] ( LayerSetIndex  index) const
inline

Get a given SeedingLayer (index is between 0 and size()-1)

Definition at line 126 of file SeedingLayerSetsHits.h.

126 { return SeedingLayer(seedingLayerSets_, *(begin_ + index)); }

References begin_, and seedingLayerSets_.

◆ size()

LayerSetIndex SeedingLayerSetsHits::SeedingLayerSet::size ( void  ) const
inline

Number of layers in this set.

Definition at line 104 of file SeedingLayerSetsHits.h.

104 { return end_ - begin_; }

References begin_, and end_.

Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), and slice().

◆ slice()

SeedingLayerSet SeedingLayerSetsHits::SeedingLayerSet::slice ( size_t  begin,
size_t  end 
) const
inline

Slices the layer set

E.g. slicing BPix1+BPix2+BPix3+BPix4 with (0,2) will give BPix1+BPix2.

Parameters
beginIndex for the first layer of the slice
endIndex for the one-beyond-last layer of the slice

It is caller's responsibility to guarantee that "begin < size()" and "0 < end <= size()" and "begin < end".

Definition at line 118 of file SeedingLayerSetsHits.h.

118  {
119  assert(begin < size());
120  assert(0 < end && end <= size());
121  assert(begin < end);
123  }

References cms::cuda::assert(), begin(), begin_, end(), SeedingLayerSet(), seedingLayerSets_, and size().

Member Data Documentation

◆ begin_

std::vector<LayerSetIndex>::const_iterator SeedingLayerSetsHits::SeedingLayerSet::begin_
private

Definition at line 136 of file SeedingLayerSetsHits.h.

Referenced by begin(), operator[](), size(), and slice().

◆ end_

std::vector<LayerSetIndex>::const_iterator SeedingLayerSetsHits::SeedingLayerSet::end_
private

Definition at line 137 of file SeedingLayerSetsHits.h.

Referenced by end(), and size().

◆ seedingLayerSets_

const SeedingLayerSetsHits* SeedingLayerSetsHits::SeedingLayerSet::seedingLayerSets_
private

Definition at line 135 of file SeedingLayerSetsHits.h.

Referenced by begin(), end(), operator[](), and slice().

SeedingLayerSetsHits::SeedingLayerSet::size
LayerSetIndex size() const
Number of layers in this set.
Definition: SeedingLayerSetsHits.h:104
SeedingLayerSetsHits::SeedingLayerSet::begin
const_iterator begin() const
Definition: SeedingLayerSetsHits.h:129
cms::cuda::assert
assert(be >=bs)
SeedingLayerSetsHits::SeedingLayerSet::end
const_iterator end() const
Definition: SeedingLayerSetsHits.h:131
SeedingLayerSetsHits::SeedingLayerSet::begin_
std::vector< LayerSetIndex >::const_iterator begin_
Definition: SeedingLayerSetsHits.h:136
SeedingLayerSetsHits::SeedingLayerSet::seedingLayerSets_
const SeedingLayerSetsHits * seedingLayerSets_
Definition: SeedingLayerSetsHits.h:135
SeedingLayerSetsHits::SeedingLayerSet::end_
std::vector< LayerSetIndex >::const_iterator end_
Definition: SeedingLayerSetsHits.h:137
SeedingLayerSetsHits::SeedingLayerSet::SeedingLayerSet
SeedingLayerSet()
Definition: SeedingLayerSetsHits.h:97
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46