#include <PixelFEDCabling.h>
Public Types | |
typedef std::vector< PixelFEDLink > | Links |
Public Member Functions | |
void | addItem (unsigned int linkId, const PixelROC &roc) |
void | addLink (const PixelFEDLink &link) |
bool | checkLinkNumbering () const |
unsigned int | id () const |
const PixelFEDLink * | link (unsigned int id) const |
return link identified by id. Link id's are ranged [1, numberOfLinks] | |
int | numberOfLinks () const |
number of links in FED | |
PixelFEDCabling (unsigned int id=0) | |
std::string | print (int depth=0) const |
void | setLinks (Links &links) |
Private Attributes | |
unsigned int | theFedId |
Links | theLinks |
Definition at line 16 of file PixelFEDCabling.h.
typedef std::vector<PixelFEDLink> sipixelobjects::PixelFEDCabling::Links |
Definition at line 19 of file PixelFEDCabling.h.
sipixelobjects::PixelFEDCabling::PixelFEDCabling | ( | unsigned int | id = 0 | ) | [inline] |
Definition at line 21 of file PixelFEDCabling.h.
: theFedId(id) { }
void PixelFEDCabling::addItem | ( | unsigned int | linkId, |
const PixelROC & | roc | ||
) |
Definition at line 21 of file PixelFEDCabling.cc.
Referenced by SiPixelFedCablingTree::addItem().
void PixelFEDCabling::addLink | ( | const PixelFEDLink & | link | ) |
bool PixelFEDCabling::checkLinkNumbering | ( | ) | const |
check link numbering consistency, ie. that link position in vector is the same as its id. Futhermore it checks numbering consistency for ROCs belonging to Link.
Definition at line 29 of file PixelFEDCabling.cc.
References gather_cfg::cout, and query::result.
{ bool result = true; typedef Links::const_iterator IL; unsigned int idx_expected = 0; for (IL il = theLinks.begin(); il != theLinks.end(); il++) { idx_expected++; if ((*il).id() != 0 && idx_expected != (*il).id() ) { result = false; cout << " ** PixelFEDCabling ** link numbering inconsistency, expected id: " << idx_expected <<" has: " << (*il).id() << endl; } if (! (*il).checkRocNumbering() ) { result = false; cout << "** PixelFEDCabling ** inconsistent ROC numbering in link id: " << (*il).id() << endl; } } return result; }
unsigned int sipixelobjects::PixelFEDCabling::id | ( | void | ) | const [inline] |
Definition at line 34 of file PixelFEDCabling.h.
References theFedId.
Referenced by SiPixelFedCablingTree::addFed(), SiPixelFedCablingTree::addItem(), and SiPixelFedCablingTree::pathToDetUnit().
{ return theFedId; }
const PixelFEDLink* sipixelobjects::PixelFEDCabling::link | ( | unsigned int | id | ) | const [inline] |
return link identified by id. Link id's are ranged [1, numberOfLinks]
Definition at line 28 of file PixelFEDCabling.h.
References theLinks.
Referenced by SiPixelFedCablingTree::findItem(), and SiPixelFedCablingTree::pathToDetUnit().
int sipixelobjects::PixelFEDCabling::numberOfLinks | ( | ) | const [inline] |
number of links in FED
Definition at line 32 of file PixelFEDCabling.h.
References theLinks.
Referenced by SiPixelFedCablingTree::pathToDetUnit().
{ return theLinks.size(); }
string PixelFEDCabling::print | ( | int | depth = 0 | ) | const |
Definition at line 50 of file PixelFEDCabling.cc.
References errorMatrix2Lands_multiChannel::id, and dbtoconf::out.
void PixelFEDCabling::setLinks | ( | Links & | links | ) |
Definition at line 9 of file PixelFEDCabling.cc.
Referenced by SiPixelFedCablingMapBuilder::produce().
{ theLinks = links; }
unsigned int sipixelobjects::PixelFEDCabling::theFedId [private] |
Definition at line 48 of file PixelFEDCabling.h.
Referenced by id().
Definition at line 49 of file PixelFEDCabling.h.
Referenced by link(), and numberOfLinks().