pdscalibdata/include/CsPad2x2PedestalsV1.h

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

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7