CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/L1Trigger/DTTrackFinder/src/L1MuDTAddressArray.h

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00029 //
00030 //--------------------------------------------------
00031 #ifndef L1MUDT_ADDRESS_ARRAY_H
00032 #define L1MUDT_ADDRESS_ARRAY_H
00033 
00034 //---------------
00035 // C++ Headers --
00036 //---------------
00037 
00038 #include <iosfwd>
00039 
00040 //----------------------
00041 // Base Class Headers --
00042 //----------------------
00043 
00044 //------------------------------------
00045 // Collaborating Class Declarations --
00046 //------------------------------------
00047 
00048 //              ---------------------
00049 //              -- Class Interface --
00050 //              ---------------------
00051 
00052 class L1MuDTAddressArray {
00053 
00054   public:
00055 
00057     L1MuDTAddressArray();
00058 
00060     L1MuDTAddressArray(const L1MuDTAddressArray&);
00061 
00063     virtual ~L1MuDTAddressArray();
00064 
00066     L1MuDTAddressArray& operator=(const L1MuDTAddressArray&);
00067 
00069     bool operator==(const L1MuDTAddressArray&) const;
00070    
00072     bool operator!=(const L1MuDTAddressArray&) const;
00073 
00075     void reset();
00076 
00078     void setStation(int stat, int adr);
00079     
00081     void setStations(int adr1, int adr2, int adr3, int adr4);
00082 
00084     inline unsigned short station(int stat) const { return m_station[stat-1]; } 
00085 
00087     int trackAddressCode() const;
00088 
00090     L1MuDTAddressArray converted() const;
00091 
00093     friend std::ostream& operator<<(std::ostream&, const L1MuDTAddressArray&);
00094 
00096     static unsigned short int convert(unsigned short int adr);
00097     
00099     static bool sameWheel(unsigned short int adr);
00100     
00102     static bool nextWheel(unsigned short int adr);
00103 
00104   private:
00105   
00106     unsigned short int m_station[4];
00107 
00108 };
00109 
00110 #endif