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 ()
 
 ConnsRange (const Conns &)
 
 ConnsRange (const Conns &, ConnsPair)
 
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.

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 }

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

◆ 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.

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 }

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

◆ 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.

187  {
189 }

References sistrip::invalid32_.

Referenced by SiStripFedCabling::buildFedCabling().

◆ 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.

172  {
173  return ConnsConstIterRange(vector_.end(), vector_.end());
174 }

Referenced by SiStripFedCabling::fedConnections().

◆ print()

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

Definition at line 132 of file SiStripFedCabling.cc.

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 }

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

◆ range()

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

Definition at line 170 of file SiStripFedCabling.h.

170 { return range_; }

Referenced by SiStripFedCabling::fedConnections().

◆ 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.

SiStripFedCabling::ConnsRange::vector_
ConnsConstIterRange vector_
Definition: SiStripFedCabling.h:124
sistrip::invalid32_
static const uint32_t invalid32_
Definition: Constants.h:15
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HLT_2018_cff.distance
distance
Definition: HLT_2018_cff.py:6417
SiStripFedCabling::ConnsRange::connsPair
ConnsPair connsPair() const
Definition: SiStripFedCabling.h:180
SiStripFedCabling::ConnsConstIterRange
boost::iterator_range< ConnsConstIter > ConnsConstIterRange
Definition: SiStripFedCabling.h:47
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
SiStripFedCabling::ConnsRange::range_
ConnsConstIterRange range_
Definition: SiStripFedCabling.h:125
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
SiStripFedCabling::ConnsPair
std::pair< uint32_t, uint32_t > ConnsPair
Definition: SiStripFedCabling.h:49
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143