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 #include <boost/cstdint.hpp>
12 
14 class PixelModuleName;
15 
16 namespace sipixelobjects {
17 
18 class PixelFEDLink {
19 public:
20 
22  typedef std::vector<PixelROC> ROCs;
23 
25  PixelFEDLink(unsigned int id = 0) : theId(id) { }
26 
28  void add(const ROCs & rocs);
29 
31  unsigned int id() const { return theId; }
32 
34  unsigned int numberOfROCs() const { return theROCs.size(); }
35 
37  const PixelROC * roc(unsigned int id) const
38  { return (id > 0 && id <= theROCs.size() ) ? &theROCs[id-1] : 0; }
39 
42  bool checkRocNumbering() const;
43 
44  std::string print(int depth = 0) const;
45 
46  void addItem(const PixelROC & roc);
47 
48 private:
49  unsigned int theId;
50  ROCs theROCs;
51  std::string printForMap() const;
52 };
53 
54 }
55 
56 //std::ostream & operator<<( std::ostream& out, const PixelFEDLink & l);
57 
58 #endif