H5DataTypes/src/BldDataSpectrometerV0.cpp

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: BldDataSpectrometerV0.cpp 6888 2013-10-02 19:07:59Z salnikov@SLAC.STANFORD.EDU $
00004 //
00005 // Description:
00006 //      Class BldDataSpectrometerV0...
00007 //
00008 // Author List:
00009 //      Andy Salnikov
00010 //
00011 //------------------------------------------------------------------------
00012 
00013 //-----------------------
00014 // This Class's Header --
00015 //-----------------------
00016 #include "H5DataTypes/BldDataSpectrometerV0.h"
00017 
00018 //-----------------
00019 // C/C++ Headers --
00020 //-----------------
00021 #include <algorithm>
00022 
00023 //-------------------------------
00024 // Collaborating Class Headers --
00025 //-------------------------------
00026 #include "hdf5pp/CompoundType.h"
00027 
00028 //-----------------------------------------------------------------------
00029 // Local Macros, Typedefs, Structures, Unions and Forward Declarations --
00030 //-----------------------------------------------------------------------
00031 
00032 //              ----------------------------------------
00033 //              -- Public Function Member Definitions --
00034 //              ----------------------------------------
00035 
00036 namespace H5DataTypes {
00037 
00038 //----------------
00039 // Constructors --
00040 //----------------
00041 BldDataSpectrometerV0::BldDataSpectrometerV0 (const XtcType& xtc)
00042 {
00043   const ndarray<const uint32_t, 1>& hproj = xtc.hproj();
00044   std::copy(hproj.begin(), hproj.end(), this->hproj);
00045   const ndarray<const uint32_t, 1>& vproj = xtc.vproj();
00046   std::copy(vproj.begin(), vproj.end(), this->vproj);
00047 }
00048 
00049 hdf5pp::Type
00050 BldDataSpectrometerV0::stored_type()
00051 {
00052   return native_type() ;
00053 }
00054 
00055 hdf5pp::Type
00056 BldDataSpectrometerV0::native_type()
00057 {
00058   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<BldDataSpectrometerV0>() ;
00059   type.insert_native<uint32_t>( "hproj", offsetof(BldDataSpectrometerV0, hproj), 1024 ) ;
00060   type.insert_native<uint32_t>( "vproj", offsetof(BldDataSpectrometerV0, vproj), 256 ) ;
00061 
00062   return type ;
00063 }
00064 
00065 } // namespace H5DataTypes

Generated on 19 Dec 2016 for PSDMSoftware by  doxygen 1.4.7