CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
SiStripFedCabling Class Reference

Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses, DCU id... More...

#include <SiStripFedCabling.h>

Classes

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

Public Types

typedef std::vector< FedChannelConnectionConns
 
typedef Conns::const_iterator ConnsConstIter
 
typedef boost::iterator_range< ConnsConstIterConnsConstIterRange
 
typedef Conns::iterator ConnsIter
 
typedef boost::iterator_range< ConnsIterConnsIterRange
 
typedef std::pair< uint32_t, uint32_t > ConnsPair
 
typedef std::vector< uint16_t > Feds
 
typedef Feds::const_iterator FedsConstIter
 
typedef boost::iterator_range< FedsConstIterFedsConstIterRange
 
typedef Feds::iterator FedsIter
 
typedef boost::iterator_range< FedsIterFedsIterRange
 
typedef std::vector< ConnsPairRegistry
 

Public Member Functions

void buildFedCabling (ConnsConstIterRange connections)
 
ConnsConstIterRange detectedDevices () const
 
FedChannelConnection fedConnection (uint16_t fed_id, uint16_t fed_ch) const
 
ConnsConstIterRange fedConnections (uint16_t fed_id) const
 
FedsConstIterRange fedIds () const
 
void print (std::stringstream &ss, const TrackerTopology *trackerTopo) const
 LEFT FOR COMPATIBILITY. SHOULD BE REPLACED BY PRINTDEBUG. More...
 
void printDebug (std::stringstream &, const TrackerTopology *trackerTopo) const
 
void printSummary (std::stringstream &, const TrackerTopology *trackerTopo) const
 
ConnsRange range (ConnsPair) const
 Builds range of iterators from pair of offsets. More...
 
 SiStripFedCabling (ConnsConstIterRange)
 
 SiStripFedCabling (const SiStripFedCabling &)
 
 SiStripFedCabling ()
 
void summary (std::stringstream &ss, const TrackerTopology *trackerTopo) const
 LEFT FOR COMPATIBILITY. SHOULD BE REPLACED BY PRINTSUMMARY. More...
 
void terse (std::stringstream &) const
 
ConnsConstIterRange undetectedDevices () const
 
 ~SiStripFedCabling ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

Conns connections_
 Container of connection objects. More...
 
Conns detected_
 Connections to FE devices that are not detected. More...
 
Feds feds_
 "Active" FEDs that have connected FE devices More...
 
Registry registry_
 Container of "ranges" indexed by FED id. More...
 
Conns undetected_
 FE devices that are detected. More...
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses, DCU id...

Definition at line 25 of file SiStripFedCabling.h.

Member Typedef Documentation

Definition at line 41 of file SiStripFedCabling.h.

typedef Conns::const_iterator SiStripFedCabling::ConnsConstIter

Definition at line 45 of file SiStripFedCabling.h.

Definition at line 49 of file SiStripFedCabling.h.

typedef Conns::iterator SiStripFedCabling::ConnsIter

Definition at line 43 of file SiStripFedCabling.h.

typedef boost::iterator_range<ConnsIter> SiStripFedCabling::ConnsIterRange

Definition at line 47 of file SiStripFedCabling.h.

typedef std::pair<uint32_t,uint32_t> SiStripFedCabling::ConnsPair

Definition at line 51 of file SiStripFedCabling.h.

typedef std::vector<uint16_t> SiStripFedCabling::Feds

Definition at line 31 of file SiStripFedCabling.h.

typedef Feds::const_iterator SiStripFedCabling::FedsConstIter

Definition at line 35 of file SiStripFedCabling.h.

typedef boost::iterator_range<FedsConstIter> SiStripFedCabling::FedsConstIterRange

Definition at line 39 of file SiStripFedCabling.h.

typedef Feds::iterator SiStripFedCabling::FedsIter

Definition at line 33 of file SiStripFedCabling.h.

typedef boost::iterator_range<FedsIter> SiStripFedCabling::FedsIterRange

Definition at line 37 of file SiStripFedCabling.h.

typedef std::vector<ConnsPair> SiStripFedCabling::Registry

Definition at line 53 of file SiStripFedCabling.h.

Constructor & Destructor Documentation

SiStripFedCabling::SiStripFedCabling ( ConnsConstIterRange  input)

Constructor taking FED channel connection objects as input.

Definition at line 13 of file SiStripFedCabling.cc.

References buildFedCabling(), LogTrace, and sistrip::mlCabling_.

14  : feds_(),
15  registry_(),
16  connections_(),
17  detected_(),
18  undetected_()
19 {
21  << "[SiStripFedCabling::" << __func__ << "]"
22  << " Constructing object from connection range...";
24 }
Conns connections_
Container of connection objects.
Feds feds_
"Active" FEDs that have connected FE devices
Registry registry_
Container of "ranges" indexed by FED id.
Conns undetected_
FE devices that are detected.
static std::string const input
Definition: EdmProvDump.cc:45
static const char mlCabling_[]
Conns detected_
Connections to FE devices that are not detected.
#define LogTrace(id)
void buildFedCabling(ConnsConstIterRange connections)
SiStripFedCabling::SiStripFedCabling ( const SiStripFedCabling input)

Copy constructor.

Definition at line 28 of file SiStripFedCabling.cc.

References LogTrace, and sistrip::mlCabling_.

29  : feds_( input.feds_ ),
30  registry_( input.registry_ ),
31  connections_( input.connections_ ),
32  detected_( input.detected_ ),
33  undetected_( input.undetected_ )
34 {
36  << "[SiStripFedCabling::" << __func__ << "]"
37  << " Copy constructing object...";
38 }
Conns connections_
Container of connection objects.
Feds feds_
"Active" FEDs that have connected FE devices
Registry registry_
Container of "ranges" indexed by FED id.
Conns undetected_
FE devices that are detected.
static const char mlCabling_[]
Conns detected_
Connections to FE devices that are not detected.
#define LogTrace(id)
SiStripFedCabling::SiStripFedCabling ( )

Public default constructor.

Definition at line 42 of file SiStripFedCabling.cc.

References LogTrace, and sistrip::mlCabling_.

43  : feds_(),
44  registry_(),
45  connections_(),
46  detected_(),
47  undetected_()
48 {
50  << "[SiStripFedCabling::" << __func__ << "]"
51  << " Default constructing object...";
52 }
Conns connections_
Container of connection objects.
Feds feds_
"Active" FEDs that have connected FE devices
Registry registry_
Container of "ranges" indexed by FED id.
Conns undetected_
FE devices that are detected.
static const char mlCabling_[]
Conns detected_
Connections to FE devices that are not detected.
#define LogTrace(id)
SiStripFedCabling::~SiStripFedCabling ( )

Default destructor.

Definition at line 56 of file SiStripFedCabling.cc.

References LogTrace, and sistrip::mlCabling_.

56  {
58  << "[SiStripFedCabling::" << __func__ << "]"
59  << " Destructing object...";
60 }
static const char mlCabling_[]
#define LogTrace(id)

Member Function Documentation

void SiStripFedCabling::buildFedCabling ( ConnsConstIterRange  connections)

Builds FED cabling from vector of FED connections.

Definition at line 64 of file SiStripFedCabling.cc.

References SiStripFedCabling::ConnsRange::begin(), connections_, popcon2dropbox::copy(), SoftLeptonByDistance_cfi::distance, SiStripFedCabling::ConnsRange::emptyPair(), feds_, spr::find(), cuy::ii, findQualityFiles::jj, LogTrace, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINSiStripFEDID, sistrip::mlCabling_, range(), registry_, and groupFilesInBlocks::temp.

Referenced by SiStripFedCablingBuilderFromDb::getFedCabling(), and SiStripFedCabling().

64  {
65 
66  // Check input
67  if ( input.empty() ) {
69  << "[SiStripFedCabling::" << __func__ << "]"
70  << " Input vector of FedChannelConnections is of zero size!"
71  << " Unable to populate FED cabling object!";
72  return;
73  }
74 
75  std::stringstream ss;
76  ss << "[SiStripFedCabling::" << __func__ << "]"
77  << " Building FED cabling from "
78  << input.size()
79  << " connections...";
80  LogTrace(mlCabling_) << ss.str();
81 
82  // Sort input vector by FED id and channel
83  Conns temp( input.size() );
84  std::copy( input.begin(), input.end(), temp.begin() );
85  std::sort( temp.begin(), temp.end() );
86 
87  // Strip FED ids
88  uint16_t min_id = static_cast<uint16_t>( FEDNumbering::MINSiStripFEDID );
89  uint16_t max_id = static_cast<uint16_t>( FEDNumbering::MAXSiStripFEDID );
90  uint16_t nfeds = max_id - min_id + 1;
91 
92  // Initialise containers
93  connections_.clear();
94  connections_.reserve( 96 * nfeds );
95  registry_.clear();
96  feds_.clear();
97  registry_.resize( nfeds, ConnsRange::emptyPair() );
98 
99  // Populate container
100  ConnsIter ii = temp.begin();
101  ConnsIter jj = temp.end();
102  for ( ; ii != jj; ++ii ) {
103 
104  uint16_t fed_id = ii->fedId();
105  uint16_t fed_ch = ii->fedCh();
106  uint16_t index = fed_id - min_id;
107 
108  if ( fed_id < min_id || fed_id > max_id ) { continue; }
109  if ( index >= registry_.size() ) { continue; }
110  if ( !ii->isConnected() ) { continue; }
111 
112  FedsConstIter iter = find( feds_.begin(), feds_.end(), fed_id );
113  if ( iter == feds_.end() ) { feds_.push_back( fed_id ); }
114 
115  if ( registry_[index] == ConnsRange::emptyPair() ) {
116  ConnsPair conns_pair;
117  conns_pair.first = std::distance( connections_.begin(), connections_.end() );
118  connections_.insert( connections_.end(), 96, FedChannelConnection() );
119  conns_pair.second = std::distance( connections_.begin(), connections_.end() );
120  registry_[index] = conns_pair;
121  }
122 
123  ConnsRange conns = range( registry_[index] );
124  ConnsConstIter iconn = conns.begin() + fed_ch;
125  FedChannelConnection& conn = const_cast<FedChannelConnection&>(*iconn);
126  conn = *ii;
127 
128  }
129 
130 }
Conns connections_
Container of connection objects.
Feds feds_
"Active" FEDs that have connected FE devices
std::pair< uint32_t, uint32_t > ConnsPair
def copy(args, dbName)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
Registry registry_
Container of "ranges" indexed by FED id.
Conns::iterator ConnsIter
static std::string const input
Definition: EdmProvDump.cc:45
static const char mlCabling_[]
Class containning control, module, detector and connection information, at the level of a FED channel...
Feds::const_iterator FedsConstIter
#define LogTrace(id)
ii
Definition: cuy.py:590
ConnsRange range(ConnsPair) const
Builds range of iterators from pair of offsets.
std::vector< FedChannelConnection > Conns
Conns::const_iterator ConnsConstIter
SiStripFedCabling::ConnsConstIterRange SiStripFedCabling::detectedDevices ( ) const
inline

Returns information for "detected, but unconnected" devices.

Definition at line 170 of file SiStripFedCabling.h.

References detected_.

Referenced by SiStripDetCabling::SiStripDetCabling().

170  {
171  return ConnsConstIterRange( detected_.begin(), detected_.end() );
172 }
boost::iterator_range< ConnsConstIter > ConnsConstIterRange
Conns detected_
Connections to FE devices that are not detected.
FedChannelConnection SiStripFedCabling::fedConnection ( uint16_t  fed_id,
uint16_t  fed_ch 
) const

Returns connection object for a given FED id and channel.

Definition at line 207 of file SiStripFedCabling.cc.

References fedConnections().

Referenced by CommissioningHistosUsingDb::addDcuDetIds(), SiStripSpyMonitorModule::analyze(), SiStripCMMonitorPlugin::analyze(), SiStripShotFilter::filter(), SiStripBadModuleFedErrESSource::produce(), sistrip::FEDEmulatorModule::produce(), SiStripPopConFEDErrorsHandlerFromDQM::readHistogram(), PedsFullNoiseHistosUsingDb::update(), PedsOnlyHistosUsingDb::update(), PedestalsHistosUsingDb::update(), DaqScopeModeHistosUsingDb::update(), NoiseHistosUsingDb::update(), and ApvTimingHistosUsingDb::update().

208  {
209  ConnsConstIterRange conns = fedConnections( fed_id );
210  if ( !conns.empty() && conns.size() == 96 && fed_ch < 96 ) {
211  return *( conns.begin() + fed_ch );
212  } else { return FedChannelConnection(); }
213 }
boost::iterator_range< ConnsConstIter > ConnsConstIterRange
Class containning control, module, detector and connection information, at the level of a FED channel...
ConnsConstIterRange fedConnections(uint16_t fed_id) const
SiStripFedCabling::ConnsConstIterRange SiStripFedCabling::fedConnections ( uint16_t  fed_id) const

Returns all connection objects for a given FED id.

Definition at line 198 of file SiStripFedCabling.cc.

References FEDNumbering::MINSiStripFEDID, SiStripFedCabling::ConnsRange::range(), and registry_.

Referenced by SiStripFineDelayHit::beginRun(), TrackerDpgAnalysis::beginRun(), SiStripFecCabling::buildFecCabling(), ViewTranslator::buildMaps(), FineDelayHistosUsingDb::computeDelays(), sistrip::RawToDigiUnpacker::createDigis(), sistrip::SpyUnpacker::createDigis(), sistrip::DigiToRaw::createFedBuffers_(), SiStripCommissioningSource::createTasks(), SiStripPopConFEDErrorsHandlerFromDQM::dqmEndJob(), SiStripCommissioningSource::endJob(), fedConnection(), SiStripCommissioningSource::fillHistos(), LaserAlignmentEventFilter::filter(), SiStripDaqInfo::findExcludedModule(), sistrip::SpyEventMatcherModule::findL1IDandAPVAddress(), SiStripDCSStatus::initialise(), SiStripFedCablingManipulator::manipulate(), sistrip::SpyEventMatcher::mergeMatchingData(), sistrip::SpyDigiConverter::mergeModuleChannels(), sistrip::ExcludedFEDListProducer::produce(), SiStripDaqInfo::readFedIds(), SiStripDetCabling::SiStripDetCabling(), TrackerMap::TrackerMap(), SiStripQuality::turnOffFeds(), LatencyHistosUsingDb::update(), and FineDelayHistosUsingDb::update().

198  {
199  uint16_t index = fed_id - FEDNumbering::MINSiStripFEDID;
200  if ( index < registry_.size() ) {
201  return range( registry_[ index ] ).range();
202  } else { return range( registry_[ index ] ).invalid(); }
203 }
ConnsConstIterRange range() const
Registry registry_
Container of "ranges" indexed by FED id.
ConnsConstIterRange invalid() const
ConnsRange range(ConnsPair) const
Builds range of iterators from pair of offsets.
SiStripFedCabling::FedsConstIterRange SiStripFedCabling::fedIds ( ) const
inline
void SiStripFedCabling::print ( std::stringstream &  ss,
const TrackerTopology trackerTopo 
) const
inline

LEFT FOR COMPATIBILITY. SHOULD BE REPLACED BY PRINTDEBUG.

Definition at line 95 of file SiStripFedCabling.h.

References printDebug(), printSummary(), and terse().

Referenced by SiStripFedCablingBuilder::beginRun().

95  {
96  printDebug(ss, trackerTopo);
97  }
void printDebug(std::stringstream &, const TrackerTopology *trackerTopo) const
void SiStripFedCabling::printDebug ( std::stringstream &  ss,
const TrackerTopology trackerTopo 
) const

Prints all connection information for this FED cabling object.

Definition at line 217 of file SiStripFedCabling.cc.

References SiStripFedCabling::ConnsRange::begin(), detected_, SiStripFedCabling::ConnsRange::end(), feds_, cuy::ii, sistrip::invalid_, findQualityFiles::jj, FEDNumbering::MINSiStripFEDID, SiStripFedCabling::ConnsRange::range(), registry_, SiStripFedCabling::ConnsRange::size(), pileupDistInMC::total, and undetected_.

Referenced by print().

217  {
218 
219  uint16_t total = 0;
220  uint16_t nfeds = 0;
221  uint16_t cntr = 0;
222 
223  if ( feds_.empty() ) {
224  ss << "[SiStripFedCabling::" << __func__ << "]"
225  << " No FEDs found! Unable to print cabling map!";
226  return;
227  } else {
228  ss << "[SiStripFedCabling::" << __func__ << "]"
229  << " Printing cabling map for " << feds_.size()
230  << " FEDs with following ids: ";
231  }
232 
233  std::vector<uint16_t>::const_iterator ii = feds_.begin();
234  std::vector<uint16_t>::const_iterator jj = feds_.end();
235  for ( ; ii != jj; ++ii ) { ss << *ii << " "; }
236  ss << std::endl << std::endl;
237 
238  std::vector<uint16_t>::const_iterator ifed = feds_.begin();
239  std::vector<uint16_t>::const_iterator jfed = feds_.end();
240  for ( ; ifed != jfed; ++ifed ) {
241 
242  uint16_t index = *ifed - FEDNumbering::MINSiStripFEDID;
243  if ( index < registry_.size() ) {
244  ConnsRange conns = range( registry_[ index ] );
245 
246  ss << " Printing cabling information for FED id " << *ifed
247  << " (found " << conns.size()
248  << " FedChannelConnection objects...)"
249  << std::endl;
250 
251  uint16_t ichan = 0;
252  uint16_t connected = 0;
253  ConnsConstIter iconn = conns.begin();
254  ConnsConstIter jconn = conns.end();
255  for ( ; iconn != jconn; ++iconn ) {
256  if ( iconn->fedId() != sistrip::invalid_ ) {
257  connected++;
258  ss << *iconn << std::endl;
259  } else {
260  ss << " (FedId/Ch " << *ifed << "/" << ichan
261  << ": unconnected channel...)" << std::endl;
262  cntr++;
263  }
264  ichan++;
265  }
266 
267  ss << " Found " << connected
268  << " connected channels for FED id " << *ifed << std::endl
269  << std::endl;
270  if ( connected ) { nfeds++; total += connected; }
271 
272  }
273 
274  }
275 
276  float percent = (100.*cntr) / (96.*nfeds);
277  percent = static_cast<uint16_t>( 10.*percent );
278  percent /= 10.;
279  ss << " Found " << total
280  << " APV pairs that are connected to a total of "
281  << nfeds << " FEDs" << std::endl
282  << " " << detected_.size()
283  << " APV pairs have been detected, but are not connected" << std::endl
284  << " " << undetected_.size()
285  << " APV pairs are undetected (wrt DCU-DetId map)" << std::endl
286  << " " << cntr
287  << " FED channels out of a possible " << (96*nfeds)
288  << " (" << nfeds << " FEDs) are unconnected ("
289  << percent << "%)" << std::endl
290  << std::endl;
291 
292 }
Feds feds_
"Active" FEDs that have connected FE devices
Registry registry_
Container of "ranges" indexed by FED id.
Conns undetected_
FE devices that are detected.
Conns detected_
Connections to FE devices that are not detected.
ii
Definition: cuy.py:590
ConnsRange range(ConnsPair) const
Builds range of iterators from pair of offsets.
static const uint16_t invalid_
Definition: Constants.h:16
Conns::const_iterator ConnsConstIter
void SiStripFedCabling::printSummary ( std::stringstream &  ss,
const TrackerTopology trackerTopo 
) const

Prints summary information for this FED cabling object.

Definition at line 345 of file SiStripFedCabling.cc.

References SiStripFedCabling::ConnsRange::begin(), detected_, feds_, SiStripFedKey::feUnit(), cuy::ii, findQualityFiles::jj, FEDNumbering::MINSiStripFEDID, sistrip::mlCabling_, SiStripFedCabling::ConnsRange::range(), registry_, SiStripFedCabling::ConnsRange::size(), pileupDistInMC::total, undetected_, csvLumiCalc::unit, and sistrip::valid_.

Referenced by print(), and summary().

345  {
346 
347  ss << "[SiStripFedCabling::" << __func__ << "]";
348 
349  if ( feds_.empty() ) {
350  ss << " No FEDs found!";
351  return;
352  }
353 
354  ss << " Found " << feds_.size() << " FEDs"
355  << " with number of connected channels per front-end unit: "
356  << std::endl
357  << " FedId FeUnit1 FeUnit2 FeUnit3 FeUnit4 FeUnit5 FeUnit6 FeUnit7 FeUnit8 Total"
358  << std::endl;
359 
360  uint16_t total = 0;
361  uint16_t nfeds = 0;
362 
363  // iterate through fed ids
364  std::vector<uint16_t>::const_iterator ii = feds_.begin();
365  std::vector<uint16_t>::const_iterator jj = feds_.end();
366  for ( ; ii != jj; ++ii ) {
367 
368  // check number of connection objects
369  uint16_t index = *ii - FEDNumbering::MINSiStripFEDID;
370  if ( index < registry_.size() ) {
371  ConnsRange conns = range( registry_[ index ] );
372 
373  if ( conns.size() < 96 ) {
375  << "[SiStripFedCabling::" << __func__ << "]"
376  << " Unexpected size for FedChannelConnection vector! "
377  << conns.size();
378  return;
379  }
380 
381  // count connected channels at level of fe unit
382  std::vector<uint16_t> connected;
383  connected.resize(8,0);
384  for ( uint16_t ichan = 0; ichan < 96; ++ichan ) {
385  ConnsConstIter iconn = conns.begin() + ichan;
386  if ( iconn->fedId() < sistrip::valid_ ) {
387  uint16_t unit = SiStripFedKey::feUnit(ichan);
388  if ( unit > 8 ) { continue; }
389  connected[unit-1]++;
390  }
391  }
392 
393  // increment counters
394  uint16_t tot = 0 ;
395  ss << " " << std::setw(5) << *ii;
396  if ( !connected.empty() ) { nfeds++; }
397  for ( uint16_t unit = 0; unit < 8; ++unit ) {
398  ss << " " << std::setw(7) << connected[unit];
399  if ( !connected.empty() ) { tot += connected[unit]; }
400  }
401  ss << " " << std::setw(5) << tot << std::endl;
402  total += tot;
403 
404  }
405 
406  }
407 
408  // print out
409  float percent = (100.*total) / (96.*nfeds);
410  percent = static_cast<uint16_t>( 10.*percent );
411  percent /= 10.;
412  ss << " Found: " << std::endl
413  << " " << nfeds << " out of " << feds_.size()
414  << " FEDs with at least one connected channel " << std::endl
415  << " " << feds_.size() - nfeds << " out of " << feds_.size()
416  << " FEDs with no connected channels." << std::endl
417  << " " << total << " connected channels in total" << std::endl
418  << " " << detected_.size()
419  << " APV pairs have been detected, but are not connected" << std::endl
420  << " " << undetected_.size()
421  << " APV pairs are undetected (wrt DCU-DetId map)" << std::endl
422  << " " << percent
423  << "% of FED channels are connected" << std::endl;
424 
425 }
Feds feds_
"Active" FEDs that have connected FE devices
static const uint16_t valid_
Definition: Constants.h:17
Registry registry_
Container of "ranges" indexed by FED id.
Conns undetected_
FE devices that are detected.
static const char mlCabling_[]
Conns detected_
Connections to FE devices that are not detected.
ii
Definition: cuy.py:590
ConnsRange range(ConnsPair) const
Builds range of iterators from pair of offsets.
const uint16_t & feUnit() const
Conns::const_iterator ConnsConstIter
SiStripFedCabling::ConnsRange SiStripFedCabling::range ( SiStripFedCabling::ConnsPair  p) const
inline

Builds range of iterators from pair of offsets.

Definition at line 214 of file SiStripFedCabling.h.

References connections_, and SiStripFedCabling::ConnsRange::ConnsRange().

Referenced by buildFedCabling().

214  {
215  return ConnsRange( connections_, p );
216 }
Conns connections_
Container of connection objects.
template<class Archive >
void SiStripFedCabling::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void SiStripFedCabling::summary ( std::stringstream &  ss,
const TrackerTopology trackerTopo 
) const
inline

LEFT FOR COMPATIBILITY. SHOULD BE REPLACED BY PRINTSUMMARY.

Definition at line 105 of file SiStripFedCabling.h.

References printSummary().

Referenced by SiStripFedCablingBuilder::beginRun(), CommissioningHistosUsingDb::configure(), and sistrip::RawToDigiModule::updateCabling().

105  {
106  printSummary(ss, trackerTopo);
107  }
void printSummary(std::stringstream &, const TrackerTopology *trackerTopo) const
void SiStripFedCabling::terse ( std::stringstream &  ss) const

Prints terse information for this FED cabling object.

Definition at line 296 of file SiStripFedCabling.cc.

References SiStripFedCabling::ConnsRange::begin(), SiStripFedCabling::ConnsRange::end(), feds_, sistrip::invalid_, FEDNumbering::MINSiStripFEDID, SiStripFedCabling::ConnsRange::range(), registry_, and SiStripFedCabling::ConnsRange::size().

Referenced by SiStripFedCablingBuilder::beginRun(), CommissioningHistosUsingDb::configure(), print(), and sistrip::RawToDigiModule::updateCabling().

296  {
297 
298 
299  ss << "[SiStripFedCabling::" << __func__ << "]";
300 
301  if ( feds_.empty() ) {
302  ss << " No FEDs found! Unable to print cabling map!";
303  return;
304  }
305 
306  ss << " Printing cabling map for " << feds_.size()
307  << " FEDs: " << std::endl << std::endl;
308 
309  std::vector<uint16_t>::const_iterator ifed = feds_.begin();
310  std::vector<uint16_t>::const_iterator jfed = feds_.end();
311  for ( ; ifed != jfed; ++ifed ) {
312 
313  uint16_t index = *ifed - FEDNumbering::MINSiStripFEDID;
314  if ( index < registry_.size() ) {
315  ConnsRange conns = range( registry_[ index ] );
316 
317  ss << " Printing cabling information for FED id " << *ifed
318  << " (found " << conns.size()
319  << " FedChannelConnection objects...)"
320  << std::endl;
321 
322  uint16_t connected = 0;
323  ConnsConstIter iconn = conns.begin();
324  ConnsConstIter jconn = conns.end();
325  for ( ; iconn != jconn; ++iconn ) {
326  if ( iconn->fedId() != sistrip::invalid_ ) {
327  connected++;
328  iconn->terse(ss);
329  ss << std::endl;
330  }
331  }
332 
333  ss << " Found " << connected
334  << " connected channels for FED id " << *ifed << std::endl
335  << std::endl;
336 
337  }
338 
339  }
340 
341 }
Feds feds_
"Active" FEDs that have connected FE devices
Registry registry_
Container of "ranges" indexed by FED id.
ConnsRange range(ConnsPair) const
Builds range of iterators from pair of offsets.
static const uint16_t invalid_
Definition: Constants.h:16
Conns::const_iterator ConnsConstIter
SiStripFedCabling::ConnsConstIterRange SiStripFedCabling::undetectedDevices ( ) const
inline

Returns information for all "undetected" devices.

Definition at line 174 of file SiStripFedCabling.h.

References undetected_.

Referenced by SiStripDetCabling::SiStripDetCabling().

174  {
175  return ConnsConstIterRange( undetected_.begin(), undetected_.end() );
176 }
Conns undetected_
FE devices that are detected.
boost::iterator_range< ConnsConstIter > ConnsConstIterRange

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 161 of file SiStripFedCabling.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 161 of file SiStripFedCabling.h.

Member Data Documentation

Conns SiStripFedCabling::connections_
private

Container of connection objects.

Definition at line 152 of file SiStripFedCabling.h.

Referenced by buildFedCabling(), and range().

Conns SiStripFedCabling::detected_
private

Connections to FE devices that are not detected.

Definition at line 155 of file SiStripFedCabling.h.

Referenced by detectedDevices(), printDebug(), and printSummary().

Feds SiStripFedCabling::feds_
private

"Active" FEDs that have connected FE devices

Definition at line 146 of file SiStripFedCabling.h.

Referenced by buildFedCabling(), fedIds(), printDebug(), printSummary(), and terse().

Registry SiStripFedCabling::registry_
private

Container of "ranges" indexed by FED id.

Definition at line 149 of file SiStripFedCabling.h.

Referenced by buildFedCabling(), fedConnections(), printDebug(), printSummary(), and terse().

Conns SiStripFedCabling::undetected_
private

FE devices that are detected.

Definition at line 158 of file SiStripFedCabling.h.

Referenced by printDebug(), printSummary(), and undetectedDevices().