CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
SiStripFedCabling::ConnsRange Class Reference

Builds range of iterators from pair of offsets. More...

#include <SiStripFedCabling.h>

Public Member Functions

ConnsConstIter begin () const
 
ConnsPair connsPair () const
 
 ConnsRange (const Conns &, ConnsPair)
 
 ConnsRange (const Conns &)
 
 ConnsRange ()
 
bool empty () const
 
ConnsConstIter end () const
 
ConnsConstIterRange invalid () const
 
void print (std::stringstream &) const
 
ConnsConstIterRange range () const
 
uint32_t size () const
 

Static Public Member Functions

static ConnsPair emptyPair ()
 

Private Attributes

ConnsConstIterRange range_
 
ConnsConstIterRange vector_
 

Detailed Description

Builds range of iterators from pair of offsets.

Definition at line 104 of file SiStripFedCabling.h.

Constructor & Destructor Documentation

◆ ConnsRange() [1/3]

SiStripFedCabling::ConnsRange::ConnsRange ( const Conns c,
ConnsPair  p 
)

Definition at line 118 of file SiStripFedCabling.cc.

References c, sistrip::invalid32_, AlCaHLTBitMon_ParallelJobs::p, and range_.

119  : vector_(c.begin(), c.end()), range_(c.begin() + p.first, c.begin() + p.second) {
120  if (p.first > p.second || p.first == sistrip::invalid32_ || p.second == sistrip::invalid32_ || p.first > c.size() ||
121  p.second > c.size()) {
122  range_ = ConnsConstIterRange(c.end(), c.end());
123  }
124 }
static const uint32_t invalid32_
Definition: Constants.h:15
boost::iterator_range< ConnsConstIter > ConnsConstIterRange

◆ ConnsRange() [2/3]

SiStripFedCabling::ConnsRange::ConnsRange ( const Conns c)

Definition at line 128 of file SiStripFedCabling.cc.

128 : vector_(c.begin(), c.end()), range_(c.end(), c.end()) { ; }

◆ ConnsRange() [3/3]

SiStripFedCabling::ConnsRange::ConnsRange ( )
inline

Definition at line 108 of file SiStripFedCabling.h.

108 { ; }

Member Function Documentation

◆ begin()

SiStripFedCabling::ConnsConstIter SiStripFedCabling::ConnsRange::begin ( void  ) const
inline

◆ connsPair()

SiStripFedCabling::ConnsPair SiStripFedCabling::ConnsRange::connsPair ( ) const
inline

Definition at line 180 of file SiStripFedCabling.h.

References HLT_2022v15_cff::distance, and sistrip::invalid32_.

180  {
181  return (
182  (range_.begin() == vector_.end() && range_.end() == vector_.end())
184  : ConnsPair(std::distance(vector_.begin(), range_.begin()), std::distance(vector_.begin(), range_.end())));
185 }
static const uint32_t invalid32_
Definition: Constants.h:15
std::pair< uint32_t, uint32_t > ConnsPair

◆ empty()

bool SiStripFedCabling::ConnsRange::empty ( ) const
inline

Definition at line 176 of file SiStripFedCabling.h.

176 { return (range_.begin() == range_.end()); }

◆ emptyPair()

SiStripFedCabling::ConnsPair SiStripFedCabling::ConnsRange::emptyPair ( )
inlinestatic

Definition at line 187 of file SiStripFedCabling.h.

References sistrip::invalid32_.

Referenced by SiStripFedCabling::buildFedCabling().

187  {
189 }
static const uint32_t invalid32_
Definition: Constants.h:15
std::pair< uint32_t, uint32_t > ConnsPair

◆ end()

SiStripFedCabling::ConnsConstIter SiStripFedCabling::ConnsRange::end ( void  ) const
inline

◆ invalid()

SiStripFedCabling::ConnsConstIterRange SiStripFedCabling::ConnsRange::invalid ( ) const
inline

Definition at line 172 of file SiStripFedCabling.h.

Referenced by SiStripFedCabling::fedConnections().

172  {
173  return ConnsConstIterRange(vector_.end(), vector_.end());
174 }
boost::iterator_range< ConnsConstIter > ConnsConstIterRange

◆ print()

void SiStripFedCabling::ConnsRange::print ( std::stringstream &  ss) const

Definition at line 132 of file SiStripFedCabling.cc.

References TauDecayModes::dec, HLT_2022v15_cff::distance, and contentValuesCheck::ss.

132  {
133  ss << "[SiStripFedCabling::ConnsRange::" << __func__ << "] Debug info:" << std::endl
134  << " Vector : " << std::endl
135  << " size : " << vector_.size() << std::endl
136  << " begin : " << std::hex << std::setfill('0') << std::setw(8) << &*vector_.begin() << std::dec << std::endl
137  << " end : " << std::hex << std::setfill('0') << std::setw(8) << &*vector_.end() << std::dec << std::endl
138  << " Range : " << std::endl
139  << " size : " << range_.size() << std::endl
140  << " begin : " << std::hex << std::setfill('0') << std::setw(8) << &*range_.begin() << std::dec
141  << " (dist=" << std::distance(vector_.begin(), range_.begin()) << ")" << std::endl
142  << " end : " << std::hex << std::setfill('0') << std::setw(8) << &*range_.end() << std::dec
143  << " (dist=" << std::distance(vector_.begin(), range_.end()) << ")" << std::endl
144  << " Offsets : " << std::endl
145  << " first : " << connsPair().first << std::endl
146  << " second : " << connsPair().second << std::endl;
147 }

◆ range()

SiStripFedCabling::ConnsConstIterRange SiStripFedCabling::ConnsRange::range ( ) const
inline

Definition at line 170 of file SiStripFedCabling.h.

Referenced by SiStripFedCabling::fedConnections().

170 { return range_; }

◆ size()

uint32_t SiStripFedCabling::ConnsRange::size ( void  ) const
inline

Member Data Documentation

◆ range_

ConnsConstIterRange SiStripFedCabling::ConnsRange::range_
private

Definition at line 125 of file SiStripFedCabling.h.

Referenced by begin(), and ConnsRange().

◆ vector_

ConnsConstIterRange SiStripFedCabling::ConnsRange::vector_
private

Definition at line 124 of file SiStripFedCabling.h.