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

#include <SegGeometryStore.hh>

Static Public Member Functions

static geometry::SegGeometry * Create (const std::string &segname="SENS2X1:V1")
 Static factory method for SegGeometry of the segments defined by the name.
 

Detailed Description

@ingroup geometry

@brief class SegGeometryStore has a static factory method Create for SegGeometry object

This software was developed for the LCLS project.
If you use all or part of it, please give an appropriate acknowledgment.

@author Mikhail S. Dubrovin

@see SegGeometry, SegGeometryCspad2x1V1

@anchor interface
@par<interface> Interface Description

@li  Includes
@code
// #include "psalg/geometry/SegGeometry.hh" // already included under SegGeometryStore.h
#include "psalg/geometry/SegGeometryStore.hh"
typedef geometry::SegGeometry SG;
@endcode

@li Instatiation
\n
Classes like SegGeometryCspad2x1V1 containing implementation of the SegGeometry interface methods are self-sufficient. 
Factory method Create should returns the pointer to the SegGeometry object by specified segname parameter or returns 0-pointer if segname is not recognized (and not implemented).
Code below instateates SegGeometry object using factory static method geometry::SegGeometryStore::Create()
@code
std::string source = "SENS2X1:V1";
or 
std::string source = "EPIX100:V1";
or 
std::string source = "PNCCD:V1";
geometry

::SegGeometry* segeo = geometry::SegGeometryStore::Create(segname);

  • Print info
    segeo -> print_seg_info();
  • Access methods
    are defined in the interface SegGeometry and implemented in SegGeometryCspad2x1V1
    // scalar values
    const SG::gsize_t array_size = segeo -> size();
    const SG::gsize_t number_of_rows = segeo -> rows();
    const SG::gsize_t number_of_cols = segeo -> cols();
    const SG::pixel_coord_t pixel_scale_size = segeo -> pixel_scale_size();
    const SG::pixel_coord_t pixel_coord_min = segeo -> pixel_coord_min(SG::AXIS_Z);
    const SG::pixel_coord_t pixel_coord_max = segeo -> pixel_coord_max(SG::AXIS_X);
    // pointer to arrays with size equal to array_size
    const SG::gsize_t* p_array_shape = segeo -> shape();
    const SG::pixel_area_t* p_pixel_area = segeo -> pixel_area_array();
    const SG::pixel_coord_t* p_pixel_size_arr = segeo -> pixel_size_array(SG::AXIS_X);
    const SG::pixel_coord_t* p_pixel_coord_arr = segeo -> pixel_coord_array(SG::AXIS_Y);

Member Function Documentation

◆ Create()

static geometry::SegGeometry * geometry::SegGeometryStore::Create ( const std::string &  segname = "SENS2X1:V1")
inlinestatic

Static factory method for SegGeometry of the segments defined by the name.

Parameters
[in]segnamesegment name

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