00001 #ifndef PDSCALIBDATA_ANDOR3DBASEV1_H 00002 #define PDSCALIBDATA_ANDOR3DBASEV1_H 00003 00004 //------------------------------------------------------------------------ 00005 // File and Version Information: 00006 // $Revision: 11423 $ 00007 // $Id: Andor3dBaseV1.h 11423 2016-02-25 22:30:13Z dubrovin@SLAC.STANFORD.EDU $ 00008 // $HeadURL: file://localhost/reg/g/psdm/svnrepo/psdmrepo/pdscalibdata/tags/V00-05-43/include/Andor3dBaseV1.h $ 00009 // $Date: 2016-02-25 14:30:13 -0800 (Thu, 25 Feb 2016) $ 00010 // 00011 // Author: Mikhail Dubrovin 00012 //------------------------------------------------------------------------ 00013 00014 //----------------- 00015 // C/C++ Headers -- 00016 //----------------- 00017 //#include <string> 00018 #include <cstring> // for memcpy 00019 00020 //------------------------------- 00021 // Collaborating Class Headers -- 00022 //------------------------------- 00023 //#include "ndarray/ndarray.h" 00024 //#include "pdsdata/psddl/andor.ddl.h" 00025 00026 //----------------------------- 00027 00028 namespace pdscalibdata { 00029 00030 /** 00031 * class Andor3dBaseV1 contains common parameters and methods for Andor camera. 00032 * 00033 * This software was developed for the LCLS project. 00034 * If you use all or part of it, please give an appropriate acknowledgment. 00035 * 00036 * @version $Id: Andor3dBaseV1.h 11423 2016-02-25 22:30:13Z dubrovin@SLAC.STANFORD.EDU $ 00037 * 00038 * @author Mikhail Dubrovin 00039 */ 00040 00041 class Andor3dBaseV1 { 00042 public: 00043 00044 typedef unsigned shape_t; 00045 typedef double cmod_t; 00046 00047 const static size_t Ndim = 3; 00048 const static size_t Segs = 2; 00049 //const static size_t Rows = 2048; 00050 //const static size_t Cols = 2048; 00051 const static size_t Rows = 0; // FOR VARIABLE SHAPE DATA PARAMETERS WILL BE TAKEN FROM FILE METADATA 00052 const static size_t Cols = 0; // FOR VARIABLE SHAPE DATA PARAMETERS WILL BE TAKEN FROM FILE METADATA 00053 const static size_t Size = Segs*Rows*Cols; 00054 const static size_t SizeCM = 16; 00055 00056 const shape_t* shape_base() { return &m_shape[0]; } 00057 const cmod_t* cmod_base() { return &m_cmod[0]; } 00058 const size_t size_base() { return Size; } 00059 00060 ~Andor3dBaseV1 () {}; 00061 00062 protected: 00063 00064 Andor3dBaseV1 (){ 00065 shape_t shape[Ndim]={Segs,Rows,Cols}; 00066 cmod_t cmod[SizeCM]={2,10,10,Cols,0,0,0,0,0,0,0,0,0,0,0,0}; // use algorithm 2 to one row 00067 std::memcpy(m_shape, &shape[0], sizeof(shape_t)*Ndim); 00068 std::memcpy(m_cmod, &cmod[0], sizeof(cmod_t)*SizeCM); 00069 }; 00070 00071 private: 00072 shape_t m_shape[Ndim]; 00073 cmod_t m_cmod[SizeCM]; 00074 }; 00075 00076 } // namespace pdscalibdata 00077 00078 #endif // PDSCALIBDATA_ANDOR3DBASEV1_H