CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/CondFormats/SiPixelObjects/interface/PixelROC.h

Go to the documentation of this file.
00001 #ifndef SiPixelObjects_PixelROC_H
00002 #define SiPixelObjects_PixelROC_H
00003 
00004 
00005 #include "CondFormats/SiPixelObjects/interface/FrameConversion.h"
00006 #include "CondFormats/SiPixelObjects/interface/LocalPixel.h"
00007 #include "CondFormats/SiPixelObjects/interface/GlobalPixel.h"
00008 #include <boost/cstdint.hpp>
00009 #include <string>
00010 
00019 namespace sipixelobjects {
00020 
00021 class PixelROC {
00022 public:
00023 
00025   PixelROC() : theDetUnit(0), theIdDU(0), theIdLk(0), theFrameConverter(0) {} 
00026 
00027   ~PixelROC();
00028 
00029   PixelROC(const PixelROC & o);
00030   const PixelROC& operator=(const PixelROC&);
00031 
00032   void swap(PixelROC&);
00033 
00037   PixelROC( uint32_t du, int idInDU, int idLk);
00038 
00040   uint32_t rawId() const { return theDetUnit; }
00041 
00043   unsigned int idInDetUnit() const { return theIdDU; }
00044 
00046   unsigned int idInLink() const { return theIdLk; }
00047 
00051   LocalPixel  toLocal(const GlobalPixel & gp) const;
00052 
00055   GlobalPixel toGlobal(const LocalPixel & loc) const;
00056 
00058   std::string print(int depth = 0) const;
00059 
00060 private:
00061   void initFrameConversion() const;
00062 
00063 private:
00064   uint32_t theDetUnit;
00065   unsigned int theIdDU, theIdLk;
00066   mutable const FrameConversion * theFrameConverter;
00067 
00068 };
00069 
00070 }
00071 
00072 #endif