00001 #ifndef PixelFEDCabling_H 00002 #define PixelFEDCabling_H 00003 00009 #include <vector> 00010 00011 #include "CondFormats/SiPixelObjects/interface/PixelFEDLink.h" 00012 class PixelModuleName; 00013 00014 namespace sipixelobjects { 00015 00016 class PixelFEDCabling { 00017 public: 00018 00019 typedef std::vector<PixelFEDLink> Links; 00020 00021 PixelFEDCabling(unsigned int id = 0) : theFedId(id) { } 00022 00023 void setLinks(Links & links); 00024 00025 void addLink(const PixelFEDLink & link); 00026 00028 const PixelFEDLink * link(unsigned int id) const 00029 { return (id > 0 && id <= theLinks.size()) ? &theLinks[id-1] : 0; } 00030 00032 unsigned int numberOfLinks() const { return theLinks.size(); } 00033 00034 unsigned int id() const { return theFedId; } 00035 00036 std::string print(int depth = 0) const; 00037 00038 void addItem(unsigned int linkId, const PixelROC & roc); 00039 00043 bool checkLinkNumbering() const; 00044 private: 00045 00046 private: 00047 00048 unsigned int theFedId; 00049 Links theLinks; 00050 00051 }; 00052 } 00053 00054 #endif