Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

XtalId.h

Go to the documentation of this file.
00001 #ifndef XTALID_H
00002 #define XTALID_H 1
00003 
00004 #include "idents/ModuleId.h"
00005 
00006 namespace idents {
00007 
00014 class XtalId 
00015 {
00016 public:
00018     XtalId (ModuleId m, unsigned int l, unsigned int xtal)
00019         : m_layer(l), m_xtal(xtal), m_id(m) 
00020     {}
00021     
00023     XtalId (unsigned int id = 0)
00024         : m_layer( id%1000/100 ), m_xtal(id%100), m_id(id/1000)
00025     {}
00026     
00028     operator unsigned int () const
00029     {  return m_id*1000+m_layer*100+m_xtal;
00030     }
00031     
00033     unsigned int layer()const{return m_layer;}
00034     unsigned int xtal()const{return m_xtal;}
00035     ModuleId id()const{return m_id;}
00036 
00037 private:
00038     unsigned int m_layer;
00039     unsigned int m_xtal;
00040     ModuleId m_id;
00041 };
00042 
00043 }
00044 
00045 #endif

Generated at Wed Nov 21 12:20:09 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000