ATLAS Offline Software
Public Member Functions | Private Types | Private Attributes | List of all members
MultiRange::const_identifier_factory Class Reference

#include <MultiRange.h>

Collaboration diagram for MultiRange::const_identifier_factory:

Public Member Functions

 const_identifier_factory ()=default
 
 const_identifier_factory (const MultiRange &multirange)
 
void operator++ ()
 
const ExpandedIdentifieroperator* () const
 
bool operator== (const const_identifier_factory &other) const
 

Private Types

using id_vec = std::vector< ExpandedIdentifier >
 
using id_iterator = id_vec::iterator
 
using id_const_iterator = id_vec::const_iterator
 

Private Attributes

ExpandedIdentifier m_id
 
ConstRangeIterator m_id_fac_it
 
ConstRangeIterator m_id_fac_end
 
range_vector::const_iterator m_range_it
 
range_vector::const_iterator m_range_end
 
id_iterator m_id_vec_it
 
id_iterator m_id_vec_end
 

Detailed Description

Definition at line 52 of file MultiRange.h.

Member Typedef Documentation

◆ id_const_iterator

using MultiRange::const_identifier_factory::id_const_iterator = id_vec::const_iterator
private

Definition at line 63 of file MultiRange.h.

◆ id_iterator

using MultiRange::const_identifier_factory::id_iterator = id_vec::iterator
private

Definition at line 62 of file MultiRange.h.

◆ id_vec

Definition at line 61 of file MultiRange.h.

Constructor & Destructor Documentation

◆ const_identifier_factory() [1/2]

MultiRange::const_identifier_factory::const_identifier_factory ( )
default

◆ const_identifier_factory() [2/2]

MultiRange::const_identifier_factory::const_identifier_factory ( const MultiRange multirange)

Set up iterators over ranges and ids.

Definition at line 186 of file MultiRange.cxx.

187  :
188  m_range_it(multirange.m_ranges.begin()),
189  m_range_end(multirange.m_ranges.end()){
190 
191  if (m_range_it == m_range_end) return; // no ranges
195  if (m_range_it != m_range_end) {
196  m_id_fac_it = ConstRangeIterator(*m_range_it).begin();
197  m_id_fac_end = ConstRangeIterator(*m_range_it).end();
198  if(m_id_fac_it != m_id_fac_end) {
199  // Set id
200  m_id = *m_id_fac_it;
201  }
202  }
203 }

Member Function Documentation

◆ operator*()

const ExpandedIdentifier & MultiRange::const_identifier_factory::operator* ( ) const

Definition at line 227 of file MultiRange.cxx.

227  {
228  return (m_id);
229 }

◆ operator++()

void MultiRange::const_identifier_factory::operator++ ( )

Definition at line 206 of file MultiRange.cxx.

206  {
207  if (m_id.fields () == 0) return;
208  m_id.clear();
209  if (m_range_it != m_range_end) {
210  if (m_id_fac_it != m_id_fac_end) {
211  ++m_id_fac_it;
212  }
213  if (m_id_fac_it == m_id_fac_end) {
214  ++m_range_it;
215  if (m_range_it != m_range_end) {
216  m_id_fac_it = ConstRangeIterator(*m_range_it).begin();
217  m_id_fac_end = ConstRangeIterator(*m_range_it).end();
218  }
219  }
220  if (m_id_fac_it != m_id_fac_end) {
221  m_id = *m_id_fac_it;
222  }
223  }
224 }

◆ operator==()

bool MultiRange::const_identifier_factory::operator== ( const const_identifier_factory other) const

Definition at line 232 of file MultiRange.cxx.

232  {
233  return (m_id == other.m_id);
234 }

Member Data Documentation

◆ m_id

ExpandedIdentifier MultiRange::const_identifier_factory::m_id
private

Definition at line 65 of file MultiRange.h.

◆ m_id_fac_end

ConstRangeIterator MultiRange::const_identifier_factory::m_id_fac_end
private

Definition at line 67 of file MultiRange.h.

◆ m_id_fac_it

ConstRangeIterator MultiRange::const_identifier_factory::m_id_fac_it
private

Definition at line 66 of file MultiRange.h.

◆ m_id_vec_end

id_iterator MultiRange::const_identifier_factory::m_id_vec_end
private

Definition at line 71 of file MultiRange.h.

◆ m_id_vec_it

id_iterator MultiRange::const_identifier_factory::m_id_vec_it
private

Definition at line 70 of file MultiRange.h.

◆ m_range_end

range_vector::const_iterator MultiRange::const_identifier_factory::m_range_end
private

Definition at line 69 of file MultiRange.h.

◆ m_range_it

range_vector::const_iterator MultiRange::const_identifier_factory::m_range_it
private

Definition at line 68 of file MultiRange.h.


The documentation for this class was generated from the following files:
ConstRangeIterator
Definition: RangeIterator.h:46
MultiRange::const_identifier_factory::m_id_fac_it
ConstRangeIterator m_id_fac_it
Definition: MultiRange.h:66
ExpandedIdentifier::fields
size_type fields() const
MultiRange::const_identifier_factory::m_range_it
range_vector::const_iterator m_range_it
Definition: MultiRange.h:68
MultiRange::m_ranges
range_vector m_ranges
Definition: MultiRange.h:131
MultiRange::const_identifier_factory::m_range_end
range_vector::const_iterator m_range_end
Definition: MultiRange.h:69
MultiRange::const_identifier_factory::m_id_fac_end
ConstRangeIterator m_id_fac_end
Definition: MultiRange.h:67
MultiRange::const_identifier_factory::m_id
ExpandedIdentifier m_id
Definition: MultiRange.h:65
ConstRangeIterator::begin
ConstRangeIterator begin() const
Definition: RangeIterator.cxx:18
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
ExpandedIdentifier::clear
void clear()
Erase all fields.
ConstRangeIterator::end
ConstRangeIterator end() const
Definition: RangeIterator.cxx:32