lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
detector::AreaDetector Class Reference

Base class for area detectors. More...

#include <AreaDetector.hh>

Inherits detector::Detector.

Inherited by detector::AreaDetectorCspad, detector::AreaDetectorEpix100a, detector::AreaDetectorJungfrau, detector::AreaDetectorOpal, and detector::AreaDetectorPnccd.

Public Member Functions

 AreaDetector (const std::string &detname, ConfigIter &ci)
 Construct for detname (type AREA_DETECTOR) and keep a pointer to ci for later config and data access.
 
 AreaDetector (const std::string &detname)
 Construct for detname (type AREA_DETECTOR) with no ConfigIter.
 
 AreaDetector ()
 Default constructor: Detector() (name "NoDevice"), no ConfigIter.
 
virtual ~AreaDetector ()
 Delete the CalibPars object and the shape array if they were created (the array is allocated with new[] but released with delete).
 
void _default_msg (const std::string &msg=std::string()) const
 Log a WARNING that AreaDetector::msg is a default method that should be re-implemented in the derived class.
 
virtual void _set_indexes_config (XtcData::ConfigIter &)
 Default: only logs the _default_msg() warning.
 
virtual void _set_indexes_data (XtcData::DataIter &)
 Default: only logs the _default_msg() warning.
 
template<typename T >
T config_value_for_index (XtcData::ConfigIter &ci, index_t i)
 Return field i of ci.desc_shape() as a scalar of type T (DescData::get_value<T>()).
 
template<typename T >
Array< T > config_array_for_index (XtcData::ConfigIter &ci, index_t i)
 Return field i of ci.desc_shape() as an Array<T> (DescData::get_array<T>()).
 
template<typename T >
T config_value_for_index (index_t i)
 Return field i of the stored ConfigIter's desc_shape() as a scalar of type T; asserts that a ConfigIter is stored.
 
template<typename T >
Array< T > config_array_for_index (index_t i)
 Return field i of the stored ConfigIter's desc_shape() as an Array<T>; asserts that a ConfigIter is stored.
 
DescData & descdata (XtcData::DataIter &di)
 Return di.desc_value() built with the NamesLookup of the stored ConfigIter (not checked to be set).
 
template<typename T >
T data_value_for_index (XtcData::DescData &dd, index_t i)
 Return dd.get_value<T>(i).
 
template<typename T >
T data_value_for_index (XtcData::DataIter &di, index_t i)
 Return descdata(di).get_value<T>(i).
 
template<typename T >
Array< T > data_array_for_index (XtcData::DescData &dd, index_t i)
 Return dd.get_array<T>(i).
 
template<typename T >
Array< T > data_array_for_index (XtcData::DataIter &di, index_t i)
 Return descdata(di).get_array<T>(i).
 
virtual void process_config ()
 Print to stdout the Names of the stored ConfigIter's shape() entry and, for each field, its name, rank, type and element size, plus the value for INT64 scalars or the elements of arrays read as uint32_t.
 
virtual void process_data (XtcData::DataIter &)
 Log the _default_msg() warning, then print each data field's name, rank and type, with the value for INT64 scalars or the first five elements of arrays read as uint16_t.
 
virtual void detid (std::ostream &os, const int ind=-1)
 Write "default_area_detector_id" to os; ind is ignored.
 
virtual std::string detid (const int ind=-1)
 Return what detid(std::ostream&, ind) writes, as a string.
 
virtual const size_t ndim ()
 Return 3 if numberOfModules > 1, else 2.
 
virtual const size_t size ()
 Return numberOfPixels.
 
virtual shape_t * shape ()
 Return the shape array, allocated on the first call from {numberOfModules, numberOfRows, numberOfColumns} if numberOfModules > 1, else {numberOfRows, numberOfColumns}.
 
virtual const size_t ndim (const event_t &)
 Default: logs the _default_msg() warning and returns 0.
 
virtual const size_t size (const event_t &)
 Default: logs the _default_msg() warning and returns 0.
 
virtual const shape_t * shape (const event_t &)
 Default: logs the _default_msg() warning; if no shape array exists yet, allocates {1, 2, 3}; returns the shape array.
 
virtual const void print_config ()
 Default: only logs the _default_msg() warning.
 
virtual const void print_data ()
 Default: only logs the _default_msg() warning.
 
virtual const void print_data (XtcData::DataIter &)
 Default: only logs the _default_msg() warning.
 
template<typename T >
void raw (XtcData::DescData &ddata, T *&pdata, const char *dataname="frame")
 Set pdata to the data of the array field named dataname in ddata.
 
template<typename T >
void raw (XtcData::DataIter &datao, T *&pdata, const char *dataname="frame")
 Same as raw(DescData&, T*&, const char*), using datao.desc_value() with the stored ConfigIter's NamesLookup.
 
template<typename T >
void raw (XtcData::DescData &ddata, NDArray< T > &nda, const char *dataname="frame")
 Like raw(DescData&, T*&, const char*), then set the shape of nda from shape() and ndim() and point nda at the data without copying (set_data_buffer()).
 
template<typename T >
void raw (XtcData::DataIter &datao, NDArray< T > &nda, const char *dataname="frame")
 Same as raw(DescData&, NDArray<T>&, const char*), using datao.desc_value() with the stored ConfigIter's NamesLookup.
 
virtual const NDArray< common_mode_t > & common_mode (const event_t &)
 access to calibration constants
 
virtual const NDArray< pedestals_t > & pedestals (const event_t &)
 Return calib_pars()->pedestals(query(evt)); query(evt) returns the stored Query without refreshing it.
 
virtual const NDArray< double > & pedestals_d ()
 Return calib_pars()->pedestals_d(query()); query() first refreshes the Query from detname, expname, calibtype and runnum.
 
virtual const NDArray< pixel_rms_t > & rms (const event_t &)
 Return calib_pars()->rms(query(evt)).
 
virtual const NDArray< pixel_status_t > & status (const event_t &)
 Return calib_pars()->status(query(evt)).
 
virtual const NDArray< pixel_gain_t > & gain (const event_t &)
 Return calib_pars()->gain(query(evt)).
 
virtual const NDArray< pixel_offset_t > & offset (const event_t &)
 Return calib_pars()->offset(query(evt)).
 
virtual const NDArray< pixel_bkgd_t > & background (const event_t &)
 Return calib_pars()->background(query(evt)).
 
virtual const NDArray< pixel_mask_t > & mask_calib (const event_t &)
 Return calib_pars()->mask_calib(query(evt)).
 
virtual const NDArray< pixel_mask_t > & mask_from_status (const event_t &)
 Return calib_pars()->mask_from_status(query(evt)).
 
virtual const NDArray< pixel_mask_t > & mask_edges (const event_t &, const size_t &nnbrs=8)
 Return calib_pars()->mask_edges(query(evt)); nnbrs is ignored.
 
virtual const NDArray< pixel_mask_t > & mask_neighbors (const event_t &, const size_t &nrows=1, const size_t &ncols=1)
 Return calib_pars()->mask_neighbors(query(evt)); nrows and ncols are ignored.
 
virtual const NDArray< pixel_mask_t > & mask_bits (const event_t &, const size_t &mbits=0177777)
 Return calib_pars()->mask_bits(query(evt)); mbits is ignored.
 
virtual const NDArray< pixel_mask_t > & mask (const event_t &, const bool &calib=true, const bool &sataus=true, const bool &edges=true, const bool &neighbors=true)
 Return calib_pars()->mask(query(evt)); the bool flags are ignored.
 
virtual void load_calib_constants ()
 access to raw, calibrated data, and image
 
virtual const NDArray< raw_t > & raw (const event_t &)
 Default: logs the _default_msg() warning and returns a private array that this class never fills.
 
virtual const NDArray< calib_t > & calib (const event_t &)
 Default: logs the _default_msg() warning and returns a private array that this class never fills.
 
virtual const NDArray< image_t > & image (const event_t &)
 Default: logs the _default_msg() warning and returns a private array that this class never fills.
 
virtual const NDArray< image_t > & image (const event_t &, const NDArray< image_t > &nda)
 Default: logs the _default_msg() warning and returns the private image array; nda is not used.
 
virtual const NDArray< image_t > & array_from_image (const event_t &, const NDArray< image_t > &)
 Default: logs the _default_msg() warning and returns the private image array; the input array is not used.
 
virtual void move_geo (const event_t &, const pixel_size_t &dx, const pixel_size_t &dy, const pixel_size_t &dz)
 Default: only logs the _default_msg() warning.
 
virtual void tilt_geo (const event_t &, const tilt_angle_t &dtx, const tilt_angle_t &dty, const tilt_angle_t &dtz)
 Default: only logs the _default_msg() warning.
 
virtual const geometry_t & geometry (const event_t &)
 access to geometry
 
virtual NDArray< const pixel_coord_t > & coords (const event_t &, const size_t &axis=0)
 Return calib_pars()->coords(query(evt)); axis is ignored (CalibPars::coords() takes the axis from the Query's AXISNUM).
 
virtual NDArray< const pixel_idx_t > & indexes (const event_t &, const size_t &axis=0)
 Return calib_pars()->indexes(query(evt)); axis is ignored (CalibPars::indexes() takes the axis from the Query's AXISNUM).
 
virtual NDArray< const pixel_size_t > & pixel_size (const event_t &, const size_t &axis=0)
 Return calib_pars()->pixel_size(query(evt)); axis is ignored.
 
virtual NDArray< const pixel_size_t > & image_xaxis (const event_t &)
 Return calib_pars()->image_xaxis(query(evt)).
 
virtual NDArray< const pixel_size_t > & image_yaxis (const event_t &)
 Return calib_pars()->image_yaxis(query(evt)).
 
calib::CalibPars * calib_pars ()
 Return the CalibPars object, creating it on first use with calib::getCalibPars(detname()), which throws for detector types it does not support.
 
calib::CalibPars * calib_pars_updated ()
 Delete the current CalibPars object (if any) and return a new one from calib_pars().
 
const std::string & expname ()
 Return the experiment name (initially "NOT_DEFINED").
 
const std::string & calibtype ()
 Return the calibration type string (initially "pedestals").
 
const unsigned runnum ()
 Return the run number (initially 0).
 
void set_expname (const std::string &expname)
 Set the experiment name used by query().
 
void set_runnum (unsigned runnum)
 Set the run number used by query().
 
void set_calibtype (const std::string &calibtype)
 Set the calibration type string used by query().
 
Query & query ()
 Refresh the stored Query with set_paremeters(detname, expname, calibtype, runnum) and return it.
 
Query & query (const event_t &)
 Return the stored Query unchanged; evt is ignored.
 
 AreaDetector (const AreaDetector &)=delete
 Copy construction is disabled.
 
AreaDetector & operator= (const AreaDetector &)=delete
 Copy assignment is disabled.
 
- Public Member Functions inherited from detector::Detector
 Detector (const std::string &detname="NoDevice", const DETTYPE &dettype=UNDEFINED_DETECTOR)
 Store detname and dettype; if dettype is UNDEFINED_DETECTOR it is looked up from detname with find_dettype().
 
virtual ~Detector ()
 Destructor; only logs a debug message.
 
const std::string & detname ()
 Return the detector name.
 
const DETTYPE & dettype ()
 Return the detector type.
 
 Detector (const Detector &)=delete
 Copy construction is disabled.
 
Detector & operator= (const Detector &)=delete
 Copy assignment is disabled.
 

Public Attributes

int64_t maxModulesPerDetector
 Not initialized by AreaDetector; set by subclasses (e.g. from the config field "MaxModulesPerDetector" in AreaDetectorCspad).
 
int64_t numberOfModules
 Not initialized by AreaDetector; set by subclasses. Used by ndim() and shape().
 
int64_t numberOfRows
 Not initialized by AreaDetector; set by subclasses. Used by shape().
 
int64_t numberOfColumns
 Not initialized by AreaDetector; set by subclasses. Used by shape().
 
int64_t numberOfPixels
 Not initialized by AreaDetector; set by subclasses. Returned by size().
 

Protected Member Functions

void _set_index_data (XtcData::DescData &ddata, const char *dataname)
 

Protected Attributes

shape_t * _shape
 
ConfigIter * _pconfit = 0
 
DataIter * _pdatait = 0
 
int _ind_data
 

Detailed Description

Base class for area detectors.

Config and data fields are read through a stored ConfigIter; calibration constants and geometry are forwarded to a CalibPars object created on first use with calib::getCalibPars(detname). Many virtual methods are defaults that only log a warning asking for re-implementation in a derived class.

Constructor & Destructor Documentation

◆ AreaDetector() [1/4]

detector::AreaDetector::AreaDetector ( const std::string &  detname,
ConfigIter &  ci 
)

Construct for detname (type AREA_DETECTOR) and keep a pointer to ci for later config and data access.

◆ AreaDetector() [2/4]

detector::AreaDetector::AreaDetector ( const std::string &  detname)

Construct for detname (type AREA_DETECTOR) with no ConfigIter.

◆ AreaDetector() [3/4]

detector::AreaDetector::AreaDetector ( )

Default constructor: Detector() (name "NoDevice"), no ConfigIter.

◆ ~AreaDetector()

virtual detector::AreaDetector::~AreaDetector ( )
virtual

Delete the CalibPars object and the shape array if they were created (the array is allocated with new[] but released with delete).

◆ AreaDetector() [4/4]

detector::AreaDetector::AreaDetector ( const AreaDetector &  )
delete

Copy construction is disabled.

Member Function Documentation

◆ _default_msg()

void detector::AreaDetector::_default_msg ( const std::string &  msg = std::string()) const

Log a WARNING that AreaDetector::msg is a default method that should be re-implemented in the derived class.

◆ _set_index_data()

void detector::AreaDetector::_set_index_data ( XtcData::DescData &  ddata,
const char *  dataname 
)
protected

◆ _set_indexes_config()

virtual void detector::AreaDetector::_set_indexes_config ( XtcData::ConfigIter &  )
virtual

Default: only logs the _default_msg() warning.

Reimplemented in detector::AreaDetectorOpal, and detector::AreaDetectorPnccd.

◆ _set_indexes_data()

virtual void detector::AreaDetector::_set_indexes_data ( XtcData::DataIter &  )
virtual

Default: only logs the _default_msg() warning.

Reimplemented in detector::AreaDetectorOpal, and detector::AreaDetectorPnccd.

◆ array_from_image()

virtual const NDArray< image_t > & detector::AreaDetector::array_from_image ( const event_t &  ,
const NDArray< image_t > &   
)
virtual

Default: logs the _default_msg() warning and returns the private image array; the input array is not used.

◆ background()

virtual const NDArray< pixel_bkgd_t > & detector::AreaDetector::background ( const event_t &  )
virtual

Return calib_pars()->background(query(evt)).

◆ calib()

virtual const NDArray< calib_t > & detector::AreaDetector::calib ( const event_t &  )
virtual

Default: logs the _default_msg() warning and returns a private array that this class never fills.

Reimplemented in detector::AreaDetectorOpal, and detector::AreaDetectorPnccd.

◆ calib_pars()

calib::CalibPars * detector::AreaDetector::calib_pars ( )

Return the CalibPars object, creating it on first use with calib::getCalibPars(detname()), which throws for detector types it does not support.

◆ calib_pars_updated()

calib::CalibPars * detector::AreaDetector::calib_pars_updated ( )

Delete the current CalibPars object (if any) and return a new one from calib_pars().

◆ calibtype()

const std::string & detector::AreaDetector::calibtype ( )
inline

Return the calibration type string (initially "pedestals").

◆ common_mode()

virtual const NDArray< common_mode_t > & detector::AreaDetector::common_mode ( const event_t &  )
virtual

access to calibration constants

◆ config_array_for_index() [1/2]

template<typename T >
Array< T > detector::AreaDetector::config_array_for_index ( index_t  i)
inline

Return field i of the stored ConfigIter's desc_shape() as an Array<T>; asserts that a ConfigIter is stored.

◆ config_array_for_index() [2/2]

template<typename T >
Array< T > detector::AreaDetector::config_array_for_index ( XtcData::ConfigIter &  ci,
index_t  i 
)
inline

Return field i of ci.desc_shape() as an Array<T> (DescData::get_array<T>()).

◆ config_value_for_index() [1/2]

template<typename T >
T detector::AreaDetector::config_value_for_index ( index_t  i)
inline

Return field i of the stored ConfigIter's desc_shape() as a scalar of type T; asserts that a ConfigIter is stored.

◆ config_value_for_index() [2/2]

template<typename T >
T detector::AreaDetector::config_value_for_index ( XtcData::ConfigIter &  ci,
index_t  i 
)
inline

Return field i of ci.desc_shape() as a scalar of type T (DescData::get_value<T>()).

◆ coords()

virtual NDArray< const pixel_coord_t > & detector::AreaDetector::coords ( const event_t &  ,
const size_t &  axis = 0 
)
virtual

Return calib_pars()->coords(query(evt)); axis is ignored (CalibPars::coords() takes the axis from the Query's AXISNUM).

◆ data_array_for_index() [1/2]

template<typename T >
Array< T > detector::AreaDetector::data_array_for_index ( XtcData::DataIter &  di,
index_t  i 
)
inline

Return descdata(di).get_array<T>(i).

◆ data_array_for_index() [2/2]

template<typename T >
Array< T > detector::AreaDetector::data_array_for_index ( XtcData::DescData &  dd,
index_t  i 
)
inline

Return dd.get_array<T>(i).

◆ data_value_for_index() [1/2]

template<typename T >
T detector::AreaDetector::data_value_for_index ( XtcData::DataIter &  di,
index_t  i 
)
inline

Return descdata(di).get_value<T>(i).

◆ data_value_for_index() [2/2]

template<typename T >
T detector::AreaDetector::data_value_for_index ( XtcData::DescData &  dd,
index_t  i 
)
inline

Return dd.get_value<T>(i).

◆ descdata()

DescData & detector::AreaDetector::descdata ( XtcData::DataIter &  di)
inline

Return di.desc_value() built with the NamesLookup of the stored ConfigIter (not checked to be set).

◆ detid() [1/2]

virtual std::string detector::AreaDetector::detid ( const int  ind = -1)
virtual

Return what detid(std::ostream&, ind) writes, as a string.

◆ detid() [2/2]

virtual void detector::AreaDetector::detid ( std::ostream &  os,
const int  ind = -1 
)
virtual

Write "default_area_detector_id" to os; ind is ignored.

Reimplemented in detector::AreaDetectorCspad, detector::AreaDetectorJungfrau, detector::AreaDetectorOpal, and detector::AreaDetectorPnccd.

◆ expname()

const std::string & detector::AreaDetector::expname ( )
inline

Return the experiment name (initially "NOT_DEFINED").

◆ gain()

virtual const NDArray< pixel_gain_t > & detector::AreaDetector::gain ( const event_t &  )
virtual

Return calib_pars()->gain(query(evt)).

◆ geometry()

virtual const geometry_t & detector::AreaDetector::geometry ( const event_t &  )
virtual

access to geometry

◆ image() [1/2]

virtual const NDArray< image_t > & detector::AreaDetector::image ( const event_t &  )
virtual

Default: logs the _default_msg() warning and returns a private array that this class never fills.

◆ image() [2/2]

virtual const NDArray< image_t > & detector::AreaDetector::image ( const event_t &  ,
const NDArray< image_t > &  nda 
)
virtual

Default: logs the _default_msg() warning and returns the private image array; nda is not used.

◆ image_xaxis()

virtual NDArray< const pixel_size_t > & detector::AreaDetector::image_xaxis ( const event_t &  )
virtual

Return calib_pars()->image_xaxis(query(evt)).

◆ image_yaxis()

virtual NDArray< const pixel_size_t > & detector::AreaDetector::image_yaxis ( const event_t &  )
virtual

Return calib_pars()->image_yaxis(query(evt)).

◆ indexes()

virtual NDArray< const pixel_idx_t > & detector::AreaDetector::indexes ( const event_t &  ,
const size_t &  axis = 0 
)
virtual

Return calib_pars()->indexes(query(evt)); axis is ignored (CalibPars::indexes() takes the axis from the Query's AXISNUM).

◆ load_calib_constants()

virtual void detector::AreaDetector::load_calib_constants ( )
virtual

access to raw, calibrated data, and image

Reimplemented in detector::AreaDetectorOpal, and detector::AreaDetectorPnccd.

◆ mask()

virtual const NDArray< pixel_mask_t > & detector::AreaDetector::mask ( const event_t &  ,
const bool &  calib = true,
const bool &  sataus = true,
const bool &  edges = true,
const bool &  neighbors = true 
)
virtual

Return calib_pars()->mask(query(evt)); the bool flags are ignored.

◆ mask_bits()

virtual const NDArray< pixel_mask_t > & detector::AreaDetector::mask_bits ( const event_t &  ,
const size_t &  mbits = 0177777 
)
virtual

Return calib_pars()->mask_bits(query(evt)); mbits is ignored.

◆ mask_calib()

virtual const NDArray< pixel_mask_t > & detector::AreaDetector::mask_calib ( const event_t &  )
virtual

Return calib_pars()->mask_calib(query(evt)).

◆ mask_edges()

virtual const NDArray< pixel_mask_t > & detector::AreaDetector::mask_edges ( const event_t &  ,
const size_t &  nnbrs = 8 
)
virtual

Return calib_pars()->mask_edges(query(evt)); nnbrs is ignored.

◆ mask_from_status()

virtual const NDArray< pixel_mask_t > & detector::AreaDetector::mask_from_status ( const event_t &  )
virtual

Return calib_pars()->mask_from_status(query(evt)).

◆ mask_neighbors()

virtual const NDArray< pixel_mask_t > & detector::AreaDetector::mask_neighbors ( const event_t &  ,
const size_t &  nrows = 1,
const size_t &  ncols = 1 
)
virtual

Return calib_pars()->mask_neighbors(query(evt)); nrows and ncols are ignored.

◆ move_geo()

virtual void detector::AreaDetector::move_geo ( const event_t &  ,
const pixel_size_t &  dx,
const pixel_size_t &  dy,
const pixel_size_t &  dz 
)
virtual

Default: only logs the _default_msg() warning.

◆ ndim() [1/2]

virtual const size_t detector::AreaDetector::ndim ( )
virtual

Return 3 if numberOfModules > 1, else 2.

◆ ndim() [2/2]

virtual const size_t detector::AreaDetector::ndim ( const event_t &  )
virtual

Default: logs the _default_msg() warning and returns 0.

◆ offset()

virtual const NDArray< pixel_offset_t > & detector::AreaDetector::offset ( const event_t &  )
virtual

Return calib_pars()->offset(query(evt)).

Reimplemented in detector::AreaDetectorOpal.

◆ operator=()

AreaDetector & detector::AreaDetector::operator= ( const AreaDetector &  )
delete

Copy assignment is disabled.

◆ pedestals()

virtual const NDArray< pedestals_t > & detector::AreaDetector::pedestals ( const event_t &  )
virtual

Return calib_pars()->pedestals(query(evt)); query(evt) returns the stored Query without refreshing it.

◆ pedestals_d()

virtual const NDArray< double > & detector::AreaDetector::pedestals_d ( )
virtual

Return calib_pars()->pedestals_d(query()); query() first refreshes the Query from detname, expname, calibtype and runnum.

◆ pixel_size()

virtual NDArray< const pixel_size_t > & detector::AreaDetector::pixel_size ( const event_t &  ,
const size_t &  axis = 0 
)
virtual

Return calib_pars()->pixel_size(query(evt)); axis is ignored.

◆ print_config()

virtual const void detector::AreaDetector::print_config ( )
virtual

◆ print_data() [1/2]

virtual const void detector::AreaDetector::print_data ( )
virtual

Default: only logs the _default_msg() warning.

◆ print_data() [2/2]

virtual const void detector::AreaDetector::print_data ( XtcData::DataIter &  )
virtual

Default: only logs the _default_msg() warning.

Reimplemented in detector::AreaDetectorOpal, and detector::AreaDetectorPnccd.

◆ process_config()

virtual void detector::AreaDetector::process_config ( )
virtual

Print to stdout the Names of the stored ConfigIter's shape() entry and, for each field, its name, rank, type and element size, plus the value for INT64 scalars or the elements of arrays read as uint32_t.

Marked DEPRICATED in the header.

Reimplemented in detector::AreaDetectorCspad, and detector::AreaDetectorJungfrau.

◆ process_data()

virtual void detector::AreaDetector::process_data ( XtcData::DataIter &  )
virtual

Log the _default_msg() warning, then print each data field's name, rank and type, with the value for INT64 scalars or the first five elements of arrays read as uint16_t.

Marked DEPRICATED in the header.

Reimplemented in detector::AreaDetectorCspad, and detector::AreaDetectorJungfrau.

◆ query() [1/2]

Query & detector::AreaDetector::query ( )

Refresh the stored Query with set_paremeters(detname, expname, calibtype, runnum) and return it.

◆ query() [2/2]

Query & detector::AreaDetector::query ( const event_t &  )

Return the stored Query unchanged; evt is ignored.

◆ raw() [1/5]

virtual const NDArray< raw_t > & detector::AreaDetector::raw ( const event_t &  )
virtual

Default: logs the _default_msg() warning and returns a private array that this class never fills.

Reimplemented in detector::AreaDetectorJungfrau.

◆ raw() [2/5]

template<typename T >
void detector::AreaDetector::raw ( XtcData::DataIter &  datao,
NDArray< T > &  nda,
const char *  dataname = "frame" 
)

Same as raw(DescData&, NDArray<T>&, const char*), using datao.desc_value() with the stored ConfigIter's NamesLookup.

Instantiated for uint16_t.

◆ raw() [3/5]

template<typename T >
void detector::AreaDetector::raw ( XtcData::DataIter &  datao,
T *&  pdata,
const char *  dataname = "frame" 
)

Same as raw(DescData&, T*&, const char*), using datao.desc_value() with the stored ConfigIter's NamesLookup.

Instantiated for uint16_t.

◆ raw() [4/5]

template<typename T >
void detector::AreaDetector::raw ( XtcData::DescData &  ddata,
NDArray< T > &  nda,
const char *  dataname = "frame" 
)

Like raw(DescData&, T*&, const char*), then set the shape of nda from shape() and ndim() and point nda at the data without copying (set_data_buffer()).

Instantiated for uint16_t.

◆ raw() [5/5]

template<typename T >
void detector::AreaDetector::raw ( XtcData::DescData &  ddata,
T *&  pdata,
const char *  dataname = "frame" 
)

Set pdata to the data of the array field named dataname in ddata.

The field index is looked up on the first call only and reused afterwards; if no field matches it stays -1 (not checked). Defined in AreaDetector.cc and instantiated there for uint16_t.

◆ rms()

virtual const NDArray< pixel_rms_t > & detector::AreaDetector::rms ( const event_t &  )
virtual

Return calib_pars()->rms(query(evt)).

◆ runnum()

const unsigned detector::AreaDetector::runnum ( )
inline

Return the run number (initially 0).

◆ set_calibtype()

void detector::AreaDetector::set_calibtype ( const std::string &  calibtype)
inline

Set the calibration type string used by query().

◆ set_expname()

void detector::AreaDetector::set_expname ( const std::string &  expname)
inline

Set the experiment name used by query().

◆ set_runnum()

void detector::AreaDetector::set_runnum ( unsigned  runnum)
inline

Set the run number used by query().

◆ shape() [1/2]

virtual shape_t * detector::AreaDetector::shape ( )
virtual

Return the shape array, allocated on the first call from {numberOfModules, numberOfRows, numberOfColumns} if numberOfModules > 1, else {numberOfRows, numberOfColumns}.

Later calls return the same array.

◆ shape() [2/2]

virtual const shape_t * detector::AreaDetector::shape ( const event_t &  )
virtual

Default: logs the _default_msg() warning; if no shape array exists yet, allocates {1, 2, 3}; returns the shape array.

Reimplemented in detector::AreaDetectorEpix100a.

◆ size() [1/2]

virtual const size_t detector::AreaDetector::size ( )
virtual

Return numberOfPixels.

◆ size() [2/2]

virtual const size_t detector::AreaDetector::size ( const event_t &  )
virtual

Default: logs the _default_msg() warning and returns 0.

Reimplemented in detector::AreaDetectorEpix100a.

◆ status()

virtual const NDArray< pixel_status_t > & detector::AreaDetector::status ( const event_t &  )
virtual

Return calib_pars()->status(query(evt)).

◆ tilt_geo()

virtual void detector::AreaDetector::tilt_geo ( const event_t &  ,
const tilt_angle_t &  dtx,
const tilt_angle_t &  dty,
const tilt_angle_t &  dtz 
)
virtual

Default: only logs the _default_msg() warning.

Member Data Documentation

◆ _ind_data

int detector::AreaDetector::_ind_data
protected

◆ _pconfit

ConfigIter* detector::AreaDetector::_pconfit = 0
protected

◆ _pdatait

DataIter* detector::AreaDetector::_pdatait = 0
protected

◆ _shape

shape_t* detector::AreaDetector::_shape
protected

◆ maxModulesPerDetector

int64_t detector::AreaDetector::maxModulesPerDetector

Not initialized by AreaDetector; set by subclasses (e.g. from the config field "MaxModulesPerDetector" in AreaDetectorCspad).

◆ numberOfColumns

int64_t detector::AreaDetector::numberOfColumns

Not initialized by AreaDetector; set by subclasses. Used by shape().

◆ numberOfModules

int64_t detector::AreaDetector::numberOfModules

Not initialized by AreaDetector; set by subclasses. Used by ndim() and shape().

◆ numberOfPixels

int64_t detector::AreaDetector::numberOfPixels

Not initialized by AreaDetector; set by subclasses. Returned by size().

◆ numberOfRows

int64_t detector::AreaDetector::numberOfRows

Not initialized by AreaDetector; set by subclasses. Used by shape().


The documentation for this class was generated from the following file: