psddl_pds2psana/src/cspad.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/cspad.ddl.h"
00005 
00006 #include <cstddef>
00007 
00008 #include <stdexcept>
00009 
00010 namespace psddl_pds2psana {
00011 namespace CsPad {
00012 Psana::CsPad::RunModes pds_to_psana(Pds::CsPad::RunModes e)
00013 {
00014   return Psana::CsPad::RunModes(e);
00015 }
00016 
00017 Psana::CsPad::DataModes pds_to_psana(Pds::CsPad::DataModes e)
00018 {
00019   return Psana::CsPad::DataModes(e);
00020 }
00021 
00022 CsPadDigitalPotsCfg::CsPadDigitalPotsCfg(const boost::shared_ptr<const XtcType>& xtcPtr)
00023   : Psana::CsPad::CsPadDigitalPotsCfg()
00024   , m_xtcObj(xtcPtr)
00025 {
00026 }
00027 CsPadDigitalPotsCfg::~CsPadDigitalPotsCfg()
00028 {
00029 }
00030 
00031 
00032 ndarray<const uint8_t, 1> CsPadDigitalPotsCfg::pots() const {
00033   return m_xtcObj->pots(m_xtcObj);
00034 }
00035 
00036 Psana::CsPad::CsPadReadOnlyCfg pds_to_psana(Pds::CsPad::CsPadReadOnlyCfg pds)
00037 {
00038   return Psana::CsPad::CsPadReadOnlyCfg(pds.shiftTest(), pds.version());
00039 }
00040 
00041 Psana::CsPad::ProtectionSystemThreshold pds_to_psana(Pds::CsPad::ProtectionSystemThreshold pds)
00042 {
00043   return Psana::CsPad::ProtectionSystemThreshold(pds.adcThreshold(), pds.pixelCountThreshold());
00044 }
00045 
00046 CsPadGainMapCfg::CsPadGainMapCfg(const boost::shared_ptr<const XtcType>& xtcPtr)
00047   : Psana::CsPad::CsPadGainMapCfg()
00048   , m_xtcObj(xtcPtr)
00049 {
00050 }
00051 CsPadGainMapCfg::~CsPadGainMapCfg()
00052 {
00053 }
00054 
00055 
00056 ndarray<const uint16_t, 2> CsPadGainMapCfg::gainMap() const {
00057   return m_xtcObj->gainMap(m_xtcObj);
00058 }
00059 
00060 ConfigV1QuadReg::ConfigV1QuadReg(const boost::shared_ptr<const XtcType>& xtcPtr)
00061   : Psana::CsPad::ConfigV1QuadReg()
00062   , m_xtcObj(xtcPtr)
00063   , _readOnly(psddl_pds2psana::CsPad::pds_to_psana(xtcPtr->ro()))
00064   , _digitalPots(boost::shared_ptr<const Pds::CsPad::CsPadDigitalPotsCfg>(xtcPtr, &xtcPtr->dp()))
00065   , _gainMap(boost::shared_ptr<const Pds::CsPad::CsPadGainMapCfg>(xtcPtr, &xtcPtr->gm()))
00066 {
00067 }
00068 ConfigV1QuadReg::~ConfigV1QuadReg()
00069 {
00070 }
00071 
00072 
00073 ndarray<const uint32_t, 1> ConfigV1QuadReg::shiftSelect() const {
00074   return m_xtcObj->shiftSelect(m_xtcObj);
00075 }
00076 
00077 
00078 ndarray<const uint32_t, 1> ConfigV1QuadReg::edgeSelect() const {
00079   return m_xtcObj->edgeSelect(m_xtcObj);
00080 }
00081 
00082 
00083 uint32_t ConfigV1QuadReg::readClkSet() const {
00084   return m_xtcObj->readClkSet();
00085 }
00086 
00087 
00088 uint32_t ConfigV1QuadReg::readClkHold() const {
00089   return m_xtcObj->readClkHold();
00090 }
00091 
00092 
00093 uint32_t ConfigV1QuadReg::dataMode() const {
00094   return m_xtcObj->dataMode();
00095 }
00096 
00097 
00098 uint32_t ConfigV1QuadReg::prstSel() const {
00099   return m_xtcObj->prstSel();
00100 }
00101 
00102 
00103 uint32_t ConfigV1QuadReg::acqDelay() const {
00104   return m_xtcObj->acqDelay();
00105 }
00106 
00107 
00108 uint32_t ConfigV1QuadReg::intTime() const {
00109   return m_xtcObj->intTime();
00110 }
00111 
00112 
00113 uint32_t ConfigV1QuadReg::digDelay() const {
00114   return m_xtcObj->digDelay();
00115 }
00116 
00117 
00118 uint32_t ConfigV1QuadReg::ampIdle() const {
00119   return m_xtcObj->ampIdle();
00120 }
00121 
00122 
00123 uint32_t ConfigV1QuadReg::injTotal() const {
00124   return m_xtcObj->injTotal();
00125 }
00126 
00127 
00128 uint32_t ConfigV1QuadReg::rowColShiftPer() const {
00129   return m_xtcObj->rowColShiftPer();
00130 }
00131 
00132 const Psana::CsPad::CsPadReadOnlyCfg& ConfigV1QuadReg::ro() const { return _readOnly; }
00133 const Psana::CsPad::CsPadDigitalPotsCfg& ConfigV1QuadReg::dp() const { return _digitalPots; }
00134 const Psana::CsPad::CsPadGainMapCfg& ConfigV1QuadReg::gm() const { return _gainMap; }
00135 ConfigV2QuadReg::ConfigV2QuadReg(const boost::shared_ptr<const XtcType>& xtcPtr)
00136   : Psana::CsPad::ConfigV2QuadReg()
00137   , m_xtcObj(xtcPtr)
00138   , _readOnly(psddl_pds2psana::CsPad::pds_to_psana(xtcPtr->ro()))
00139   , _digitalPots(boost::shared_ptr<const Pds::CsPad::CsPadDigitalPotsCfg>(xtcPtr, &xtcPtr->dp()))
00140   , _gainMap(boost::shared_ptr<const Pds::CsPad::CsPadGainMapCfg>(xtcPtr, &xtcPtr->gm()))
00141 {
00142 }
00143 ConfigV2QuadReg::~ConfigV2QuadReg()
00144 {
00145 }
00146 
00147 
00148 ndarray<const uint32_t, 1> ConfigV2QuadReg::shiftSelect() const {
00149   return m_xtcObj->shiftSelect(m_xtcObj);
00150 }
00151 
00152 
00153 ndarray<const uint32_t, 1> ConfigV2QuadReg::edgeSelect() const {
00154   return m_xtcObj->edgeSelect(m_xtcObj);
00155 }
00156 
00157 
00158 uint32_t ConfigV2QuadReg::readClkSet() const {
00159   return m_xtcObj->readClkSet();
00160 }
00161 
00162 
00163 uint32_t ConfigV2QuadReg::readClkHold() const {
00164   return m_xtcObj->readClkHold();
00165 }
00166 
00167 
00168 uint32_t ConfigV2QuadReg::dataMode() const {
00169   return m_xtcObj->dataMode();
00170 }
00171 
00172 
00173 uint32_t ConfigV2QuadReg::prstSel() const {
00174   return m_xtcObj->prstSel();
00175 }
00176 
00177 
00178 uint32_t ConfigV2QuadReg::acqDelay() const {
00179   return m_xtcObj->acqDelay();
00180 }
00181 
00182 
00183 uint32_t ConfigV2QuadReg::intTime() const {
00184   return m_xtcObj->intTime();
00185 }
00186 
00187 
00188 uint32_t ConfigV2QuadReg::digDelay() const {
00189   return m_xtcObj->digDelay();
00190 }
00191 
00192 
00193 uint32_t ConfigV2QuadReg::ampIdle() const {
00194   return m_xtcObj->ampIdle();
00195 }
00196 
00197 
00198 uint32_t ConfigV2QuadReg::injTotal() const {
00199   return m_xtcObj->injTotal();
00200 }
00201 
00202 
00203 uint32_t ConfigV2QuadReg::rowColShiftPer() const {
00204   return m_xtcObj->rowColShiftPer();
00205 }
00206 
00207 
00208 uint32_t ConfigV2QuadReg::ampReset() const {
00209   return m_xtcObj->ampReset();
00210 }
00211 
00212 
00213 uint32_t ConfigV2QuadReg::digCount() const {
00214   return m_xtcObj->digCount();
00215 }
00216 
00217 
00218 uint32_t ConfigV2QuadReg::digPeriod() const {
00219   return m_xtcObj->digPeriod();
00220 }
00221 
00222 const Psana::CsPad::CsPadReadOnlyCfg& ConfigV2QuadReg::ro() const { return _readOnly; }
00223 const Psana::CsPad::CsPadDigitalPotsCfg& ConfigV2QuadReg::dp() const { return _digitalPots; }
00224 const Psana::CsPad::CsPadGainMapCfg& ConfigV2QuadReg::gm() const { return _gainMap; }
00225 ConfigV3QuadReg::ConfigV3QuadReg(const boost::shared_ptr<const XtcType>& xtcPtr)
00226   : Psana::CsPad::ConfigV3QuadReg()
00227   , m_xtcObj(xtcPtr)
00228   , _readOnly(psddl_pds2psana::CsPad::pds_to_psana(xtcPtr->ro()))
00229   , _digitalPots(boost::shared_ptr<const Pds::CsPad::CsPadDigitalPotsCfg>(xtcPtr, &xtcPtr->dp()))
00230   , _gainMap(boost::shared_ptr<const Pds::CsPad::CsPadGainMapCfg>(xtcPtr, &xtcPtr->gm()))
00231 {
00232 }
00233 ConfigV3QuadReg::~ConfigV3QuadReg()
00234 {
00235 }
00236 
00237 
00238 ndarray<const uint32_t, 1> ConfigV3QuadReg::shiftSelect() const {
00239   return m_xtcObj->shiftSelect(m_xtcObj);
00240 }
00241 
00242 
00243 ndarray<const uint32_t, 1> ConfigV3QuadReg::edgeSelect() const {
00244   return m_xtcObj->edgeSelect(m_xtcObj);
00245 }
00246 
00247 
00248 uint32_t ConfigV3QuadReg::readClkSet() const {
00249   return m_xtcObj->readClkSet();
00250 }
00251 
00252 
00253 uint32_t ConfigV3QuadReg::readClkHold() const {
00254   return m_xtcObj->readClkHold();
00255 }
00256 
00257 
00258 uint32_t ConfigV3QuadReg::dataMode() const {
00259   return m_xtcObj->dataMode();
00260 }
00261 
00262 
00263 uint32_t ConfigV3QuadReg::prstSel() const {
00264   return m_xtcObj->prstSel();
00265 }
00266 
00267 
00268 uint32_t ConfigV3QuadReg::acqDelay() const {
00269   return m_xtcObj->acqDelay();
00270 }
00271 
00272 
00273 uint32_t ConfigV3QuadReg::intTime() const {
00274   return m_xtcObj->intTime();
00275 }
00276 
00277 
00278 uint32_t ConfigV3QuadReg::digDelay() const {
00279   return m_xtcObj->digDelay();
00280 }
00281 
00282 
00283 uint32_t ConfigV3QuadReg::ampIdle() const {
00284   return m_xtcObj->ampIdle();
00285 }
00286 
00287 
00288 uint32_t ConfigV3QuadReg::injTotal() const {
00289   return m_xtcObj->injTotal();
00290 }
00291 
00292 
00293 uint32_t ConfigV3QuadReg::rowColShiftPer() const {
00294   return m_xtcObj->rowColShiftPer();
00295 }
00296 
00297 
00298 uint32_t ConfigV3QuadReg::ampReset() const {
00299   return m_xtcObj->ampReset();
00300 }
00301 
00302 
00303 uint32_t ConfigV3QuadReg::digCount() const {
00304   return m_xtcObj->digCount();
00305 }
00306 
00307 
00308 uint32_t ConfigV3QuadReg::digPeriod() const {
00309   return m_xtcObj->digPeriod();
00310 }
00311 
00312 
00313 uint32_t ConfigV3QuadReg::biasTuning() const {
00314   return m_xtcObj->biasTuning();
00315 }
00316 
00317 
00318 uint32_t ConfigV3QuadReg::pdpmndnmBalance() const {
00319   return m_xtcObj->pdpmndnmBalance();
00320 }
00321 
00322 const Psana::CsPad::CsPadReadOnlyCfg& ConfigV3QuadReg::ro() const { return _readOnly; }
00323 const Psana::CsPad::CsPadDigitalPotsCfg& ConfigV3QuadReg::dp() const { return _digitalPots; }
00324 const Psana::CsPad::CsPadGainMapCfg& ConfigV3QuadReg::gm() const { return _gainMap; }
00325 ConfigV1::ConfigV1(const boost::shared_ptr<const XtcType>& xtcPtr)
00326   : Psana::CsPad::ConfigV1()
00327   , m_xtcObj(xtcPtr)
00328 {
00329   {
00330     const std::vector<int>& dims = xtcPtr->quads_shape();
00331     _quads.reserve(dims[0]);
00332     for (int i0=0; i0 != dims[0]; ++i0) {
00333       const Pds::CsPad::ConfigV1QuadReg& d = xtcPtr->quads(i0);
00334       boost::shared_ptr<const Pds::CsPad::ConfigV1QuadReg> dPtr(m_xtcObj, &d);
00335       _quads.push_back(psddl_pds2psana::CsPad::ConfigV1QuadReg(dPtr));
00336     }
00337   }
00338 }
00339 ConfigV1::~ConfigV1()
00340 {
00341 }
00342 
00343 
00344 uint32_t ConfigV1::concentratorVersion() const {
00345   return m_xtcObj->concentratorVersion();
00346 }
00347 
00348 
00349 uint32_t ConfigV1::runDelay() const {
00350   return m_xtcObj->runDelay();
00351 }
00352 
00353 
00354 uint32_t ConfigV1::eventCode() const {
00355   return m_xtcObj->eventCode();
00356 }
00357 
00358 
00359 uint32_t ConfigV1::inactiveRunMode() const {
00360   return m_xtcObj->inactiveRunMode();
00361 }
00362 
00363 
00364 uint32_t ConfigV1::activeRunMode() const {
00365   return m_xtcObj->activeRunMode();
00366 }
00367 
00368 
00369 uint32_t ConfigV1::tdi() const {
00370   return m_xtcObj->tdi();
00371 }
00372 
00373 
00374 uint32_t ConfigV1::payloadSize() const {
00375   return m_xtcObj->payloadSize();
00376 }
00377 
00378 
00379 uint32_t ConfigV1::badAsicMask0() const {
00380   return m_xtcObj->badAsicMask0();
00381 }
00382 
00383 
00384 uint32_t ConfigV1::badAsicMask1() const {
00385   return m_xtcObj->badAsicMask1();
00386 }
00387 
00388 
00389 uint32_t ConfigV1::asicMask() const {
00390   return m_xtcObj->asicMask();
00391 }
00392 
00393 
00394 uint32_t ConfigV1::quadMask() const {
00395   return m_xtcObj->quadMask();
00396 }
00397 
00398 const Psana::CsPad::ConfigV1QuadReg& ConfigV1::quads(uint32_t i0) const { return _quads.at(i0); }
00399 
00400 uint32_t ConfigV1::numAsicsRead() const {
00401   return m_xtcObj->numAsicsRead();
00402 }
00403 
00404 
00405 uint32_t ConfigV1::numQuads() const {
00406   return m_xtcObj->numQuads();
00407 }
00408 
00409 
00410 uint32_t ConfigV1::numSect() const {
00411   return m_xtcObj->numSect();
00412 }
00413 
00414 std::vector<int> ConfigV1::quads_shape() const
00415 {
00416   std::vector<int> shape;
00417   shape.reserve(1);
00418   shape.push_back(_quads.size());
00419   return shape;
00420 }
00421 
00422 ConfigV2::ConfigV2(const boost::shared_ptr<const XtcType>& xtcPtr)
00423   : Psana::CsPad::ConfigV2()
00424   , m_xtcObj(xtcPtr)
00425 {
00426   {
00427     const std::vector<int>& dims = xtcPtr->quads_shape();
00428     _quads.reserve(dims[0]);
00429     for (int i0=0; i0 != dims[0]; ++i0) {
00430       const Pds::CsPad::ConfigV1QuadReg& d = xtcPtr->quads(i0);
00431       boost::shared_ptr<const Pds::CsPad::ConfigV1QuadReg> dPtr(m_xtcObj, &d);
00432       _quads.push_back(psddl_pds2psana::CsPad::ConfigV1QuadReg(dPtr));
00433     }
00434   }
00435 }
00436 ConfigV2::~ConfigV2()
00437 {
00438 }
00439 
00440 
00441 uint32_t ConfigV2::concentratorVersion() const {
00442   return m_xtcObj->concentratorVersion();
00443 }
00444 
00445 
00446 uint32_t ConfigV2::runDelay() const {
00447   return m_xtcObj->runDelay();
00448 }
00449 
00450 
00451 uint32_t ConfigV2::eventCode() const {
00452   return m_xtcObj->eventCode();
00453 }
00454 
00455 
00456 uint32_t ConfigV2::inactiveRunMode() const {
00457   return m_xtcObj->inactiveRunMode();
00458 }
00459 
00460 
00461 uint32_t ConfigV2::activeRunMode() const {
00462   return m_xtcObj->activeRunMode();
00463 }
00464 
00465 
00466 uint32_t ConfigV2::tdi() const {
00467   return m_xtcObj->tdi();
00468 }
00469 
00470 
00471 uint32_t ConfigV2::payloadSize() const {
00472   return m_xtcObj->payloadSize();
00473 }
00474 
00475 
00476 uint32_t ConfigV2::badAsicMask0() const {
00477   return m_xtcObj->badAsicMask0();
00478 }
00479 
00480 
00481 uint32_t ConfigV2::badAsicMask1() const {
00482   return m_xtcObj->badAsicMask1();
00483 }
00484 
00485 
00486 uint32_t ConfigV2::asicMask() const {
00487   return m_xtcObj->asicMask();
00488 }
00489 
00490 
00491 uint32_t ConfigV2::quadMask() const {
00492   return m_xtcObj->quadMask();
00493 }
00494 
00495 
00496 uint32_t ConfigV2::roiMasks() const {
00497   return m_xtcObj->roiMasks();
00498 }
00499 
00500 const Psana::CsPad::ConfigV1QuadReg& ConfigV2::quads(uint32_t i0) const { return _quads.at(i0); }
00501 
00502 uint32_t ConfigV2::numAsicsRead() const {
00503   return m_xtcObj->numAsicsRead();
00504 }
00505 
00506 
00507 uint32_t ConfigV2::roiMask(uint32_t iq) const {
00508   return m_xtcObj->roiMask(iq);
00509 }
00510 
00511 
00512 uint32_t ConfigV2::numAsicsStored(uint32_t iq) const {
00513   return m_xtcObj->numAsicsStored(iq);
00514 }
00515 
00516 
00517 uint32_t ConfigV2::numQuads() const {
00518   return m_xtcObj->numQuads();
00519 }
00520 
00521 
00522 uint32_t ConfigV2::numSect() const {
00523   return m_xtcObj->numSect();
00524 }
00525 
00526 std::vector<int> ConfigV2::quads_shape() const
00527 {
00528   std::vector<int> shape;
00529   shape.reserve(1);
00530   shape.push_back(_quads.size());
00531   return shape;
00532 }
00533 
00534 ConfigV3::ConfigV3(const boost::shared_ptr<const XtcType>& xtcPtr)
00535   : Psana::CsPad::ConfigV3()
00536   , m_xtcObj(xtcPtr)
00537 {
00538   {
00539     typedef ndarray<Psana::CsPad::ProtectionSystemThreshold, 1> NDArray;
00540     typedef ndarray<const Pds::CsPad::ProtectionSystemThreshold, 1> XtcNDArray;
00541     const XtcNDArray& xtc_ndarr = xtcPtr->protectionThresholds();
00542     _protectionThresholds_ndarray_storage_ = NDArray(xtc_ndarr.shape());
00543     NDArray::iterator out = _protectionThresholds_ndarray_storage_.begin();
00544     for (XtcNDArray::iterator it = xtc_ndarr.begin(); it != xtc_ndarr.end(); ++ it, ++ out) {
00545       *out = psddl_pds2psana::CsPad::pds_to_psana(*it);
00546     }
00547   }
00548   {
00549     const std::vector<int>& dims = xtcPtr->quads_shape();
00550     _quads.reserve(dims[0]);
00551     for (int i0=0; i0 != dims[0]; ++i0) {
00552       const Pds::CsPad::ConfigV1QuadReg& d = xtcPtr->quads(i0);
00553       boost::shared_ptr<const Pds::CsPad::ConfigV1QuadReg> dPtr(m_xtcObj, &d);
00554       _quads.push_back(psddl_pds2psana::CsPad::ConfigV1QuadReg(dPtr));
00555     }
00556   }
00557 }
00558 ConfigV3::~ConfigV3()
00559 {
00560 }
00561 
00562 
00563 uint32_t ConfigV3::concentratorVersion() const {
00564   return m_xtcObj->concentratorVersion();
00565 }
00566 
00567 
00568 uint32_t ConfigV3::runDelay() const {
00569   return m_xtcObj->runDelay();
00570 }
00571 
00572 
00573 uint32_t ConfigV3::eventCode() const {
00574   return m_xtcObj->eventCode();
00575 }
00576 
00577 ndarray<const Psana::CsPad::ProtectionSystemThreshold, 1> ConfigV3::protectionThresholds() const { return _protectionThresholds_ndarray_storage_; }
00578 
00579 uint32_t ConfigV3::protectionEnable() const {
00580   return m_xtcObj->protectionEnable();
00581 }
00582 
00583 
00584 uint32_t ConfigV3::inactiveRunMode() const {
00585   return m_xtcObj->inactiveRunMode();
00586 }
00587 
00588 
00589 uint32_t ConfigV3::activeRunMode() const {
00590   return m_xtcObj->activeRunMode();
00591 }
00592 
00593 
00594 uint32_t ConfigV3::tdi() const {
00595   return m_xtcObj->tdi();
00596 }
00597 
00598 
00599 uint32_t ConfigV3::payloadSize() const {
00600   return m_xtcObj->payloadSize();
00601 }
00602 
00603 
00604 uint32_t ConfigV3::badAsicMask0() const {
00605   return m_xtcObj->badAsicMask0();
00606 }
00607 
00608 
00609 uint32_t ConfigV3::badAsicMask1() const {
00610   return m_xtcObj->badAsicMask1();
00611 }
00612 
00613 
00614 uint32_t ConfigV3::asicMask() const {
00615   return m_xtcObj->asicMask();
00616 }
00617 
00618 
00619 uint32_t ConfigV3::quadMask() const {
00620   return m_xtcObj->quadMask();
00621 }
00622 
00623 
00624 uint32_t ConfigV3::roiMasks() const {
00625   return m_xtcObj->roiMasks();
00626 }
00627 
00628 const Psana::CsPad::ConfigV1QuadReg& ConfigV3::quads(uint32_t i0) const { return _quads.at(i0); }
00629 
00630 uint32_t ConfigV3::numAsicsRead() const {
00631   return m_xtcObj->numAsicsRead();
00632 }
00633 
00634 
00635 uint32_t ConfigV3::roiMask(uint32_t iq) const {
00636   return m_xtcObj->roiMask(iq);
00637 }
00638 
00639 
00640 uint32_t ConfigV3::numAsicsStored(uint32_t iq) const {
00641   return m_xtcObj->numAsicsStored(iq);
00642 }
00643 
00644 
00645 uint32_t ConfigV3::numQuads() const {
00646   return m_xtcObj->numQuads();
00647 }
00648 
00649 
00650 uint32_t ConfigV3::numSect() const {
00651   return m_xtcObj->numSect();
00652 }
00653 
00654 std::vector<int> ConfigV3::quads_shape() const
00655 {
00656   std::vector<int> shape;
00657   shape.reserve(1);
00658   shape.push_back(_quads.size());
00659   return shape;
00660 }
00661 
00662 ConfigV4::ConfigV4(const boost::shared_ptr<const XtcType>& xtcPtr)
00663   : Psana::CsPad::ConfigV4()
00664   , m_xtcObj(xtcPtr)
00665 {
00666   {
00667     typedef ndarray<Psana::CsPad::ProtectionSystemThreshold, 1> NDArray;
00668     typedef ndarray<const Pds::CsPad::ProtectionSystemThreshold, 1> XtcNDArray;
00669     const XtcNDArray& xtc_ndarr = xtcPtr->protectionThresholds();
00670     _protectionThresholds_ndarray_storage_ = NDArray(xtc_ndarr.shape());
00671     NDArray::iterator out = _protectionThresholds_ndarray_storage_.begin();
00672     for (XtcNDArray::iterator it = xtc_ndarr.begin(); it != xtc_ndarr.end(); ++ it, ++ out) {
00673       *out = psddl_pds2psana::CsPad::pds_to_psana(*it);
00674     }
00675   }
00676   {
00677     const std::vector<int>& dims = xtcPtr->quads_shape();
00678     _quads.reserve(dims[0]);
00679     for (int i0=0; i0 != dims[0]; ++i0) {
00680       const Pds::CsPad::ConfigV2QuadReg& d = xtcPtr->quads(i0);
00681       boost::shared_ptr<const Pds::CsPad::ConfigV2QuadReg> dPtr(m_xtcObj, &d);
00682       _quads.push_back(psddl_pds2psana::CsPad::ConfigV2QuadReg(dPtr));
00683     }
00684   }
00685 }
00686 ConfigV4::~ConfigV4()
00687 {
00688 }
00689 
00690 
00691 uint32_t ConfigV4::concentratorVersion() const {
00692   return m_xtcObj->concentratorVersion();
00693 }
00694 
00695 
00696 uint32_t ConfigV4::runDelay() const {
00697   return m_xtcObj->runDelay();
00698 }
00699 
00700 
00701 uint32_t ConfigV4::eventCode() const {
00702   return m_xtcObj->eventCode();
00703 }
00704 
00705 ndarray<const Psana::CsPad::ProtectionSystemThreshold, 1> ConfigV4::protectionThresholds() const { return _protectionThresholds_ndarray_storage_; }
00706 
00707 uint32_t ConfigV4::protectionEnable() const {
00708   return m_xtcObj->protectionEnable();
00709 }
00710 
00711 
00712 uint32_t ConfigV4::inactiveRunMode() const {
00713   return m_xtcObj->inactiveRunMode();
00714 }
00715 
00716 
00717 uint32_t ConfigV4::activeRunMode() const {
00718   return m_xtcObj->activeRunMode();
00719 }
00720 
00721 
00722 uint32_t ConfigV4::tdi() const {
00723   return m_xtcObj->tdi();
00724 }
00725 
00726 
00727 uint32_t ConfigV4::payloadSize() const {
00728   return m_xtcObj->payloadSize();
00729 }
00730 
00731 
00732 uint32_t ConfigV4::badAsicMask0() const {
00733   return m_xtcObj->badAsicMask0();
00734 }
00735 
00736 
00737 uint32_t ConfigV4::badAsicMask1() const {
00738   return m_xtcObj->badAsicMask1();
00739 }
00740 
00741 
00742 uint32_t ConfigV4::asicMask() const {
00743   return m_xtcObj->asicMask();
00744 }
00745 
00746 
00747 uint32_t ConfigV4::quadMask() const {
00748   return m_xtcObj->quadMask();
00749 }
00750 
00751 
00752 uint32_t ConfigV4::roiMasks() const {
00753   return m_xtcObj->roiMasks();
00754 }
00755 
00756 const Psana::CsPad::ConfigV2QuadReg& ConfigV4::quads(uint32_t i0) const { return _quads.at(i0); }
00757 
00758 uint32_t ConfigV4::numAsicsRead() const {
00759   return m_xtcObj->numAsicsRead();
00760 }
00761 
00762 
00763 uint32_t ConfigV4::roiMask(uint32_t iq) const {
00764   return m_xtcObj->roiMask(iq);
00765 }
00766 
00767 
00768 uint32_t ConfigV4::numAsicsStored(uint32_t iq) const {
00769   return m_xtcObj->numAsicsStored(iq);
00770 }
00771 
00772 
00773 uint32_t ConfigV4::numQuads() const {
00774   return m_xtcObj->numQuads();
00775 }
00776 
00777 
00778 uint32_t ConfigV4::numSect() const {
00779   return m_xtcObj->numSect();
00780 }
00781 
00782 std::vector<int> ConfigV4::quads_shape() const
00783 {
00784   std::vector<int> shape;
00785   shape.reserve(1);
00786   shape.push_back(_quads.size());
00787   return shape;
00788 }
00789 
00790 ConfigV5::ConfigV5(const boost::shared_ptr<const XtcType>& xtcPtr)
00791   : Psana::CsPad::ConfigV5()
00792   , m_xtcObj(xtcPtr)
00793 {
00794   {
00795     typedef ndarray<Psana::CsPad::ProtectionSystemThreshold, 1> NDArray;
00796     typedef ndarray<const Pds::CsPad::ProtectionSystemThreshold, 1> XtcNDArray;
00797     const XtcNDArray& xtc_ndarr = xtcPtr->protectionThresholds();
00798     _protectionThresholds_ndarray_storage_ = NDArray(xtc_ndarr.shape());
00799     NDArray::iterator out = _protectionThresholds_ndarray_storage_.begin();
00800     for (XtcNDArray::iterator it = xtc_ndarr.begin(); it != xtc_ndarr.end(); ++ it, ++ out) {
00801       *out = psddl_pds2psana::CsPad::pds_to_psana(*it);
00802     }
00803   }
00804   {
00805     const std::vector<int>& dims = xtcPtr->quads_shape();
00806     _quads.reserve(dims[0]);
00807     for (int i0=0; i0 != dims[0]; ++i0) {
00808       const Pds::CsPad::ConfigV3QuadReg& d = xtcPtr->quads(i0);
00809       boost::shared_ptr<const Pds::CsPad::ConfigV3QuadReg> dPtr(m_xtcObj, &d);
00810       _quads.push_back(psddl_pds2psana::CsPad::ConfigV3QuadReg(dPtr));
00811     }
00812   }
00813 }
00814 ConfigV5::~ConfigV5()
00815 {
00816 }
00817 
00818 
00819 uint32_t ConfigV5::concentratorVersion() const {
00820   return m_xtcObj->concentratorVersion();
00821 }
00822 
00823 
00824 uint32_t ConfigV5::runDelay() const {
00825   return m_xtcObj->runDelay();
00826 }
00827 
00828 
00829 uint32_t ConfigV5::eventCode() const {
00830   return m_xtcObj->eventCode();
00831 }
00832 
00833 ndarray<const Psana::CsPad::ProtectionSystemThreshold, 1> ConfigV5::protectionThresholds() const { return _protectionThresholds_ndarray_storage_; }
00834 
00835 uint32_t ConfigV5::protectionEnable() const {
00836   return m_xtcObj->protectionEnable();
00837 }
00838 
00839 
00840 uint32_t ConfigV5::inactiveRunMode() const {
00841   return m_xtcObj->inactiveRunMode();
00842 }
00843 
00844 
00845 uint32_t ConfigV5::activeRunMode() const {
00846   return m_xtcObj->activeRunMode();
00847 }
00848 
00849 
00850 uint32_t ConfigV5::internalTriggerDelay() const {
00851   return m_xtcObj->internalTriggerDelay();
00852 }
00853 
00854 
00855 uint32_t ConfigV5::tdi() const {
00856   return m_xtcObj->tdi();
00857 }
00858 
00859 
00860 uint32_t ConfigV5::payloadSize() const {
00861   return m_xtcObj->payloadSize();
00862 }
00863 
00864 
00865 uint32_t ConfigV5::badAsicMask0() const {
00866   return m_xtcObj->badAsicMask0();
00867 }
00868 
00869 
00870 uint32_t ConfigV5::badAsicMask1() const {
00871   return m_xtcObj->badAsicMask1();
00872 }
00873 
00874 
00875 uint32_t ConfigV5::asicMask() const {
00876   return m_xtcObj->asicMask();
00877 }
00878 
00879 
00880 uint32_t ConfigV5::quadMask() const {
00881   return m_xtcObj->quadMask();
00882 }
00883 
00884 
00885 uint32_t ConfigV5::roiMasks() const {
00886   return m_xtcObj->roiMasks();
00887 }
00888 
00889 const Psana::CsPad::ConfigV3QuadReg& ConfigV5::quads(uint32_t i0) const { return _quads.at(i0); }
00890 
00891 uint32_t ConfigV5::numAsicsRead() const {
00892   return m_xtcObj->numAsicsRead();
00893 }
00894 
00895 
00896 uint32_t ConfigV5::roiMask(uint32_t iq) const {
00897   return m_xtcObj->roiMask(iq);
00898 }
00899 
00900 
00901 uint32_t ConfigV5::numAsicsStored(uint32_t iq) const {
00902   return m_xtcObj->numAsicsStored(iq);
00903 }
00904 
00905 
00906 uint32_t ConfigV5::numQuads() const {
00907   return m_xtcObj->numQuads();
00908 }
00909 
00910 
00911 uint32_t ConfigV5::numSect() const {
00912   return m_xtcObj->numSect();
00913 }
00914 
00915 std::vector<int> ConfigV5::quads_shape() const
00916 {
00917   std::vector<int> shape;
00918   shape.reserve(1);
00919   shape.push_back(_quads.size());
00920   return shape;
00921 }
00922 
00923 template <typename Config>
00924 ElementV1<Config>::ElementV1(const boost::shared_ptr<const XtcType>& xtcPtr, const boost::shared_ptr<const Config>& cfgPtr)
00925   : Psana::CsPad::ElementV1()
00926   , m_xtcObj(xtcPtr)
00927   , m_cfgPtr(cfgPtr)
00928 {
00929 }
00930 template <typename Config>
00931 ElementV1<Config>::~ElementV1()
00932 {
00933 }
00934 
00935 
00936 template <typename Config>
00937 uint32_t ElementV1<Config>::virtual_channel() const {
00938   return m_xtcObj->virtual_channel();
00939 }
00940 
00941 
00942 template <typename Config>
00943 uint32_t ElementV1<Config>::lane() const {
00944   return m_xtcObj->lane();
00945 }
00946 
00947 
00948 template <typename Config>
00949 uint32_t ElementV1<Config>::tid() const {
00950   return m_xtcObj->tid();
00951 }
00952 
00953 
00954 template <typename Config>
00955 uint32_t ElementV1<Config>::acq_count() const {
00956   return m_xtcObj->acq_count();
00957 }
00958 
00959 
00960 template <typename Config>
00961 uint32_t ElementV1<Config>::op_code() const {
00962   return m_xtcObj->op_code();
00963 }
00964 
00965 
00966 template <typename Config>
00967 uint32_t ElementV1<Config>::quad() const {
00968   return m_xtcObj->quad();
00969 }
00970 
00971 
00972 template <typename Config>
00973 uint32_t ElementV1<Config>::seq_count() const {
00974   return m_xtcObj->seq_count();
00975 }
00976 
00977 
00978 template <typename Config>
00979 uint32_t ElementV1<Config>::ticks() const {
00980   return m_xtcObj->ticks();
00981 }
00982 
00983 
00984 template <typename Config>
00985 uint32_t ElementV1<Config>::fiducials() const {
00986   return m_xtcObj->fiducials();
00987 }
00988 
00989 
00990 template <typename Config>
00991 ndarray<const uint16_t, 1> ElementV1<Config>::sb_temp() const {
00992   return m_xtcObj->sb_temp(m_xtcObj);
00993 }
00994 
00995 
00996 template <typename Config>
00997 uint32_t ElementV1<Config>::frame_type() const {
00998   return m_xtcObj->frame_type();
00999 }
01000 
01001 
01002 template <typename Config>
01003 ndarray<const int16_t, 3> ElementV1<Config>::data() const {
01004   return m_xtcObj->data(*m_cfgPtr, m_xtcObj);
01005 }
01006 
01007 
01008 template <typename Config>
01009 uint32_t ElementV1<Config>::sectionMask() const {
01010   return m_xtcObj->sectionMask(*m_cfgPtr);
01011 }
01012 
01013 
01014 template <typename Config>
01015 float ElementV1<Config>::common_mode(uint32_t section) const {
01016   return m_xtcObj->common_mode(section);
01017 }
01018 
01019 template class ElementV1<Pds::CsPad::ConfigV1>;
01020 template class ElementV1<Pds::CsPad::ConfigV2>;
01021 template class ElementV1<Pds::CsPad::ConfigV3>;
01022 template class ElementV1<Pds::CsPad::ConfigV4>;
01023 template class ElementV1<Pds::CsPad::ConfigV5>;
01024 template <typename Config>
01025 DataV1<Config>::DataV1(const boost::shared_ptr<const XtcType>& xtcPtr, const boost::shared_ptr<const Config>& cfgPtr)
01026   : Psana::CsPad::DataV1()
01027   , m_xtcObj(xtcPtr)
01028   , m_cfgPtr(cfgPtr)
01029 {
01030   {
01031     const std::vector<int>& dims = xtcPtr->quads_shape(*cfgPtr);
01032     _quads.reserve(dims[0]);
01033     for (int i0=0; i0 != dims[0]; ++i0) {
01034       const Pds::CsPad::ElementV1& d = xtcPtr->quads(*cfgPtr, i0);
01035       boost::shared_ptr<const Pds::CsPad::ElementV1> dPtr(m_xtcObj, &d);
01036       _quads.push_back(psddl_pds2psana::CsPad::ElementV1<Config>(dPtr, cfgPtr));
01037     }
01038   }
01039 }
01040 template <typename Config>
01041 DataV1<Config>::~DataV1()
01042 {
01043 }
01044 
01045 template <typename Config>
01046 const Psana::CsPad::ElementV1& DataV1<Config>::quads(uint32_t i0) const { return _quads.at(i0); }
01047 template <typename Config>
01048 std::vector<int> DataV1<Config>::quads_shape() const
01049 {
01050   std::vector<int> shape;
01051   shape.reserve(1);
01052   shape.push_back(_quads.size());
01053   return shape;
01054 }
01055 
01056 template class DataV1<Pds::CsPad::ConfigV1>;
01057 template class DataV1<Pds::CsPad::ConfigV2>;
01058 template class DataV1<Pds::CsPad::ConfigV3>;
01059 template class DataV1<Pds::CsPad::ConfigV4>;
01060 template class DataV1<Pds::CsPad::ConfigV5>;
01061 template <typename Config>
01062 ElementV2<Config>::ElementV2(const boost::shared_ptr<const XtcType>& xtcPtr, const boost::shared_ptr<const Config>& cfgPtr)
01063   : Psana::CsPad::ElementV2()
01064   , m_xtcObj(xtcPtr)
01065   , m_cfgPtr(cfgPtr)
01066 {
01067 }
01068 template <typename Config>
01069 ElementV2<Config>::~ElementV2()
01070 {
01071 }
01072 
01073 
01074 template <typename Config>
01075 uint32_t ElementV2<Config>::virtual_channel() const {
01076   return m_xtcObj->virtual_channel();
01077 }
01078 
01079 
01080 template <typename Config>
01081 uint32_t ElementV2<Config>::lane() const {
01082   return m_xtcObj->lane();
01083 }
01084 
01085 
01086 template <typename Config>
01087 uint32_t ElementV2<Config>::tid() const {
01088   return m_xtcObj->tid();
01089 }
01090 
01091 
01092 template <typename Config>
01093 uint32_t ElementV2<Config>::acq_count() const {
01094   return m_xtcObj->acq_count();
01095 }
01096 
01097 
01098 template <typename Config>
01099 uint32_t ElementV2<Config>::op_code() const {
01100   return m_xtcObj->op_code();
01101 }
01102 
01103 
01104 template <typename Config>
01105 uint32_t ElementV2<Config>::quad() const {
01106   return m_xtcObj->quad();
01107 }
01108 
01109 
01110 template <typename Config>
01111 uint32_t ElementV2<Config>::seq_count() const {
01112   return m_xtcObj->seq_count();
01113 }
01114 
01115 
01116 template <typename Config>
01117 uint32_t ElementV2<Config>::ticks() const {
01118   return m_xtcObj->ticks();
01119 }
01120 
01121 
01122 template <typename Config>
01123 uint32_t ElementV2<Config>::fiducials() const {
01124   return m_xtcObj->fiducials();
01125 }
01126 
01127 
01128 template <typename Config>
01129 ndarray<const uint16_t, 1> ElementV2<Config>::sb_temp() const {
01130   return m_xtcObj->sb_temp(m_xtcObj);
01131 }
01132 
01133 
01134 template <typename Config>
01135 uint32_t ElementV2<Config>::frame_type() const {
01136   return m_xtcObj->frame_type();
01137 }
01138 
01139 
01140 template <typename Config>
01141 ndarray<const int16_t, 3> ElementV2<Config>::data() const {
01142   return m_xtcObj->data(*m_cfgPtr, m_xtcObj);
01143 }
01144 
01145 
01146 template <typename Config>
01147 uint32_t ElementV2<Config>::sectionMask() const {
01148   return m_xtcObj->sectionMask(*m_cfgPtr);
01149 }
01150 
01151 
01152 template <typename Config>
01153 float ElementV2<Config>::common_mode(uint32_t section) const {
01154   return m_xtcObj->common_mode(section);
01155 }
01156 
01157 template class ElementV2<Pds::CsPad::ConfigV2>;
01158 template class ElementV2<Pds::CsPad::ConfigV3>;
01159 template class ElementV2<Pds::CsPad::ConfigV4>;
01160 template class ElementV2<Pds::CsPad::ConfigV5>;
01161 template <typename Config>
01162 DataV2<Config>::DataV2(const boost::shared_ptr<const XtcType>& xtcPtr, const boost::shared_ptr<const Config>& cfgPtr)
01163   : Psana::CsPad::DataV2()
01164   , m_xtcObj(xtcPtr)
01165   , m_cfgPtr(cfgPtr)
01166 {
01167   {
01168     const std::vector<int>& dims = xtcPtr->quads_shape(*cfgPtr);
01169     _quads.reserve(dims[0]);
01170     for (int i0=0; i0 != dims[0]; ++i0) {
01171       const Pds::CsPad::ElementV2& d = xtcPtr->quads(*cfgPtr, i0);
01172       boost::shared_ptr<const Pds::CsPad::ElementV2> dPtr(m_xtcObj, &d);
01173       _quads.push_back(psddl_pds2psana::CsPad::ElementV2<Config>(dPtr, cfgPtr));
01174     }
01175   }
01176 }
01177 template <typename Config>
01178 DataV2<Config>::~DataV2()
01179 {
01180 }
01181 
01182 template <typename Config>
01183 const Psana::CsPad::ElementV2& DataV2<Config>::quads(uint32_t i0) const { return _quads.at(i0); }
01184 template <typename Config>
01185 std::vector<int> DataV2<Config>::quads_shape() const
01186 {
01187   std::vector<int> shape;
01188   shape.reserve(1);
01189   shape.push_back(_quads.size());
01190   return shape;
01191 }
01192 
01193 template class DataV2<Pds::CsPad::ConfigV2>;
01194 template class DataV2<Pds::CsPad::ConfigV3>;
01195 template class DataV2<Pds::CsPad::ConfigV4>;
01196 template class DataV2<Pds::CsPad::ConfigV5>;
01197 } // namespace CsPad
01198 } // namespace psddl_pds2psana

Generated on 19 Dec 2016 for PSDMSoftware by  doxygen 1.4.7