pdscalibdata/include/CsPadPedestalsV1.h

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

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7