pdscalibdata/include/CsPad2x2BaseV2.h

Go to the documentation of this file.
00001 #ifndef PDSCALIBDATA_CSPAD2X2BASEV2_H
00002 #define PDSCALIBDATA_CSPAD2X2BASEV2_H
00003 
00004 //------------------------------------------------------------------------
00005 // File and Version Information:
00006 //      $Revision: 12978 $
00007 //      $Id: CsPad2x2BaseV2.h 12978 2016-12-10 02:09:53Z cpo@SLAC.STANFORD.EDU $
00008 //      $HeadURL: https://pswww.slac.stanford.edu/svn/psdmrepo/pdscalibdata/trunk/include/CsPad2x2BaseV2.h $
00009 //      $Date: 2016-12-09 18:09:53 -0800 (Fri, 09 Dec 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 CsPad2x2BaseV2 contains common parameters and methods for CSPAD2x2 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: CsPad2x2BaseV2.h 12978 2016-12-10 02:09:53Z cpo@SLAC.STANFORD.EDU $
00037  *
00038  *  @author Mikhail Dubrovin
00039  */
00040 
00041 class CsPad2x2BaseV2 {
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 = 185; 
00050   const static size_t   Cols = 388; 
00051   const static size_t   Size = Rows*Cols*Segs; 
00052   const static size_t   SizeCM = 5; 
00053   
00054  
00055   const shape_t* shape_base() { return &m_shape[0]; }
00056   const cmod_t*  cmod_base()  { return &m_cmod[0]; }
00057   const size_t   size_base()  { return Size; }
00058 
00059   ~CsPad2x2BaseV2 () {};
00060 
00061 protected:
00062 
00063   CsPad2x2BaseV2 (){ 
00064     shape_t shape[Ndim]={Rows,Cols,Segs};            
00065     cmod_t cmod[SizeCM]={1, 25, 25, 100, 1}; // use algorithm 1
00066     std::memcpy(m_shape, &shape[0], sizeof(shape_t)*Ndim);
00067     std::memcpy(m_cmod,  &cmod[0],  sizeof(cmod_t)*SizeCM);
00068   };
00069   
00070 private:
00071   shape_t m_shape[Ndim];
00072   cmod_t  m_cmod[SizeCM];
00073 };
00074 
00075 } // namespace pdscalibdata
00076 
00077 #endif // PDSCALIBDATA_CSPAD2X2BASEV2_H

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7