CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
< FedChannelConnection
Conns
 
typedef Conns::const_iterator ConnsConstIter
 
typedef boost::iterator_range
< ConnsConstIter
ConnsConstIterRange
 
typedef Conns::iterator ConnsIter
 
typedef boost::iterator_range
< ConnsIter
ConnsIterRange
 
typedef std::pair< uint32_t,
uint32_t > 
ConnsPair
 
typedef std::vector< uint16_t > Feds
 
typedef Feds::const_iterator FedsConstIter
 
typedef boost::iterator_range
< FedsConstIter
FedsConstIterRange
 
typedef Feds::iterator FedsIter
 
typedef boost::iterator_range
< FedsIter
FedsIterRange
 
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 39 of file SiStripFedCabling.h.

typedef Conns::const_iterator SiStripFedCabling::ConnsConstIter

Definition at line 43 of file SiStripFedCabling.h.

Definition at line 47 of file SiStripFedCabling.h.

typedef Conns::iterator SiStripFedCabling::ConnsIter

Definition at line 41 of file SiStripFedCabling.h.

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

Definition at line 45 of file SiStripFedCabling.h.

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

Definition at line 49 of file SiStripFedCabling.h.

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

Definition at line 29 of file SiStripFedCabling.h.

typedef Feds::const_iterator SiStripFedCabling::FedsConstIter

Definition at line 33 of file SiStripFedCabling.h.

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

Definition at line 37 of file SiStripFedCabling.h.

typedef Feds::iterator SiStripFedCabling::FedsIter

Definition at line 31 of file SiStripFedCabling.h.

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

Definition at line 35 of file SiStripFedCabling.h.

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

Definition at line 51 of file SiStripFedCabling.h.

Constructor & Destructor Documentation

SiStripFedCabling::SiStripFedCabling ( ConnsConstIterRange  input)

Constructor taking FED channel connection objects as input.

Definition at line 12 of file SiStripFedCabling.cc.

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

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

Copy constructor.

Definition at line 21 of file SiStripFedCabling.cc.

References LogTrace, and sistrip::mlCabling_.

22  : feds_(input.feds_),
23  registry_(input.registry_),
25  detected_(input.detected_),
26  undetected_(input.undetected_) {
27  LogTrace(mlCabling_) << "[SiStripFedCabling::" << __func__ << "]"
28  << " Copy constructing object...";
29 }
Conns connections_
Container of connection objects.
Feds feds_
&quot;Active&quot; FEDs that have connected FE devices
Registry registry_
Container of &quot;ranges&quot; indexed by FED id.
Conns undetected_
FE devices that are detected.
#define LogTrace(id)
static const char mlCabling_[]
Conns detected_
Connections to FE devices that are not detected.
SiStripFedCabling::SiStripFedCabling ( )

Public default constructor.

Definition at line 33 of file SiStripFedCabling.cc.

References LogTrace, and sistrip::mlCabling_.

34  LogTrace(mlCabling_) << "[SiStripFedCabling::" << __func__ << "]"
35  << " Default constructing object...";
36 }
Conns connections_
Container of connection objects.
Feds feds_
&quot;Active&quot; FEDs that have connected FE devices
Registry registry_
Container of &quot;ranges&quot; indexed by FED id.
Conns undetected_
FE devices that are detected.
#define LogTrace(id)
static const char mlCabling_[]
Conns detected_
Connections to FE devices that are not detected.
SiStripFedCabling::~SiStripFedCabling ( )

Default destructor.

Definition at line 40 of file SiStripFedCabling.cc.

References LogTrace, and sistrip::mlCabling_.

40  {
41  LogTrace(mlCabling_) << "[SiStripFedCabling::" << __func__ << "]"
42  << " Destructing object...";
43 }
#define LogTrace(id)
static const char mlCabling_[]

Member Function Documentation

void SiStripFedCabling::buildFedCabling ( ConnsConstIterRange  connections)

Builds FED cabling from vector of FED connections.

Definition at line 47 of file SiStripFedCabling.cc.

References SiStripFedCabling::ConnsRange::begin(), getInfo::conn, connections_, filterCSVwithJSON::copy, HLT_FULL_cff::distance, SiStripFedCabling::ConnsRange::emptyPair(), feds_, spr::find(), cuy::ii, findQualityFiles::jj, LogTrace, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINSiStripFEDID, sistrip::mlCabling_, range(), registry_, contentValuesCheck::ss, and groupFilesInBlocks::temp.

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

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

Returns information for "detected, but unconnected" devices.

Definition at line 158 of file SiStripFedCabling.h.

References detected_.

Referenced by SiStripDetCabling::SiStripDetCabling().

158  {
159  return ConnsConstIterRange(detected_.begin(), detected_.end());
160 }
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 171 of file SiStripFedCabling.cc.

References fedConnections().

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

171  {
172  ConnsConstIterRange conns = fedConnections(fed_id);
173  if (!conns.empty() && conns.size() == 96 && fed_ch < 96) {
174  return *(conns.begin() + fed_ch);
175  } else {
176  return FedChannelConnection();
177  }
178 }
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 160 of file SiStripFedCabling.cc.

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

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

160  {
161  uint16_t index = fed_id - FEDNumbering::MINSiStripFEDID;
162  if (index < registry_.size()) {
163  return range(registry_[index]).range();
164  } else {
165  return range(registry_[index]).invalid();
166  }
167 }
ConnsConstIterRange range() const
Registry registry_
Container of &quot;ranges&quot; 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 93 of file SiStripFedCabling.h.

References printDebug().

93 { printDebug(ss, trackerTopo); }
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 182 of file SiStripFedCabling.cc.

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

Referenced by print().

182  {
183  uint16_t total = 0;
184  uint16_t nfeds = 0;
185  uint16_t cntr = 0;
186 
187  if (feds_.empty()) {
188  ss << "[SiStripFedCabling::" << __func__ << "]"
189  << " No FEDs found! Unable to print cabling map!";
190  return;
191  } else {
192  ss << "[SiStripFedCabling::" << __func__ << "]"
193  << " Printing cabling map for " << feds_.size() << " FEDs with following ids: ";
194  }
195 
196  std::vector<uint16_t>::const_iterator ii = feds_.begin();
197  std::vector<uint16_t>::const_iterator jj = feds_.end();
198  for (; ii != jj; ++ii) {
199  ss << *ii << " ";
200  }
201  ss << std::endl << std::endl;
202 
203  std::vector<uint16_t>::const_iterator ifed = feds_.begin();
204  std::vector<uint16_t>::const_iterator jfed = feds_.end();
205  for (; ifed != jfed; ++ifed) {
206  uint16_t index = *ifed - FEDNumbering::MINSiStripFEDID;
207  if (index < registry_.size()) {
208  ConnsRange conns = range(registry_[index]);
209 
210  ss << " Printing cabling information for FED id " << *ifed << " (found " << conns.size()
211  << " FedChannelConnection objects...)" << std::endl;
212 
213  uint16_t ichan = 0;
214  uint16_t connected = 0;
215  ConnsConstIter iconn = conns.begin();
216  ConnsConstIter jconn = conns.end();
217  for (; iconn != jconn; ++iconn) {
218  if (iconn->fedId() != sistrip::invalid_) {
219  connected++;
220  ss << *iconn << std::endl;
221  } else {
222  ss << " (FedId/Ch " << *ifed << "/" << ichan << ": unconnected channel...)" << std::endl;
223  cntr++;
224  }
225  ichan++;
226  }
227 
228  ss << " Found " << connected << " connected channels for FED id " << *ifed << std::endl << std::endl;
229  if (connected) {
230  nfeds++;
231  total += connected;
232  }
233  }
234  }
235 
236  float percent = (100. * cntr) / (96. * nfeds);
237  percent = static_cast<uint16_t>(10. * percent);
238  percent /= 10.;
239  ss << " Found " << total << " APV pairs that are connected to a total of " << nfeds << " FEDs" << std::endl
240  << " " << detected_.size() << " APV pairs have been detected, but are not connected" << std::endl
241  << " " << undetected_.size() << " APV pairs are undetected (wrt DCU-DetId map)" << std::endl
242  << " " << cntr << " FED channels out of a possible " << (96 * nfeds) << " (" << nfeds << " FEDs) are unconnected ("
243  << percent << "%)" << std::endl
244  << std::endl;
245 }
Feds feds_
&quot;Active&quot; FEDs that have connected FE devices
int ii
Definition: cuy.py:589
Registry registry_
Container of &quot;ranges&quot; indexed by FED id.
Conns undetected_
FE devices that are detected.
Conns detected_
Connections to FE devices that are not detected.
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 287 of file SiStripFedCabling.cc.

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

Referenced by summary().

287  {
288  ss << "[SiStripFedCabling::" << __func__ << "]";
289 
290  if (feds_.empty()) {
291  ss << " No FEDs found!";
292  return;
293  }
294 
295  ss << " Found " << feds_.size() << " FEDs"
296  << " with number of connected channels per front-end unit: " << std::endl
297  << " FedId FeUnit1 FeUnit2 FeUnit3 FeUnit4 FeUnit5 FeUnit6 FeUnit7 FeUnit8 Total" << std::endl;
298 
299  uint16_t total = 0;
300  uint16_t nfeds = 0;
301 
302  // iterate through fed ids
303  std::vector<uint16_t>::const_iterator ii = feds_.begin();
304  std::vector<uint16_t>::const_iterator jj = feds_.end();
305  for (; ii != jj; ++ii) {
306  // check number of connection objects
307  uint16_t index = *ii - FEDNumbering::MINSiStripFEDID;
308  if (index < registry_.size()) {
309  ConnsRange conns = range(registry_[index]);
310 
311  if (conns.size() < 96) {
312  edm::LogError(mlCabling_) << "[SiStripFedCabling::" << __func__ << "]"
313  << " Unexpected size for FedChannelConnection vector! " << conns.size();
314  return;
315  }
316 
317  // count connected channels at level of fe unit
318  std::vector<uint16_t> connected;
319  connected.resize(8, 0);
320  for (uint16_t ichan = 0; ichan < 96; ++ichan) {
321  ConnsConstIter iconn = conns.begin() + ichan;
322  if (iconn->fedId() < sistrip::valid_) {
323  uint16_t unit = SiStripFedKey::feUnit(ichan);
324  if (unit > 8) {
325  continue;
326  }
327  connected[unit - 1]++;
328  }
329  }
330 
331  // increment counters
332  uint16_t tot = 0;
333  ss << " " << std::setw(5) << *ii;
334  if (!connected.empty()) {
335  nfeds++;
336  }
337  for (uint16_t unit = 0; unit < 8; ++unit) {
338  ss << " " << std::setw(7) << connected[unit];
339  if (!connected.empty()) {
340  tot += connected[unit];
341  }
342  }
343  ss << " " << std::setw(5) << tot << std::endl;
344  total += tot;
345  }
346  }
347 
348  // print out
349  float percent = (100. * total) / (96. * nfeds);
350  percent = static_cast<uint16_t>(10. * percent);
351  percent /= 10.;
352  ss << " Found: " << std::endl
353  << " " << nfeds << " out of " << feds_.size() << " FEDs with at least one connected channel " << std::endl
354  << " " << feds_.size() - nfeds << " out of " << feds_.size() << " FEDs with no connected channels." << std::endl
355  << " " << total << " connected channels in total" << std::endl
356  << " " << detected_.size() << " APV pairs have been detected, but are not connected" << std::endl
357  << " " << undetected_.size() << " APV pairs are undetected (wrt DCU-DetId map)" << std::endl
358  << " " << percent << "% of FED channels are connected" << std::endl;
359 }
Feds feds_
&quot;Active&quot; FEDs that have connected FE devices
Log< level::Error, false > LogError
static const uint16_t valid_
Definition: Constants.h:17
int ii
Definition: cuy.py:589
Registry registry_
Container of &quot;ranges&quot; 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.
ConnsRange range(ConnsPair) const
Builds range of iterators from pair of offsets.
const uint16_t & feUnit() const
Conns::const_iterator ConnsConstIter
Basic3DVector unit() const
SiStripFedCabling::ConnsRange SiStripFedCabling::range ( SiStripFedCabling::ConnsPair  p) const
inline

Builds range of iterators from pair of offsets.

Definition at line 191 of file SiStripFedCabling.h.

References connections_.

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

191  {
192  return ConnsRange(connections_, p);
193 }
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 101 of file SiStripFedCabling.h.

References printSummary().

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

101 { printSummary(ss, trackerTopo); }
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 249 of file SiStripFedCabling.cc.

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

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

249  {
250  ss << "[SiStripFedCabling::" << __func__ << "]";
251 
252  if (feds_.empty()) {
253  ss << " No FEDs found! Unable to print cabling map!";
254  return;
255  }
256 
257  ss << " Printing cabling map for " << feds_.size() << " FEDs: " << std::endl << std::endl;
258 
259  std::vector<uint16_t>::const_iterator ifed = feds_.begin();
260  std::vector<uint16_t>::const_iterator jfed = feds_.end();
261  for (; ifed != jfed; ++ifed) {
262  uint16_t index = *ifed - FEDNumbering::MINSiStripFEDID;
263  if (index < registry_.size()) {
264  ConnsRange conns = range(registry_[index]);
265 
266  ss << " Printing cabling information for FED id " << *ifed << " (found " << conns.size()
267  << " FedChannelConnection objects...)" << std::endl;
268 
269  uint16_t connected = 0;
270  ConnsConstIter iconn = conns.begin();
271  ConnsConstIter jconn = conns.end();
272  for (; iconn != jconn; ++iconn) {
273  if (iconn->fedId() != sistrip::invalid_) {
274  connected++;
275  iconn->terse(ss);
276  ss << std::endl;
277  }
278  }
279 
280  ss << " Found " << connected << " connected channels for FED id " << *ifed << std::endl << std::endl;
281  }
282  }
283 }
Feds feds_
&quot;Active&quot; FEDs that have connected FE devices
Registry registry_
Container of &quot;ranges&quot; 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 162 of file SiStripFedCabling.h.

References undetected_.

Referenced by SiStripDetCabling::SiStripDetCabling().

162  {
163  return ConnsConstIterRange(undetected_.begin(), undetected_.end());
164 }
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 149 of file SiStripFedCabling.h.

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

Definition at line 149 of file SiStripFedCabling.h.

Member Data Documentation

Conns SiStripFedCabling::connections_
private

Container of connection objects.

Definition at line 141 of file SiStripFedCabling.h.

Referenced by buildFedCabling(), and range().

Conns SiStripFedCabling::detected_
private

Connections to FE devices that are not detected.

Definition at line 144 of file SiStripFedCabling.h.

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

Feds SiStripFedCabling::feds_
private

"Active" FEDs that have connected FE devices

Definition at line 135 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 138 of file SiStripFedCabling.h.

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

Conns SiStripFedCabling::undetected_
private

FE devices that are detected.

Definition at line 147 of file SiStripFedCabling.h.

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