pdscalibdata/include/CsPadPixelStatusV1.h

Go to the documentation of this file.
00001 #ifndef PDSCALIBDATA_CSPADPIXELSTATUSV1_H
00002 #define PDSCALIBDATA_CSPADPIXELSTATUSV1_H
00003 
00004 //--------------------------------------------------------------------------
00005 // File and Version Information:
00006 //      $Id: CsPadPixelStatusV1.h 6832 2013-09-24 21:14:17Z salnikov@SLAC.STANFORD.EDU $
00007 //
00008 // Description:
00009 //      Class CsPadPixelStatusV1.
00010 //
00011 //------------------------------------------------------------------------
00012 
00013 //-----------------
00014 // C/C++ Headers --
00015 //-----------------
00016 #include <string>
00017 #include <stdint.h>
00018 
00019 //----------------------
00020 // Base Class Headers --
00021 //----------------------
00022 
00023 //-------------------------------
00024 // Collaborating Class Headers --
00025 //-------------------------------
00026 #include "ndarray/ndarray.h"
00027 #include "pdsdata/psddl/cspad.ddl.h"
00028 
00029 //------------------------------------
00030 // Collaborating Class Declarations --
00031 //------------------------------------
00032 
00033 //              ---------------------
00034 //              -- Class Interface --
00035 //              ---------------------
00036 
00037 namespace pdscalibdata {
00038 
00039 /**
00040  *
00041  *  This software was developed for the LCLS project.  If you use all or 
00042  *  part of it, please give an appropriate acknowledgment.
00043  *
00044  *  @see AdditionalClass
00045  *
00046  *  @version $Id: CsPadPixelStatusV1.h 6832 2013-09-24 21:14:17Z salnikov@SLAC.STANFORD.EDU $
00047  *
00048  *  @author Andrei Salnikov
00049  */
00050 
00051 class CsPadPixelStatusV1  {
00052 public:
00053 
00054   enum { Quads = Pds::CsPad::MaxQuadsPerSensor };
00055   enum { Sections = Pds::CsPad::ASICsPerQuad/2 };
00056   enum { Columns = Pds::CsPad::ColumnsPerASIC };
00057   enum { Rows = Pds::CsPad::MaxRowsPerASIC*2 };
00058   enum { Size = Quads*Sections*Columns*Rows };
00059   
00060   // This codes must be the same as in CspadCorrector
00061   enum PixelStatus { 
00062     VeryHot=1,
00063     Hot=2,
00064     Cold=4
00065   };
00066   
00067   typedef uint16_t status_t;
00068   
00069   /// Default constructor, all pixel codes set to 0
00070   CsPadPixelStatusV1 () ;
00071   
00072   /**
00073    *  Read all codes from file.
00074    *  
00075    *  @throw std::exception
00076    */
00077   CsPadPixelStatusV1 (const std::string& fname) ;
00078 
00079   // Destructor
00080   ~CsPadPixelStatusV1 () ;
00081 
00082   // access status data
00083   ndarray<status_t, 4> status() const {
00084     return make_ndarray(m_status, Quads, Sections, Columns, Rows);
00085   }
00086 
00087 protected:
00088 
00089 private:
00090 
00091   // Data members  
00092   mutable status_t m_status[Size];
00093 
00094   // Copy constructor and assignment are disabled by default
00095   CsPadPixelStatusV1 ( const CsPadPixelStatusV1& ) ;
00096   CsPadPixelStatusV1& operator = ( const CsPadPixelStatusV1& ) ;
00097 };
00098 
00099 } // namespace pdscalibdata
00100 
00101 #endif // PDSCALIBDATA_CSPADPIXELSTATUSV1_H

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7