|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
GPU DRP detector for detType fakecam (registered in PGPDetectorApp). More...
#include <AreaDetector.hh>
Inherits Drp::Gpu::Detector.
Public Member Functions | |
| AreaDetector (Parameters ¶, MemPoolGpu &pool) | |
| Create the wrapped XpmDetector-based detector and the calibration buffers for the pixel count: twice the sim_length kwarg, or 1024 by default. | |
| virtual | ~AreaDetector () override |
| Destroy the calibration buffers. | |
| unsigned | configure (const std::string &config_alias, XtcData::Xtc &, const void *bufEnd) override |
| Call configure on the wrapped XpmDetector, logging an error if it fails, and return 0 in every case. | |
| void | event (XtcData::Dgram &dgram, const void *bufEnd, PGPEvent *event, uint64_t count) override |
| Log an info message; does nothing else (data handling is a TODO in the code). | |
| unsigned | rangeOffset () const override |
| Return 14: the gain range is in bits 15-14 and the data value in bits 13-0. | |
| unsigned | rangeBits () const override |
| Return 2. | |
| float const * | pedestals_d () const override |
| Return null; not implemented yet (per the TODO comment in the code). | |
| float const * | gains_d () const override |
| Return null; not implemented yet (per the TODO comment in the code). | |
Public Member Functions inherited from Drp::Gpu::Detector | |
| Detector (Parameters *para, MemPoolGpu *pool) | |
| Pass para and pool to Drp::Detector; no wrapped detector until _initialize() is called. | |
| virtual | ~Detector () |
| Delete the wrapped detector, if any. | |
| Gpu::Detector * | gpuDetector () override |
| Return this object. | |
| nlohmann::json | connectionInfo (const nlohmann::json &msg) override |
| Return the wrapped detector's connectionInfo(msg), or a default-constructed (null) JSON value if there is no wrapped detector. | |
| void | connectionShutdown () override |
| Call connectionShutdown() on the wrapped detector, if any. | |
| void | connect (const nlohmann::json &connect_json, const std::string &collectionId) override |
| If there is a wrapped detector, copy nodeId to it and call its connect(connect_json, collectionId). | |
| unsigned | configure (const std::string &config_alias, XtcData::Xtc &xtc, const void *bufEnd) override |
| Call configure() on the wrapped detector, logging an error if it returns non-zero. | |
| unsigned | beginrun (XtcData::Xtc &xtc, const void *bufEnd, const nlohmann::json &runInfo) override |
| Call beginrun() on the wrapped detector, logging an error if it returns non-zero. | |
| unsigned | beginstep (XtcData::Xtc &xtc, const void *bufEnd, const nlohmann::json &stepInfo) override |
| Call beginstep() on the wrapped detector, logging an error if it returns non-zero. | |
| unsigned | enable (XtcData::Xtc &xtc, const void *bufEnd, const nlohmann::json &info) override |
| Call enable() on the wrapped detector, logging an error if it returns non-zero. | |
| unsigned | disable (XtcData::Xtc &xtc, const void *bufEnd, const nlohmann::json &info) override |
| Call disable() on the wrapped detector, logging an error if it returns non-zero. | |
| void | shutdown () override |
| Call shutdown() on the wrapped detector, if any. | |
| Pds::TimingHeader * | getTimingHeader (uint32_t index) const override |
| Return the address just past the DmaDsc at the start of host write buffer index of the MemPoolGpu (hostWrtBufs()), as a TimingHeader pointer. | |
| virtual void | issuePhase2 (XtcData::TransitionId::Value) |
| Start phase 2 of a transition; PGPDetectorApp calls it after phase 1 only in simulator mode (device /dev/null). | |
| virtual float const * | referenceBuffers () const |
| Return device buffers of reference calibrated data for checking (used in simulator mode only, per the code comment); null here. | |
| virtual unsigned | referenceBufCnt () const |
| Return the number of reference buffers; 0 here. | |
Public Member Functions inherited from Drp::Detector | |
| Detector (Parameters *para, MemPool *pool) | |
| Set nodeId to -1u and virtChan to 0, keep para and pool, and allocate a transition buffer of para->maxTrSize bytes. | |
| virtual void | slowupdate (XtcData::Xtc &xtc, const void *bufEnd) |
| Reset xtc to an empty Parent Xtc whose source is nodeId. | |
| virtual void | event (XtcData::Dgram &dgram, const void *bufEnd, const Pds::Eb::ResultDgram &result) |
| Does nothing unless overridden; called with the trigger result for an event. | |
| virtual XtcData::Shape | shapeCube (unsigned rawDefIndex, unsigned valueIndex, XtcData::DescData &rawData) |
| Return the shape in rawData of entry valueIndex of raw definition rawDefIndex (from rawDef()). | |
| virtual unsigned | addToCube (unsigned rawDefIndex, unsigned valueIndex, unsigned subIndex, double *dst, unsigned bin, XtcData::DescData &rawData) |
| Generic cube accumulation without calibration: add the value or array entry valueIndex of rawData, converted to double, into bin bin of dst (entries of any XTC numeric type). | |
| virtual unsigned | subIndices () |
| Return 0 unless overridden. | |
| virtual unsigned | rawNamesIndex () |
| Return 0 unless overridden. | |
| virtual unsigned | cubeNamesIndex () |
| Return 0 unless overridden. | |
| virtual unsigned | cubeBinBytes () |
| Return ten times the pebble buffer size unless overridden. | |
| virtual std::vector< XtcData::VarDef > & | rawDef () |
| Log an error and abort; detectors used for cube binning must override it. | |
| virtual unsigned | maxMonBufSize () |
| Return the pebble buffer size, times 10 when Parameters::nCubeWorkers is non-zero. | |
| virtual unsigned | configureScan (const nlohmann::json &stepInfo, XtcData::Xtc &xtc, const void *bufEnd) |
| Return 1 (failure) unless overridden, per the code comment. | |
| virtual unsigned | stepScan (const nlohmann::json &stepInfo, XtcData::Xtc &xtc, const void *bufEnd) |
| Return 1 (failure) unless overridden. | |
| virtual bool | scanEnabled () |
| Return false unless overridden. | |
| XtcData::Xtc & | transitionXtc () |
| Return the start of the transition buffer as an Xtc reference. | |
| const void * | trXtcBufEnd () |
| Return the end of the transition buffer. | |
| XtcData::NamesLookup & | namesLookup () |
| Return the names lookup table of this detector. | |
Additional Inherited Members | |
Public Attributes inherited from Drp::Detector | |
| unsigned | nodeId |
| Node ID used as the XTC source; -1u until set. | |
| unsigned | virtChan |
| Virtual channel number; 0 unless a subclass sets it. | |
Protected Member Functions inherited from Drp::Gpu::Detector | |
| template<typename T > | |
| void | _initialize (Parameters ¶, MemPoolGpu &pool) |
Protected Attributes inherited from Drp::Gpu::Detector | |
| Drp::Detector * | m_det |
Protected Attributes inherited from Drp::Detector | |
| Parameters * | m_para |
| MemPool * | m_pool |
| XtcData::NamesLookup | m_namesLookup |
| std::vector< char > | m_xtcbuf |
GPU DRP detector for detType fakecam (registered in PGPDetectorApp).
It wraps an XpmDetector-based detector and sizes the calibration buffers; its pedestal and gain arrays are not implemented yet.
| Drp::Gpu::AreaDetector::AreaDetector | ( | Parameters & | para, |
| MemPoolGpu & | pool | ||
| ) |
Create the wrapped XpmDetector-based detector and the calibration buffers for the pixel count: twice the sim_length kwarg, or 1024 by default.
Asserts that the pixels fit in a DMA buffer after the DMA descriptor and TimingHeader.
|
overridevirtual |
Destroy the calibration buffers.
|
overridevirtual |
Call configure on the wrapped XpmDetector, logging an error if it fails, and return 0 in every case.
No event names are added (that code is disabled).
Implements Drp::Detector.
|
overridevirtual |
Log an info message; does nothing else (data handling is a TODO in the code).
Implements Drp::Detector.
|
inlineoverridevirtual |
Return null; not implemented yet (per the TODO comment in the code).
Implements Drp::Gpu::Detector.
|
inlineoverridevirtual |
Return null; not implemented yet (per the TODO comment in the code).
Implements Drp::Gpu::Detector.
|
inlineoverridevirtual |
Return 2.
Implements Drp::Gpu::Detector.
|
inlineoverridevirtual |
Return 14: the gain range is in bits 15-14 and the data value in bits 13-0.
Implements Drp::Gpu::Detector.