psddl_pds2psana/src/partition.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/partition.ddl.h"
00005 
00006 #include <cstddef>
00007 
00008 #include <stdexcept>
00009 
00010 namespace psddl_pds2psana {
00011 namespace Partition {
00012 Psana::Partition::Source pds_to_psana(Pds::Partition::Source pds)
00013 {
00014   return Psana::Partition::Source(pds.src(), pds.group());
00015 }
00016 
00017 ConfigV1::ConfigV1(const boost::shared_ptr<const XtcType>& xtcPtr)
00018   : Psana::Partition::ConfigV1()
00019   , m_xtcObj(xtcPtr)
00020 {
00021   {
00022     typedef ndarray<Psana::Partition::Source, 1> NDArray;
00023     typedef ndarray<const Pds::Partition::Source, 1> XtcNDArray;
00024     const XtcNDArray& xtc_ndarr = xtcPtr->sources();
00025     _sources_ndarray_storage_ = NDArray(xtc_ndarr.shape());
00026     NDArray::iterator out = _sources_ndarray_storage_.begin();
00027     for (XtcNDArray::iterator it = xtc_ndarr.begin(); it != xtc_ndarr.end(); ++ it, ++ out) {
00028       *out = psddl_pds2psana::Partition::pds_to_psana(*it);
00029     }
00030   }
00031 }
00032 ConfigV1::~ConfigV1()
00033 {
00034 }
00035 
00036 
00037 uint64_t ConfigV1::bldMask() const {
00038   return m_xtcObj->bldMask();
00039 }
00040 
00041 
00042 uint32_t ConfigV1::numSources() const {
00043   return m_xtcObj->numSources();
00044 }
00045 
00046 ndarray<const Psana::Partition::Source, 1> ConfigV1::sources() const { return _sources_ndarray_storage_; }
00047 ConfigV2::ConfigV2(const boost::shared_ptr<const XtcType>& xtcPtr)
00048   : Psana::Partition::ConfigV2()
00049   , m_xtcObj(xtcPtr)
00050 {
00051   {
00052     typedef ndarray<Psana::Partition::Source, 1> NDArray;
00053     typedef ndarray<const Pds::Partition::Source, 1> XtcNDArray;
00054     const XtcNDArray& xtc_ndarr = xtcPtr->sources();
00055     _sources_ndarray_storage_ = NDArray(xtc_ndarr.shape());
00056     NDArray::iterator out = _sources_ndarray_storage_.begin();
00057     for (XtcNDArray::iterator it = xtc_ndarr.begin(); it != xtc_ndarr.end(); ++ it, ++ out) {
00058       *out = psddl_pds2psana::Partition::pds_to_psana(*it);
00059     }
00060   }
00061 }
00062 ConfigV2::~ConfigV2()
00063 {
00064 }
00065 
00066 
00067 uint32_t ConfigV2::numWords() const {
00068   return m_xtcObj->numWords();
00069 }
00070 
00071 
00072 uint32_t ConfigV2::numSources() const {
00073   return m_xtcObj->numSources();
00074 }
00075 
00076 
00077 ndarray<const uint32_t, 1> ConfigV2::bldMask() const {
00078   return m_xtcObj->bldMask(m_xtcObj);
00079 }
00080 
00081 ndarray<const Psana::Partition::Source, 1> ConfigV2::sources() const { return _sources_ndarray_storage_; }
00082 
00083 uint32_t ConfigV2::numBldMaskBits() const {
00084   return m_xtcObj->numBldMaskBits();
00085 }
00086 
00087 
00088 uint32_t ConfigV2::bldMaskIsZero() const {
00089   return m_xtcObj->bldMaskIsZero();
00090 }
00091 
00092 
00093 uint32_t ConfigV2::bldMaskIsNotZero() const {
00094   return m_xtcObj->bldMaskIsNotZero();
00095 }
00096 
00097 
00098 uint32_t ConfigV2::bldMaskHasBitSet(uint32_t iBit) const {
00099   return m_xtcObj->bldMaskHasBitSet(iBit);
00100 }
00101 
00102 
00103 uint32_t ConfigV2::bldMaskHasBitClear(uint32_t iBit) const {
00104   return m_xtcObj->bldMaskHasBitClear(iBit);
00105 }
00106 
00107 } // namespace Partition
00108 } // namespace psddl_pds2psana

Generated on 19 Dec 2016 for PSDMSoftware by  doxygen 1.4.7