ATLAS Offline Software
MissingETBase::Container Namespace Reference

Function Documentation

◆ iteratorAdvance()

template<class ITER >
ITER MissingETBase::Container::iteratorAdvance ( ITER  iter,
size_t  step 
)

Advance an iterator by a number of steps.

Returns
Advanced iterator.
Template Parameters
ITERiterator type.
Note
ITER::operator+(size_t) must be defined.
Parameters
[in]iterstarting iterator
[in]stepnumber of steps to advance
Warning
There is no control on the number of steps. The resulting iterator maybe invalid, except if ITER has a protection build in.

Definition at line 174 of file MissingETCompositionBase.h.

174 { ITER fIter(iter); std::advance(iter,step); return fIter; }

◆ iteratorDiff()

template<class ITER >
size_t MissingETBase::Container::iteratorDiff ( ITER  first,
ITER  last 
)

Difference (number of steps) between two iterators.

Returns
Number of steps from first to last iterator.
Template Parameters
ITERiterator type.
Note
ITER::operator-(const ITER&) must be defined with an integer return value >= 0.
Parameters
[in]firstfirst iterator
[in]lastlast iterator
Note
first needs to be identical to last, or precede it. Otherwise the return value may be undefined.

Definition at line 159 of file MissingETCompositionBase.h.

159 { return (size_t)(std::distance(first,last)); }
DeMoScan.first
bool first
Definition: DeMoScan.py:536
LArCellBinning.step
step
Definition: LArCellBinning.py:158
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54