File indexing completed on 2024-04-06 12:02:33
0001 #ifndef PixelFEDLink_H
0002 #define PixelFEDLink_H
0003
0004
0005
0006
0007
0008 #include <utility>
0009 #include <vector>
0010 #include <iostream>
0011
0012 #include "CondFormats/SiPixelObjects/interface/PixelROC.h"
0013 class PixelModuleName;
0014
0015 namespace sipixelobjects {
0016
0017 class PixelFEDLink {
0018 public:
0019
0020 typedef std::vector<PixelROC> ROCs;
0021
0022
0023 PixelFEDLink(unsigned int id = 0) : theId(id) {}
0024
0025
0026 void add(const ROCs& rocs);
0027
0028
0029 unsigned int id() const { return theId; }
0030
0031
0032 unsigned int numberOfROCs() const { return theROCs.size(); }
0033
0034
0035 const PixelROC* roc(unsigned int id) const { return (id > 0 && id <= theROCs.size()) ? &theROCs[id - 1] : nullptr; }
0036
0037
0038
0039 bool checkRocNumbering() const;
0040
0041 std::string print(int depth = 0) const;
0042
0043 void addItem(const PixelROC& roc);
0044
0045 private:
0046 unsigned int theId;
0047 ROCs theROCs;
0048 std::string printForMap() const;
0049 };
0050
0051 }
0052
0053
0054
0055 #endif