00001 #ifndef PixelFEDLink_H 00002 #define PixelFEDLink_H 00003 00008 #include <utility> 00009 #include <vector> 00010 #include <iostream> 00011 #include <boost/cstdint.hpp> 00012 00013 #include "CondFormats/SiPixelObjects/interface/PixelROC.h" 00014 class PixelModuleName; 00015 00016 namespace sipixelobjects { 00017 00018 class PixelFEDLink { 00019 public: 00020 00022 typedef std::vector<PixelROC> ROCs; 00023 00025 PixelFEDLink(unsigned int id = 0) : theId(id) { } 00026 00028 void add(const ROCs & rocs); 00029 00031 unsigned int id() const { return theId; } 00032 00034 unsigned int numberOfROCs() const { return theROCs.size(); } 00035 00037 const PixelROC * roc(unsigned int id) const 00038 { return (id > 0 && id <= theROCs.size() ) ? &theROCs[id-1] : 0; } 00039 00042 bool checkRocNumbering() const; 00043 00044 std::string print(int depth = 0) const; 00045 00046 void addItem(const PixelROC & roc); 00047 00048 private: 00049 unsigned int theId; 00050 ROCs theROCs; 00051 std::string printForMap() const; 00052 }; 00053 00054 } 00055 00056 //std::ostream & operator<<( std::ostream& out, const PixelFEDLink & l); 00057 00058 #endif