CMS 3D CMS Logo

PixelHdwAddress.h

Go to the documentation of this file.
00001 #ifndef PixelHdwAddress_h
00002 #define PixelHdwAddress_h
00003 
00010 #include <iostream>
00011 #include <fstream>
00012 #include <string>
00013 
00014 namespace pos{
00020   class PixelHdwAddress {
00021 
00022   public:
00023 
00024     PixelHdwAddress();
00025 
00026     PixelHdwAddress(int fecnumber, int mfec, int mfecchannel,
00027                     int hubaddress, int portaddress, int rocid,
00028                     int fednumber, int fedchannel, int fedrocnumber);
00029     
00030 
00031     unsigned int fecnumber() const { return fecnumber_; }
00032     unsigned int mfec() const { return mfec_; }
00033     unsigned int mfecchannel() const { return mfecchannel_;}
00034     unsigned int hubaddress() const { return hubaddress_; }
00035     unsigned int portaddress() const { return portaddress_; }
00036     unsigned int rocid() const { return rocid_; }
00037     unsigned int fednumber() const { return fednumber_; }
00038     unsigned int fedchannel() const { return fedchannel_; }
00039     unsigned int fedrocnumber() const { return fedrocnumber_; }
00040 
00041 
00042     friend std::ostream& pos::operator<<(std::ostream& s, const PixelHdwAddress& pixelroc);
00043 
00044 
00045     const PixelHdwAddress& operator=(const PixelHdwAddress& aROC);
00046 
00047     bool operator()(const PixelHdwAddress& roc1, const PixelHdwAddress& roc2) const;
00048     
00049     // Checks for equality of all parts except the ROC numbers and portaddress.
00050     const bool operator|=(const PixelHdwAddress& aHdwAddress) const{
00051       return ( fecnumber_    == aHdwAddress.fecnumber_ &&
00052                mfec_         == aHdwAddress.mfec_ &&
00053                mfecchannel_  == aHdwAddress.mfecchannel_ &&
00054                hubaddress_   == aHdwAddress.hubaddress_ &&
00055                fednumber_    == aHdwAddress.fednumber_ &&
00056                fedchannel_   == aHdwAddress.fedchannel_ );
00057     }
00058 
00059     void setAddress(std::string what, int value); // Added by Dario
00060 
00061   private:
00062 
00063 
00064     unsigned int fecnumber_;  
00065     unsigned int mfec_;  
00066     unsigned int mfecchannel_;  
00067     unsigned int portaddress_;  
00068     unsigned int hubaddress_;  
00069     unsigned int rocid_;  
00070     unsigned int fednumber_;  
00071     unsigned int fedchannel_;  
00072     unsigned int fedrocnumber_;  
00073 
00074     
00075   };
00076 }
00077 #endif

Generated on Tue Jun 9 17:25:24 2009 for CMSSW by  doxygen 1.5.4