14 if (theLinks.size() < link.
id())
15 theLinks.resize(link.
id());
16 theLinks[link.
id() - 1] = link;
19 void PixelFEDCabling::addItem(
unsigned int linkId,
const PixelROC&
roc) {
22 if (theLinks.size() < linkId)
23 theLinks.resize(linkId);
24 if (theLinks[linkId - 1].
id() != linkId)
26 theLinks[linkId - 1].addItem(
roc);
29 bool PixelFEDCabling::checkLinkNumbering()
const {
31 typedef Links::const_iterator IL;
32 unsigned int idx_expected = 0;
33 for (IL il = theLinks.begin(); il != theLinks.end(); il++) {
35 if ((*il).id() != 0 && idx_expected != (*il).id()) {
37 cout <<
" ** PixelFEDCabling ** link numbering inconsistency, expected id: " << idx_expected
38 <<
" has: " << (*il).id() << endl;
40 if (!(*il).checkRocNumbering()) {
42 cout <<
"** PixelFEDCabling ** inconsistent ROC numbering in link id: " << (*il).id() << endl;
50 typedef vector<PixelFEDLink>::const_iterator
IT;
52 out <<
"FED: " <<
id() << endl;
53 for (
IT it = theLinks.begin(); it != theLinks.end(); it++)
55 out <<
"# total number of Links: " << numberOfLinks() << endl;
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
std::vector< LinkConnSpec >::const_iterator IT
unsigned int id() const
link id
std::vector< PixelFEDLink > Links