CMS 3D CMS Logo

PixelFEDLink.h
Go to the documentation of this file.
1 #ifndef PixelFEDLink_H
2 #define PixelFEDLink_H
3 
8 #include <utility>
9 #include <vector>
10 #include <iostream>
11 
13 class PixelModuleName;
14 
15 namespace sipixelobjects {
16 
17  class PixelFEDLink {
18  public:
20  typedef std::vector<PixelROC> ROCs;
21 
23  PixelFEDLink(unsigned int id = 0) : theId(id) {}
24 
26  void add(const ROCs& rocs);
27 
29  unsigned int id() const { return theId; }
30 
32  unsigned int numberOfROCs() const { return theROCs.size(); }
33 
35  const PixelROC* roc(unsigned int id) const { return (id > 0 && id <= theROCs.size()) ? &theROCs[id - 1] : nullptr; }
36 
39  bool checkRocNumbering() const;
40 
41  std::string print(int depth = 0) const;
42 
43  void addItem(const PixelROC& roc);
44 
45  private:
46  unsigned int theId;
48  std::string printForMap() const;
49  };
50 
51 } // namespace sipixelobjects
52 
53 //std::ostream & operator<<( std::ostream& out, const PixelFEDLink & l);
54 
55 #endif