CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 112 of file SiStripFedCabling.h.

Constructor & Destructor Documentation

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

Definition at line 134 of file SiStripFedCabling.cc.

References sistrip::invalid32_, and range_.

134  :
135  vector_( c.begin(), c.end() ),
136  range_( c.begin()+p.first, c.begin()+p.second )
137 {
138  if ( p.first > p.second ||
139  p.first == sistrip::invalid32_ ||
140  p.second == sistrip::invalid32_ ||
141  p.first > c.size() ||
142  p.second > c.size() ) {
143  range_ = ConnsConstIterRange( c.end(), c.end() );
144  }
145 }
static const uint32_t invalid32_
Definition: Constants.h:15
boost::iterator_range< ConnsConstIter > ConnsConstIterRange
SiStripFedCabling::ConnsRange::ConnsRange ( const Conns c)

Definition at line 149 of file SiStripFedCabling.cc.

149  :
150  vector_( c.begin(), c.end() ),
151  range_( c.end(), c.end() )
152 {;}
SiStripFedCabling::ConnsRange::ConnsRange ( )
inline

Definition at line 118 of file SiStripFedCabling.h.

118 {;}

Member Function Documentation

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

Definition at line 180 of file SiStripFedCabling.h.

References range_.

Referenced by SiStripFedCabling::buildFedCabling(), SiStripFedCabling::printDebug(), SiStripFedCabling::printSummary(), and SiStripFedCabling::terse().

180  {
181  return range_.begin();
182 }
SiStripFedCabling::ConnsPair SiStripFedCabling::ConnsRange::connsPair ( ) const
inline

Definition at line 204 of file SiStripFedCabling.h.

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

204  {
205  return ( ( range_.begin() == vector_.end() &&
206  range_.end() == vector_.end() ) ?
208  ConnsPair( std::distance( vector_.begin(), range_.begin() ),
209  std::distance( vector_.begin(), range_.end() ) ) );
210 }
std::pair< uint32_t, uint32_t > ConnsPair
static const uint32_t invalid32_
Definition: Constants.h:15
bool SiStripFedCabling::ConnsRange::empty ( ) const
inline

Definition at line 196 of file SiStripFedCabling.h.

Referenced by Vispa.Gui.VispaWidget.TextField::setAutosizeFont(), and Vispa.Gui.VispaWidget.TextField::setAutotruncate().

196  {
197  return ( range_.begin() == range_.end() );
198 }
SiStripFedCabling::ConnsPair SiStripFedCabling::ConnsRange::emptyPair ( )
inlinestatic

Definition at line 212 of file SiStripFedCabling.h.

References sistrip::invalid32_.

Referenced by SiStripFedCabling::buildFedCabling().

212  {
214 }
std::pair< uint32_t, uint32_t > ConnsPair
static const uint32_t invalid32_
Definition: Constants.h:15
SiStripFedCabling::ConnsConstIter SiStripFedCabling::ConnsRange::end ( void  ) const
inline
SiStripFedCabling::ConnsConstIterRange SiStripFedCabling::ConnsRange::invalid ( ) const
inline

Definition at line 192 of file SiStripFedCabling.h.

Referenced by SiStripFedCabling::fedConnections().

192  {
193  return ConnsConstIterRange( vector_.end(), vector_.end() );
194 }
boost::iterator_range< ConnsConstIter > ConnsConstIterRange
void SiStripFedCabling::ConnsRange::print ( std::stringstream &  ss) const

Definition at line 156 of file SiStripFedCabling.cc.

References TauDecayModes::dec, and HLT_25ns14e33_v1_cff::distance.

Referenced by operator<<().

156  {
157  ss << "[SiStripFedCabling::ConnsRange::" << __func__ << "] Debug info:" << std::endl
158  << " Vector : " << std::endl
159  << " size : " << vector_.size() << std::endl
160  << " begin : "
161  << std::hex << std::setfill('0') << std::setw(8)
162  << &*vector_.begin()
163  << std::dec << std::endl
164  << " end : "
165  << std::hex << std::setfill('0') << std::setw(8)
166  << &*vector_.end()
167  << std::dec << std::endl
168  << " Range : " << std::endl
169  << " size : " << range_.size() << std::endl
170  << " begin : "
171  << std::hex << std::setfill('0') << std::setw(8)
172  << &*range_.begin()
173  << std::dec
174  << " (dist=" << std::distance( vector_.begin(), range_.begin() ) << ")"
175  << std::endl
176  << " end : "
177  << std::hex << std::setfill('0') << std::setw(8)
178  << &*range_.end()
179  << std::dec
180  << " (dist=" << std::distance( vector_.begin(), range_.end() ) << ")"
181  << std::endl
182  << " Offsets : " << std::endl
183  << " first : " << connsPair().first << std::endl
184  << " second : " << connsPair().second << std::endl;
185 }
SiStripFedCabling::ConnsConstIterRange SiStripFedCabling::ConnsRange::range ( ) const
inline

Definition at line 188 of file SiStripFedCabling.h.

Referenced by SiStripFedCabling::fedConnections().

188  {
189  return range_;
190 }
uint32_t SiStripFedCabling::ConnsRange::size ( void  ) const
inline

Member Data Documentation

ConnsConstIterRange SiStripFedCabling::ConnsRange::range_
private

Definition at line 136 of file SiStripFedCabling.h.

Referenced by begin(), and ConnsRange().

ConnsConstIterRange SiStripFedCabling::ConnsRange::vector_
private

Definition at line 135 of file SiStripFedCabling.h.