7 using namespace sipixelobjects;
16 if ( link.
id() < 1)
return;
17 if ( theLinks.size() < link.
id() ) theLinks.resize(link.
id());
18 theLinks[link.
id()-1] =
link;
21 void PixelFEDCabling::addItem(
unsigned int linkId,
const PixelROC & roc)
23 if ( linkId < 1)
return;
24 if ( theLinks.size() < linkId ) theLinks.resize(linkId);
25 if ( theLinks[linkId-1].
id() != linkId) theLinks[linkId-1] =
PixelFEDLink(linkId);
26 theLinks[linkId-1].addItem(roc);
29 bool PixelFEDCabling::checkLinkNumbering()
const
32 typedef Links::const_iterator IL;
33 unsigned int idx_expected = 0;
34 for (IL il = theLinks.begin(); il != theLinks.end(); il++) {
36 if ((*il).id() != 0 && idx_expected != (*il).id() ) {
38 cout <<
" ** PixelFEDCabling ** link numbering inconsistency, expected id: "
39 << idx_expected <<
" has: " << (*il).id() << endl;
41 if (! (*il).checkRocNumbering() ) {
43 cout <<
"** PixelFEDCabling ** inconsistent ROC numbering in link id: "
44 << (*il).id() << endl;
53 typedef vector<PixelFEDLink>::const_iterator
IT;
55 out <<
"FED: "<<id()<< endl;
56 for (IT it=theLinks.begin(); it != theLinks.end(); it++)
57 out << (*it).print(depth);
58 out <<
"# total number of Links: "<< numberOfLinks() << endl;
unsigned int id() const
link id
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
std::vector< LinkConnSpec >::const_iterator IT
std::vector< PixelFEDLink > Links