psddl_pds2psana/src/opal1k.ddl.cpp

Go to the documentation of this file.
00001 
00002 // *** Do not edit this file, it is auto-generated ***
00003 
00004 #include "psddl_pds2psana/opal1k.ddl.h"
00005 
00006 #include <cstddef>
00007 
00008 #include <stdexcept>
00009 
00010 namespace psddl_pds2psana {
00011 namespace Opal1k {
00012 Psana::Opal1k::ConfigV1::Depth pds_to_psana(Pds::Opal1k::ConfigV1::Depth e)
00013 {
00014   return Psana::Opal1k::ConfigV1::Depth(e);
00015 }
00016 
00017 Psana::Opal1k::ConfigV1::Binning pds_to_psana(Pds::Opal1k::ConfigV1::Binning e)
00018 {
00019   return Psana::Opal1k::ConfigV1::Binning(e);
00020 }
00021 
00022 Psana::Opal1k::ConfigV1::Mirroring pds_to_psana(Pds::Opal1k::ConfigV1::Mirroring e)
00023 {
00024   return Psana::Opal1k::ConfigV1::Mirroring(e);
00025 }
00026 
00027 ConfigV1::ConfigV1(const boost::shared_ptr<const XtcType>& xtcPtr)
00028   : Psana::Opal1k::ConfigV1()
00029   , m_xtcObj(xtcPtr)
00030 {
00031   {
00032     typedef ndarray<Psana::Camera::FrameCoord, 1> NDArray;
00033     typedef ndarray<const Pds::Camera::FrameCoord, 1> XtcNDArray;
00034     const XtcNDArray& xtc_ndarr = xtcPtr->defect_pixel_coordinates();
00035     _defectPixels_ndarray_storage_ = NDArray(xtc_ndarr.shape());
00036     NDArray::iterator out = _defectPixels_ndarray_storage_.begin();
00037     for (XtcNDArray::iterator it = xtc_ndarr.begin(); it != xtc_ndarr.end(); ++ it, ++ out) {
00038       *out = psddl_pds2psana::Camera::pds_to_psana(*it);
00039     }
00040   }
00041 }
00042 ConfigV1::~ConfigV1()
00043 {
00044 }
00045 
00046 
00047 uint16_t ConfigV1::black_level() const {
00048   return m_xtcObj->black_level();
00049 }
00050 
00051 
00052 uint16_t ConfigV1::gain_percent() const {
00053   return m_xtcObj->gain_percent();
00054 }
00055 
00056 
00057 Psana::Opal1k::ConfigV1::Depth ConfigV1::output_resolution() const {
00058   return pds_to_psana(m_xtcObj->output_resolution());
00059 }
00060 
00061 
00062 Psana::Opal1k::ConfigV1::Binning ConfigV1::vertical_binning() const {
00063   return pds_to_psana(m_xtcObj->vertical_binning());
00064 }
00065 
00066 
00067 Psana::Opal1k::ConfigV1::Mirroring ConfigV1::output_mirroring() const {
00068   return pds_to_psana(m_xtcObj->output_mirroring());
00069 }
00070 
00071 
00072 uint8_t ConfigV1::vertical_remapping() const {
00073   return m_xtcObj->vertical_remapping();
00074 }
00075 
00076 
00077 uint8_t ConfigV1::output_lookup_table_enabled() const {
00078   return m_xtcObj->output_lookup_table_enabled();
00079 }
00080 
00081 
00082 uint8_t ConfigV1::defect_pixel_correction_enabled() const {
00083   return m_xtcObj->defect_pixel_correction_enabled();
00084 }
00085 
00086 
00087 uint32_t ConfigV1::number_of_defect_pixels() const {
00088   return m_xtcObj->number_of_defect_pixels();
00089 }
00090 
00091 
00092 ndarray<const uint16_t, 1> ConfigV1::output_lookup_table() const {
00093   return m_xtcObj->output_lookup_table(m_xtcObj);
00094 }
00095 
00096 ndarray<const Psana::Camera::FrameCoord, 1> ConfigV1::defect_pixel_coordinates() const { return _defectPixels_ndarray_storage_; }
00097 
00098 uint16_t ConfigV1::output_offset() const {
00099   return m_xtcObj->output_offset();
00100 }
00101 
00102 
00103 uint32_t ConfigV1::output_resolution_bits() const {
00104   return m_xtcObj->output_resolution_bits();
00105 }
00106 
00107 } // namespace Opal1k
00108 } // namespace psddl_pds2psana

Generated on 19 Dec 2016 for PSDMSoftware by  doxygen 1.4.7