pdscalibdata/include/CsPad2x2PixelStatusV1.h

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

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7