Peakfinder8
Peakfinder8
Section titled “Peakfinder8”#include <xalgospp/features/peakfinder8.hh>template<typename MemTag = ncarray::HostTag>class Peakfinder8Defined in src/lib/xalgospp/features/peakfinder8.hh:50
Inherits:
HostTag >
List of all members
Section titled “List of all members”| Name | Kind | Owner |
|---|---|---|
Peakfinder8 |
function |
Declared here |
Peakfinder8 |
function |
Declared here |
configure_impl |
function |
Declared here |
stage_impl |
function |
Declared here |
get_staged_data_impl |
function |
Declared here |
set_staged_data_impl |
function |
Declared here |
staged_data_size_impl |
function |
Declared here |
process_impl |
function |
Declared here |
process_many_impl |
function |
Declared here |
name_impl |
function |
Declared here |
params_impl |
function |
Declared here |
TypeConstraint |
variable |
Declared here |
Input |
typedef |
Declared here |
Output |
typedef |
Declared here |
m_params |
variable |
Declared here |
m_num_pixels |
variable |
Declared here |
m_pix_in_peak_map |
variable |
Declared here |
m_infs |
variable |
Declared here |
m_inss |
variable |
Declared here |
m_peak_pixels |
variable |
Declared here |
m_rstats |
variable |
Declared here |
m_serialized_data |
variable |
Declared here |
m_staged_mask |
variable |
Declared here |
m_staged_r_map |
variable |
Declared here |
process_cpu |
function |
Declared here |
Algorithm |
function |
Inherited from Algorithm |
configure |
function |
Inherited from Algorithm |
stage |
function |
Inherited from Algorithm |
get_staged_data |
function |
Inherited from Algorithm |
set_staged_data |
function |
Inherited from Algorithm |
staged_data_size |
function |
Inherited from Algorithm |
process |
function |
Inherited from Algorithm |
process |
function |
Inherited from Algorithm |
operator() |
function |
Inherited from Algorithm |
operator() |
function |
Inherited from Algorithm |
process_many |
function |
Inherited from Algorithm |
process_many |
function |
Inherited from Algorithm |
name |
function |
Inherited from Algorithm |
print_configuration |
function |
Inherited from Algorithm |
print_configuration |
function |
Inherited from Algorithm |
params |
function |
Inherited from Algorithm |
TypeConstraint |
variable |
Inherited from Algorithm |
Input |
typedef |
Inherited from Algorithm |
Output |
typedef |
Inherited from Algorithm |
Inherited from Algorithm
Section titled “Inherited from Algorithm”| Kind | Name | Description |
|---|---|---|
function |
Algorithm |
Defaulted constructor. |
function |
configure inline |
Perform configuration of the algorithm given an input set of parameters. |
function |
stage inline |
Optional stage to perform associated actions before processing. |
function |
get_staged_data const inline |
For Algorithms which provide staging of associated data, retrieve what was staged. |
function |
set_staged_data inline |
For Algorithms which provide staging of associated data, alternatively set it. |
function |
staged_data_size const inline |
For Algorithms which provide staging, retrieve the size (in bytes) of the staged data. |
function |
process const inline requires ([]() { if constexpr (requires { Derived::TypeConstraint == AlgTypeConstraint::StrictOrdering; }) { return Derived::Input::template accepts_when_paired< InputArg, OutputArg, typename Derived::Output >; } else { return Derived::Input::template accepts<InputArg> && Derived::Output::template accepts<OutputArg>; } }()) |
|
function |
process inline requires ([]() { if constexpr (requires { Derived::TypeConstraint == AlgTypeConstraint::StrictOrdering; }) { return Derived::Input::template accepts_when_paired< InputArg, OutputArg, typename Derived::Output >; } else { return Derived::Input::template accepts<InputArg> && Derived::Output::template accepts<OutputArg>; } }()) |
|
function |
operator() inline |
|
function |
operator() const inline |
|
function |
process_many const inline requires ([]() { if constexpr (requires { Derived::TypeConstraint == AlgTypeConstraint::StrictOrdering; }) { return Derived::Input::template accepts_when_paired< InputArg, OutputArg, typename Derived::Output >; } else { return Derived::Input::template accepts<InputArg> && Derived::Output::template accepts<OutputArg>; } }()) |
|
function |
process_many inline requires ([]() { if constexpr (requires { Derived::TypeConstraint == AlgTypeConstraint::StrictOrdering; }) { return Derived::Input::template accepts_when_paired< InputArg, OutputArg, typename Derived::Output >; } else { return Derived::Input::template accepts<InputArg> && Derived::Output::template accepts<OutputArg>; } }()) |
|
function |
name const inline |
|
function |
print_configuration const inline |
Print the name and current values of the Algorithm’s Parameters. |
function |
print_configuration inline |
Print the name and current values of the Algorithm’s Parameters. |
function |
params const inline |
Retrieve the current Parameters for the Algorithm. |
variable |
TypeConstraint static constexpr |
|
typedef |
Input |
The list of supported input types. |
typedef |
Output |
The list of supported output types. |
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
Peakfinder8 |
Defaulted constructor. | |
Peakfinder8 inline |
||
void |
configure_impl inline |
|
void |
stage_impl inline |
For staging, the Peakfinder8Algorithm stages the mask and radius map. |
const std::uint8_t * |
get_staged_data_impl const inline |
Retrieve a pointer to the serialized mask and radius map. |
void |
set_staged_data_impl inline |
Provide access from a buffer from elsewhere containing the calibration constants. |
std::size_t |
staged_data_size_impl const inline |
The total size in bytes of the mask and radius map. |
void |
process_impl const inline requires (Input::template accepts_when_paired<InputArg, OutputArg, Output>) |
|
void |
process_many_impl inline requires (Input::template accepts_when_paired<InputArg, OutputArg, Output>) |
|
const char * |
name_impl const inline |
|
const Params & |
params_impl const inline |
Peakfinder8
Section titled “Peakfinder8”Peakfinder8() = defaultDefined in src/lib/xalgospp/features/peakfinder8.hh:89
Defaulted constructor.
Peakfinder8
Section titled “Peakfinder8”inline
inline Peakfinder8(const Params & params)Defined in src/lib/xalgospp/features/peakfinder8.hh:90
configure_impl
Section titled “configure_impl”inline
inline void configure_impl(const Params & params)Defined in src/lib/xalgospp/features/peakfinder8.hh:92
stage_impl
Section titled “stage_impl”inline
inline void stage_impl()Defined in src/lib/xalgospp/features/peakfinder8.hh:122
For staging, the Peakfinder8Algorithm stages the mask and radius map.
Currently, the staging requires one parallel unit to provide both mask and radius map via the parameters object. In the future, the staging will have the option to also do some calcualtion based on other input types, e.g., a geometry.
Todo: Work on providing alternative staging mechanism than just a full input mask and radius map.
After staging, the data from the contiguous memory allocation is split into two spans which are used everywhere else for the mask and radius map.
get_staged_data_impl
Section titled “get_staged_data_impl”const inline
inline const std::uint8_t * get_staged_data_impl() constDefined in src/lib/xalgospp/features/peakfinder8.hh:171
Retrieve a pointer to the serialized mask and radius map.
The staged data is organized as: | mask | radius_map | in a single contiguous block.
Returns
Section titled “Returns”A pointer to the buffer containing mask and radius map.
set_staged_data_impl
Section titled “set_staged_data_impl”inline
inline void set_staged_data_impl(std::uint8_t * buf, std::size_t nbytes)Defined in src/lib/xalgospp/features/peakfinder8.hh:185
Provide access from a buffer from elsewhere containing the calibration constants.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
buf |
std::uint8_t * |
A buffer containing calibration constants. |
nbytes |
std::size_t |
The size of the buffer in bytes. |
staged_data_size_impl
Section titled “staged_data_size_impl”const inline
inline std::size_t staged_data_size_impl() constDefined in src/lib/xalgospp/features/peakfinder8.hh:212
The total size in bytes of the mask and radius map.
Returns
Section titled “Returns”The total size in bytes of the mask and radius map.
process_impl
Section titled “process_impl”const inline requires (Input::template accepts_when_paired<InputArg, OutputArg, Output>)
template<typename InputArg, typename OutputArg> inline void process_impl(const InputArg & input, OutputArg & output) const requires (Input::template accepts_when_paired<InputArg, OutputArg, Output>)Defined in src/lib/xalgospp/features/peakfinder8.hh:216
process_many_impl
Section titled “process_many_impl”inline requires (Input::template accepts_when_paired<InputArg, OutputArg, Output>)
template<typename InputArg, typename OutputArg> inline void process_many_impl(std::size_t count, const InputArg & input, OutputArg & output) requires (Input::template accepts_when_paired<InputArg, OutputArg, Output>)Defined in src/lib/xalgospp/features/peakfinder8.hh:230
name_impl
Section titled “name_impl”const inline
inline const char * name_impl() constDefined in src/lib/xalgospp/features/peakfinder8.hh:236
params_impl
Section titled “params_impl”const inline
inline const Params & params_impl() constDefined in src/lib/xalgospp/features/peakfinder8.hh:238
Public Static Attributes
Section titled “Public Static Attributes”| Return | Name | Description |
|---|---|---|
constexpr AlgTypeConstraint |
TypeConstraint static constexpr |
TypeConstraint
Section titled “TypeConstraint”static constexpr
constexpr AlgTypeConstraint TypeConstraint { }Defined in src/lib/xalgospp/features/peakfinder8.hh:55
Public Types
Section titled “Public Types”| Name | Description |
|---|---|
Input |
|
Output |
using Input = type_list< ncarray::NCViewFor< MemTag >, ncarray::SOViewFor< MemTag > >Defined in src/lib/xalgospp/features/peakfinder8.hh:52
Output
Section titled “Output”using Output = type_list< ncarray::NCViewFor< MemTag >, ncarray::SOViewFor< MemTag > >Defined in src/lib/xalgospp/features/peakfinder8.hh:53
Private Attributes
Section titled “Private Attributes”| Return | Name | Description |
|---|---|---|
Params |
m_params |
|
std::size_t |
m_num_pixels |
|
std::vector< std::uint8_t > |
m_pix_in_peak_map |
|
std::vector< int > |
m_infs |
|
std::vector< int > |
m_inss |
|
std::vector< int > |
m_peak_pixels |
|
impl::RadialStatistics |
m_rstats |
Information for radial background stats. |
std::vector< std::uint8_t > |
m_serialized_data |
Serialized mask and radius map. |
std::span< const bool > |
m_staged_mask |
Mask, span over serialized data. |
std::span< const float > |
m_staged_r_map |
Radius map, span over serialized data. |
m_params
Section titled “m_params”Params m_paramsDefined in src/lib/xalgospp/features/peakfinder8.hh:241
m_num_pixels
Section titled “m_num_pixels”std::size_t m_num_pixels { 0 }Defined in src/lib/xalgospp/features/peakfinder8.hh:242
m_pix_in_peak_map
Section titled “m_pix_in_peak_map”std::vector< std::uint8_t > m_pix_in_peak_mapDefined in src/lib/xalgospp/features/peakfinder8.hh:244
m_infs
Section titled “m_infs”std::vector< int > m_infsDefined in src/lib/xalgospp/features/peakfinder8.hh:245
m_inss
Section titled “m_inss”std::vector< int > m_inssDefined in src/lib/xalgospp/features/peakfinder8.hh:246
m_peak_pixels
Section titled “m_peak_pixels”std::vector< int > m_peak_pixelsDefined in src/lib/xalgospp/features/peakfinder8.hh:247
m_rstats
Section titled “m_rstats”impl::RadialStatistics m_rstatsDefined in src/lib/xalgospp/features/peakfinder8.hh:249
Information for radial background stats.
m_serialized_data
Section titled “m_serialized_data”std::vector< std::uint8_t > m_serialized_dataDefined in src/lib/xalgospp/features/peakfinder8.hh:251
Serialized mask and radius map.
m_staged_mask
Section titled “m_staged_mask”std::span< const bool > m_staged_maskDefined in src/lib/xalgospp/features/peakfinder8.hh:252
Mask, span over serialized data.
m_staged_r_map
Section titled “m_staged_r_map”std::span< const float > m_staged_r_mapDefined in src/lib/xalgospp/features/peakfinder8.hh:253
Radius map, span over serialized data.
Private Methods
Section titled “Private Methods”| Return | Name | Description |
|---|---|---|
void |
process_cpu const inline |
process_cpu
Section titled “process_cpu”const inline
template<typename InputArg, typename OutputArg> inline void process_cpu(const InputArg & data, OutputArg & peaks_out) constDefined in src/lib/xalgospp/features/peakfinder8.hh:263