6 using namespace sipixelobjects;
8 typedef std::map<int, SiPixelFedCablingTree::PixelFEDCabling>::const_iterator
IMAP;
11 uint32_t rawDetId)
const
13 std::vector<sipixelobjects::CablingPathToDetUnit>
result;
14 typedef std::map<int, PixelFEDCabling>::const_iterator IM;
15 for (IM im = theFedCablings.begin(); im != theFedCablings.end(); ++im) {
17 for (
unsigned int idxLink = 1; idxLink <= aFed.
numberOfLinks(); idxLink++) {
21 for(
unsigned int idxRoc = 1; idxRoc <= numberOfRocs; idxRoc++) {
23 if (rawDetId == roc->
rawId() ) {
25 result.push_back(path);
36 theFedCablings[id] =
f;
41 IMAP it = theFedCablings.find(
id);
42 return ( it == theFedCablings.end() ) ? 0 : & (*it).second;
49 out << theVersion << endl;
50 for(
IMAP it=theFedCablings.begin(); it != theFedCablings.end(); it++) {
51 out << (*it).second.print(depth);
60 std::vector<const PixelFEDCabling *>
result;
61 for (
IMAP im = theFedCablings.begin(); im != theFedCablings.end(); im++) {
62 result.push_back( &(im->second) );
82 if (aLink) roc = aLink->
roc(path.
roc);
90 for (std::map<int, PixelFEDCabling>::const_iterator im = theFedCablings.begin();
91 im != theFedCablings.end(); ++im) {
92 if (im->first != static_cast<int>( im->second.id())) {
94 std::cout <<
"PROBLEM WITH FED ID!!" << im->first <<
" vs: "<< im->second.id() << std::endl;
96 im->second.checkLinkNumbering();
const PixelROC * roc(unsigned int id) const
return ROC identified by id. ROC ids are ranged [1,numberOfROCs]
unsigned int id() const
link id
unsigned int numberOfLinks() const
number of links in FED
unsigned int idInLink() const
id of this ROC in parent Link.
void addItem(unsigned int linkId, const PixelROC &roc)
unsigned int numberOfROCs() const
number of ROCs in fed
std::string link(std::string &nm, std::string &ns)
virtual std::vector< sipixelobjects::CablingPathToDetUnit > pathToDetUnit(uint32_t rawDetId) const
int checkNumbering() const
uint32_t rawId() const
return the DetUnit to which this ROC belongs to.
virtual const sipixelobjects::PixelROC * findItem(const sipixelobjects::CablingPathToDetUnit &path) const
std::map< int, SiPixelFedCablingTree::PixelFEDCabling >::const_iterator IMAP
const PixelFEDCabling * fed(unsigned int idFed) const
get fed identified by its id
const PixelFEDLink * link(unsigned int id) const
return link identified by id. Link id's are ranged [1, numberOfLinks]
void addFed(const PixelFEDCabling &f)
add cabling for one fed
void addItem(unsigned int fedId, unsigned int linkId, const sipixelobjects::PixelROC &roc)
std::vector< const PixelFEDCabling * > fedList() const
std::string print(int depth=0) const