00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "H5DataTypes/BldDataSpectrometerV0.h"
00017
00018
00019
00020
00021 #include <algorithm>
00022
00023
00024
00025
00026 #include "hdf5pp/CompoundType.h"
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 namespace H5DataTypes {
00037
00038
00039
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 }