lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
TTFex.hh File Reference

Helper types for timetool feature extraction: Roi, EventInfo (decoded timing information), EventSelect (event-code and destination filter) and the COPY_CFG_VECTOR macro. More...

#include <cstdint>
#include <cstring>
#include <vector>
#include "xtcdata/xtc/Array.hh"

Classes

class  Drp::Roi
 Rectangular region of interest with inclusive corners; OpalTTFex.cc reads it from the configuration entries name.x0, name.y0, name.x1 and name.y1 and uses it for projections. More...
 
class  Drp::EventInfo
 Timing information of one event, decoded from the timing data (the code comment calls it the l2si-core EventTimingMessage auxiliary data): pulse ID, fixed-rate and AC-rate bits, beam present and destination, and the sequencer words. More...
 
class  Drp::EventSelect
 Event filter on event codes and beam destinations: an event is selected if it matches an include condition and no exclude condition; a value of 0 is never matched. More...
 

Namespaces

namespace  XtcData
 Namespace of the XTC data-format classes (Xtc, Dgram, TypeId, Src, NamesId, ShapesData, DescData, iterators, ...).
 
namespace  Drp
 This class services detectors whose event data is formatted from the AxiStreamBatcherEventBuilder firmware module This class depends upon the existence of a python module "psdaq.configdb.<detType>_config.py", which contains the following functions: <detType>_init (str) - returns a handle (PyObject) for interacting with the device configuration <detType>_connect (handle) - returns a dictionary with "paddr" element for Xpm link ID.
 

Macros

#define COPY_CFG_VECTOR(t, a, b)
 For use inside a loop over configuration names with name, descdata and i in scope: if the current name equals a, copy array entry i of element type t into the vector b (resized to fit).
 

Detailed Description

Helper types for timetool feature extraction: Roi, EventInfo (decoded timing information), EventSelect (event-code and destination filter) and the COPY_CFG_VECTOR macro.

Macro Definition Documentation

◆ COPY_CFG_VECTOR

#define COPY_CFG_VECTOR (   t,
  a,
  b 
)
Value:
if (strcmp(name.name(),#a)==0) { \
Array<t> w = descdata.get_array<t>(i); \
std::vector<t>& v = b; \
unsigned len = w.num_elem(); \
v.resize(len); \
memcpy(v.data(),w.data(),len*sizeof(t)); \
}

For use inside a loop over configuration names with name, descdata and i in scope: if the current name equals a, copy array entry i of element type t into the vector b (resized to fit).