allpix::FieldData

More…

#include <field_parser.h>

Public Functions

Name
FieldData() =default
Default constructor to create an empty field data object.
FieldData(std::string header, std::array< size_t, 3 > dimensions, std::array< T, 3 > size, std::shared_ptr< std::vector< T » data)
Constructor for field data.
std::string getHeader() const
Function to obtain the header (human readbale content description) of the field data.
std::array< size_t, 3 > getDimensions() const
Member to get the dimensions of the field as number of bins in x, y, z.
std::array< T, 3 > getSize() const
Member to get the physical extent of the field in each dimension as parsed from the input in internal units.
std::shared_ptr< std::vector< T > > getData() const
Member to access the actual field data.
size_t getDimensionality() const
get the dimensionality of the configured field in the x-y plane, e.g whether it is defined in 1D, 2D or 3D.

Detailed Description

template <typename T  =double>
class allpix::FieldData;

Class to hold raw, three-dimensional field data with N components, containing

  • The actual field data as shared pointer to vector
  • An array specifying the number of bins in each dimension
  • An array containing the physical extent of the field in each dimension, as specified in the file

Public Functions Documentation

function FieldData

FieldData() =default

Default constructor to create an empty field data object.

function FieldData

inline FieldData(
    std::string header,
    std::array< size_t, 3 > dimensions,
    std::array< T, 3 > size,
    std::shared_ptr< std::vector< T >> data
)

Constructor for field data.

Parameters:

  • header Human readable header string to identify file content, program version used for generation etc.
  • dimensions Number of bins of the field in each coordinate
  • size Physical extent of the field in each dimension, given in internal units
  • data Shared pointer to the flat field data

function getHeader

inline std::string getHeader() const

Function to obtain the header (human readbale content description) of the field data.

Return: header string

function getDimensions

inline std::array< size_t, 3 > getDimensions() const

Member to get the dimensions of the field as number of bins in x, y, z.

Return: array with the number of bins in x, y and z

function getSize

inline std::array< T, 3 > getSize() const

Member to get the physical extent of the field in each dimension as parsed from the input in internal units.

Return: array with physical size in x, y and z

function getData

inline std::shared_ptr< std::vector< T > > getData() const

Member to access the actual field data.

Return: shared pointer to the flat vector of field data

function getDimensionality

inline size_t getDimensionality() const

get the dimensionality of the configured field in the x-y plane, e.g whether it is defined in 1D, 2D or 3D.

Return: Dimensionality of the field


Updated on 2024-12-13 at 08:31:36 +0000