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

Calibration constants and geometry for one detector. More...

#include <CalibPars.hh>

Inherited by calib::CalibParsEpix100a.

Public Types

typedef geometry::AXIS AXIS
 Alias for geometry::AXIS.
 

Public Member Functions

 CalibPars (const char *detname="Undefined detname", const DBTYPE &dbtype=DBWEB)
 Store detname and create the DB backend with getCalibParsDB(dbtype), which gives NULL for types it does not implement.
 
virtual ~CalibPars ()
 Call deleteGeometryAccess(); the DB backend is not deleted.
 
const std::string & detname ()
 Return the detector name.
 
virtual const NDArray< common_mode_t > & common_mode (Query &)
 access to calibration constants
 
virtual const NDArray< pedestals_t > & pedestals (Query &)
 Return the DB backend's get_ndarray_float(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).
 
virtual const NDArray< double > & pedestals_d (Query &)
 Return the DB backend's get_ndarray_double(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).
 
virtual const NDArray< pixel_rms_t > & rms (Query &)
 Return the DB backend's get_ndarray_float(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).
 
virtual const NDArray< pixel_status_t > & status (Query &)
 Return the DB backend's get_ndarray_uint16(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).
 
virtual const NDArray< pixel_gain_t > & gain (Query &)
 Return the DB backend's get_ndarray_float(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).
 
virtual const NDArray< pixel_offset_t > & offset (Query &)
 Return the DB backend's get_ndarray_float(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).
 
virtual const NDArray< pixel_bkgd_t > & background (Query &)
 Return the DB backend's get_ndarray_float(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).
 
virtual const NDArray< pixel_mask_t > & mask_calib (Query &)
 Return the DB backend's get_ndarray_uint16(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).
 
virtual const NDArray< pixel_mask_t > & mask_from_status (Query &)
 Return the DB backend's get_ndarray_uint16(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).
 
virtual const NDArray< pixel_mask_t > & mask_edges (Query &)
 Return the DB backend's get_ndarray_uint16(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).
 
virtual const NDArray< pixel_mask_t > & mask_neighbors (Query &)
 Return the DB backend's get_ndarray_uint16(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).
 
virtual const NDArray< pixel_mask_t > & mask_bits (Query &)
 Return the DB backend's get_ndarray_uint16(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).
 
virtual const NDArray< pixel_mask_t > & mask (Query &)
 Return the DB backend's get_ndarray_uint16(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).
 
geometry::GeometryAccess * geometryAccess (Query &)
 access to geometry
 
void deleteGeometryAccess ()
 Delete the GeometryAccess object if one exists.
 
virtual const geometry_t & geometry_str (Query &)
 Return the DB backend's get_string(q) and log a debug message; q is passed unchanged.
 
virtual NDArray< const pixel_coord_t > & coords (Query &)
 Return geometryAccess(q)->get_pixel_coords(axis), with axis taken from q's AXISNUM parameter.
 
virtual NDArray< const pixel_idx_t > & indexes (Query &)
 Return geometryAccess(q)->get_pixel_coord_indexes(axis), with axis taken from q's AXISNUM parameter.
 
virtual NDArray< const pixel_size_t > & pixel_size (Query &)
 Default stub: logs a warning that the method (named image_size in the message) should be re-implemented in a derived class, and returns an internal array that is never filled.
 
virtual NDArray< const pixel_area_t > & pixel_area (Query &)
 Return geometryAccess(q)->get_pixel_areas().
 
virtual NDArray< const pixel_mask_t > & mask_geo (Query &)
 Return geometryAccess(q)->get_pixel_mask(mbits), with mbits taken from q's MASKBITSGEO parameter.
 
virtual NDArray< const pixel_size_t > & image_xaxis (Query &)
 Default stub: logs a warning that it should be re-implemented in a derived class and returns an internal array that is never filled.
 
virtual NDArray< const pixel_size_t > & image_yaxis (Query &)
 Default stub: logs a warning that it should be re-implemented in a derived class and returns an internal array that is never filled.
 
CalibParsDB * calibparsdb ()
 Return the DB backend pointer (NULL if getCalibParsDB() did not implement the type).
 
 CalibPars (const CalibPars &)=delete
 Copy construction is disabled.
 
CalibPars & operator= (const CalibPars &)=delete
 Copy assignment is disabled.
 
 CalibPars ()
 Default constructor with an empty body: the DB and GeometryAccess pointers are left uninitialized, so destroying such an object deletes an uninitialized pointer.
 

Protected Attributes

NDArray< common_mode_t > _common_mode
 
NDArray< pedestals_t > _pedestals
 
NDArray< pixel_rms_t > _pixel_rms
 
NDArray< pixel_status_t > _pixel_status
 
NDArray< pixel_gain_t > _pixel_gain
 
NDArray< pixel_offset_t > _pixel_offset
 
NDArray< pixel_bkgd_t > _pixel_bkgd
 
NDArray< pixel_mask_t > _pixel_mask
 
NDArray< const pixel_size_t > _pixel_size
 
geometry_t _geometry
 
const std::string _detname
 
CalibParsDB * _calibparsdb
 
geometry::GeometryAccess * _geometryaccess
 

Detailed Description

Calibration constants and geometry for one detector.

Constants come from a CalibParsDB backend created from dbtype by getCalibParsDB(). Geometry arrays come from a GeometryAccess object built on first use from the string returned by geometry_str().

Member Typedef Documentation

◆ AXIS

Constructor & Destructor Documentation

◆ CalibPars() [1/3]

calib::CalibPars::CalibPars ( const char *  detname = "Undefined detname",
const DBTYPE &  dbtype = DBWEB 
)

Store detname and create the DB backend with getCalibParsDB(dbtype), which gives NULL for types it does not implement.

No GeometryAccess is created yet.

◆ ~CalibPars()

virtual calib::CalibPars::~CalibPars ( )
virtual

Call deleteGeometryAccess(); the DB backend is not deleted.

◆ CalibPars() [2/3]

calib::CalibPars::CalibPars ( const CalibPars &  )
delete

Copy construction is disabled.

◆ CalibPars() [3/3]

calib::CalibPars::CalibPars ( )
inline

Default constructor with an empty body: the DB and GeometryAccess pointers are left uninitialized, so destroying such an object deletes an uninitialized pointer.

Member Function Documentation

◆ background()

virtual const NDArray< pixel_bkgd_t > & calib::CalibPars::background ( Query &  )
virtual

Return the DB backend's get_ndarray_float(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).

◆ calibparsdb()

CalibParsDB * calib::CalibPars::calibparsdb ( )
inline

Return the DB backend pointer (NULL if getCalibParsDB() did not implement the type).

◆ common_mode()

virtual const NDArray< common_mode_t > & calib::CalibPars::common_mode ( Query &  )
virtual

access to calibration constants

◆ coords()

virtual NDArray< const pixel_coord_t > & calib::CalibPars::coords ( Query &  )
virtual

Return geometryAccess(q)->get_pixel_coords(axis), with axis taken from q's AXISNUM parameter.

◆ deleteGeometryAccess()

void calib::CalibPars::deleteGeometryAccess ( )

Delete the GeometryAccess object if one exists.

The pointer is not reset, so a later geometryAccess() call would return the deleted object.

◆ detname()

const std::string & calib::CalibPars::detname ( )
inline

Return the detector name.

◆ gain()

virtual const NDArray< pixel_gain_t > & calib::CalibPars::gain ( Query &  )
virtual

Return the DB backend's get_ndarray_float(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).

◆ geometry_str()

virtual const geometry_t & calib::CalibPars::geometry_str ( Query &  )
virtual

Return the DB backend's get_string(q) and log a debug message; q is passed unchanged.

The trailing comment says it is the content of the geometry calibration file.

◆ geometryAccess()

geometry::GeometryAccess * calib::CalibPars::geometryAccess ( Query &  )

access to geometry

◆ image_xaxis()

virtual NDArray< const pixel_size_t > & calib::CalibPars::image_xaxis ( Query &  )
virtual

Default stub: logs a warning that it should be re-implemented in a derived class and returns an internal array that is never filled.

◆ image_yaxis()

virtual NDArray< const pixel_size_t > & calib::CalibPars::image_yaxis ( Query &  )
virtual

Default stub: logs a warning that it should be re-implemented in a derived class and returns an internal array that is never filled.

◆ indexes()

virtual NDArray< const pixel_idx_t > & calib::CalibPars::indexes ( Query &  )
virtual

Return geometryAccess(q)->get_pixel_coord_indexes(axis), with axis taken from q's AXISNUM parameter.

◆ mask()

virtual const NDArray< pixel_mask_t > & calib::CalibPars::mask ( Query &  )
virtual

Return the DB backend's get_ndarray_uint16(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).

◆ mask_bits()

virtual const NDArray< pixel_mask_t > & calib::CalibPars::mask_bits ( Query &  )
virtual

Return the DB backend's get_ndarray_uint16(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).

◆ mask_calib()

virtual const NDArray< pixel_mask_t > & calib::CalibPars::mask_calib ( Query &  )
virtual

Return the DB backend's get_ndarray_uint16(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).

◆ mask_edges()

virtual const NDArray< pixel_mask_t > & calib::CalibPars::mask_edges ( Query &  )
virtual

Return the DB backend's get_ndarray_uint16(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).

◆ mask_from_status()

virtual const NDArray< pixel_mask_t > & calib::CalibPars::mask_from_status ( Query &  )
virtual

Return the DB backend's get_ndarray_uint16(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).

◆ mask_geo()

virtual NDArray< const pixel_mask_t > & calib::CalibPars::mask_geo ( Query &  )
virtual

Return geometryAccess(q)->get_pixel_mask(mbits), with mbits taken from q's MASKBITSGEO parameter.

◆ mask_neighbors()

virtual const NDArray< pixel_mask_t > & calib::CalibPars::mask_neighbors ( Query &  )
virtual

Return the DB backend's get_ndarray_uint16(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).

◆ offset()

virtual const NDArray< pixel_offset_t > & calib::CalibPars::offset ( Query &  )
virtual

Return the DB backend's get_ndarray_float(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).

◆ operator=()

CalibPars & calib::CalibPars::operator= ( const CalibPars &  )
delete

Copy assignment is disabled.

◆ pedestals()

virtual const NDArray< pedestals_t > & calib::CalibPars::pedestals ( Query &  )
virtual

Return the DB backend's get_ndarray_float(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).

◆ pedestals_d()

virtual const NDArray< double > & calib::CalibPars::pedestals_d ( Query &  )
virtual

Return the DB backend's get_ndarray_double(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).

◆ pixel_area()

virtual NDArray< const pixel_area_t > & calib::CalibPars::pixel_area ( Query &  )
virtual

Return geometryAccess(q)->get_pixel_areas().

◆ pixel_size()

virtual NDArray< const pixel_size_t > & calib::CalibPars::pixel_size ( Query &  )
virtual

Default stub: logs a warning that the method (named image_size in the message) should be re-implemented in a derived class, and returns an internal array that is never filled.

◆ rms()

virtual const NDArray< pixel_rms_t > & calib::CalibPars::rms ( Query &  )
virtual

Return the DB backend's get_ndarray_float(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).

◆ status()

virtual const NDArray< pixel_status_t > & calib::CalibPars::status ( Query &  )
virtual

Return the DB backend's get_ndarray_uint16(q) and log a debug message; q is passed unchanged (its CALIBTYPE is not set here).

Member Data Documentation

◆ _calibparsdb

CalibParsDB* calib::CalibPars::_calibparsdb
protected

◆ _common_mode

NDArray<common_mode_t> calib::CalibPars::_common_mode
protected

◆ _detname

const std::string calib::CalibPars::_detname
protected

◆ _geometry

geometry_t calib::CalibPars::_geometry
protected

◆ _geometryaccess

geometry::GeometryAccess* calib::CalibPars::_geometryaccess
protected

◆ _pedestals

NDArray<pedestals_t> calib::CalibPars::_pedestals
protected

◆ _pixel_bkgd

NDArray<pixel_bkgd_t> calib::CalibPars::_pixel_bkgd
protected

◆ _pixel_gain

NDArray<pixel_gain_t> calib::CalibPars::_pixel_gain
protected

◆ _pixel_mask

NDArray<pixel_mask_t> calib::CalibPars::_pixel_mask
protected

◆ _pixel_offset

NDArray<pixel_offset_t> calib::CalibPars::_pixel_offset
protected

◆ _pixel_rms

NDArray<pixel_rms_t> calib::CalibPars::_pixel_rms
protected

◆ _pixel_size

NDArray<const pixel_size_t> calib::CalibPars::_pixel_size
protected

◆ _pixel_status

NDArray<pixel_status_t> calib::CalibPars::_pixel_status
protected

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