File indexing completed on 2023-03-17 10:47:29
0001 #ifndef PixelFEDCabling_H
0002 #define PixelFEDCabling_H
0003
0004
0005
0006
0007
0008
0009 #include <vector>
0010
0011 #include "CondFormats/SiPixelObjects/interface/PixelFEDLink.h"
0012 class PixelModuleName;
0013
0014 namespace sipixelobjects {
0015
0016 class PixelFEDCabling {
0017 public:
0018 typedef std::vector<PixelFEDLink> Links;
0019
0020 PixelFEDCabling(unsigned int id = 0) : theFedId(id) {}
0021
0022 void setLinks(Links& links);
0023
0024 void addLink(const PixelFEDLink& link);
0025
0026
0027 const PixelFEDLink* link(unsigned int id) const {
0028 return (id > 0 && id <= theLinks.size()) ? &theLinks[id - 1] : nullptr;
0029 }
0030
0031
0032 unsigned int numberOfLinks() const { return theLinks.size(); }
0033
0034 unsigned int id() const { return theFedId; }
0035
0036 std::string print(int depth = 0) const;
0037
0038 void addItem(unsigned int linkId, const PixelROC& roc);
0039
0040
0041
0042
0043 bool checkLinkNumbering() const;
0044
0045 private:
0046 private:
0047 unsigned int theFedId;
0048 Links theLinks;
0049 };
0050 }
0051
0052 #endif