|
| | Piranha4 (Parameters *para, MemPool *pool) |
| | Connect the error PUSH socket to the collection server, initialize the BEBDetector with _init(detName) and _init_feb(), and create a simulator if the simxtc (TTSimL1) or simxtc2 (TTSimL2, with simtime) kwarg is set.
|
| |
| | ~Piranha4 () |
| | Delete the simulator and the timetool object if present.
|
| |
| void | slowupdate (XtcData::Xtc &, const void *bufEnd) override |
| | If timetool processing is set up (m_tt), call Piranha::TT::slowupdate; otherwise call Detector::slowupdate, which resets xtc to an empty Parent Xtc.
|
| |
| void | shutdown () override |
| | Call Piranha::TT::shutdown if timetool processing is set up, then BEBDetector::shutdown, which calls the Python unconfig function for the detector type.
|
| |
| void | write_image (XtcData::Xtc &, const void *bufEnd, std::vector< XtcData::Array< uint8_t > > &, XtcData::NamesId &) |
| | Add the image (m_pixels UINT16 values) under namesId, copying it from subframes[2].
|
| |
| | BEBDetector (Parameters *para, MemPool *pool) |
| | Construct the Detector base with virtual channel 1 and no Python module yet; subclasses must call _init() (or their own variant).
|
| |
| virtual | ~BEBDetector () |
| | Delete the config scanner and release the Python module.
|
| |
| nlohmann::json | connectionInfo (const nlohmann::json &msg) override |
| | Call {detType}_connectionInfo in Python with the device handle and msg, store its paddr entry (aborting if it is 0, 0xffffffff or has a low byte above 15), pass the result to _connectionInfo() and return xpmInfo(paddr).
|
| |
| void | connectionShutdown () override |
| | Call {detType}_connectionShutdown in Python if the module defines it.
|
| |
| void | connect (const nlohmann::json &, const std::string &collectionId) override |
| | Keep the connect message and the readout group of this DRP (det_info.readout of entry collectionId).
|
| |
| unsigned | configure (const std::string &config_alias, XtcData::Xtc &xtc, const void *bufEnd) override |
| | Call {detType}_config in Python (with segment and serial numbers in multi-segment mode), translate the returned JSON, or list of JSON per segment, into configuration XTC, let the subclass _configure() add its names, append the configuration to xtc and return the _configure() result.
|
| |
| void | event (XtcData::Dgram &dgram, const void *bufEnd, PGPEvent *event, uint64_t l1count) override |
| | Split the DMA buffer of each lane in event->mask into batcher subframes (one more batcher level is unwrapped when m_debatch is set), keep all subframes of the first lane that has more than 2 and subframe 2 of each later one, and pass them to _event().
|
| |
| unsigned | configureScan (const nlohmann::json &stepInfo, XtcData::Xtc &xtc, const void *bufEnd) override |
| | Pass stepInfo to PythonConfigScanner::configure() with the update names ID and return its result.
|
| |
| unsigned | stepScan (const nlohmann::json &stepInfo, XtcData::Xtc &xtc, const void *bufEnd) override |
| | Pass stepInfo to PythonConfigScanner::step() with the update names ID and return its result.
|
| |
| Pds::TimingHeader * | getTimingHeader (uint32_t index) const override |
| | Return the timing header of DMA buffer index: the data after the first batcher header, or after the second one when m_debatch is set.
|
| |
| | 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 | ~Detector () |
| | Does nothing; empty body.
|
| |
| virtual Gpu::Detector * | gpuDetector () |
| | Return nullptr; Gpu::Detector overrides it to return itself.
|
| |
| virtual unsigned | beginrun (XtcData::Xtc &xtc, const void *bufEnd, const nlohmann::json &runInfo) |
| | Return 0 without doing anything unless overridden.
|
| |
| virtual unsigned | beginstep (XtcData::Xtc &xtc, const void *bufEnd, const nlohmann::json &stepInfo) |
| | Return 0 without doing anything unless overridden.
|
| |
| virtual unsigned | enable (XtcData::Xtc &xtc, const void *bufEnd, const nlohmann::json &info) |
| | Return 0 without doing anything unless overridden.
|
| |
| virtual unsigned | disable (XtcData::Xtc &xtc, const void *bufEnd, const nlohmann::json &info) |
| | Return 0 without doing anything unless overridden.
|
| |
| 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 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.
|
| |
BEBDetector for the Piranha4 camera: records a one-dimensional UINT16 image of m_pixels values, with optional timetool processing (Piranha::TT) and simulation from XTC files.