CMS 3D CMS Logo

PixelFEDCabling.h
Go to the documentation of this file.
1 #ifndef PixelFEDCabling_H
2 #define PixelFEDCabling_H
3 
9 #include <vector>
10 
12 class PixelModuleName;
13 
14 namespace sipixelobjects {
15 
17  public:
18  typedef std::vector<PixelFEDLink> Links;
19 
20  PixelFEDCabling(unsigned int id = 0) : theFedId(id) {}
21 
22  void setLinks(Links& links);
23 
24  void addLink(const PixelFEDLink& link);
25 
27  const PixelFEDLink* link(unsigned int id) const {
28  return (id > 0 && id <= theLinks.size()) ? &theLinks[id - 1] : nullptr;
29  }
30 
32  unsigned int numberOfLinks() const { return theLinks.size(); }
33 
34  unsigned int id() const { return theFedId; }
35 
36  std::string print(int depth = 0) const;
37 
38  void addItem(unsigned int linkId, const PixelROC& roc);
39 
43  bool checkLinkNumbering() const;
44 
45  private:
46  private:
47  unsigned int theFedId;
48  Links theLinks;
49  };
50 } // namespace sipixelobjects
51 
52 #endif
unsigned int numberOfLinks() const
number of links in FED
void addItem(unsigned int linkId, const PixelROC &roc)
PixelFEDCabling(unsigned int id=0)
void addLink(const PixelFEDLink &link)
std::string print(int depth=0) const
const PixelFEDLink * link(unsigned int id) const
return link identified by id. Link id&#39;s are ranged [1, numberOfLinks]
std::vector< PixelFEDLink > Links