lsst.afw  16.0-76-g802307b6d+1
Classes | Public Member Functions | List of all members
lsst::afw::cameraGeom::TransformMap::Builder Class Reference

Helper class used to incrementally construct TransformMap instances. More...

#include <TransformMap.h>

Public Member Functions

 Builder (CameraSys const &reference)
 Construct an empty builder with no transforms and only the given coordinate system. More...
 
 ~Builder () noexcept
 
Builder & connect (CameraSys const &fromSys, CameraSys const &toSys, std::shared_ptr< geom::TransformPoint2ToPoint2 const > transform)
 Add a new coordinate system to the builder. More...
 
Builder & connect (CameraSys const &fromSys, Transforms const &transforms)
 Add multiple connections relative to a single reference CameraSys. More...
 
Builder & connect (Transforms const &transforms)
 Add multiple connections relative to a single reference CameraSys. More...
 
std::shared_ptr< TransformMap const > build () const
 Construct a TransformMap from the connections in the builder. More...
 
 Builder (Builder const &)
 
 Builder (Builder &&)
 
Builder & operator= (Builder const &)
 
Builder & operator= (Builder &&)
 

Detailed Description

Helper class used to incrementally construct TransformMap instances.

Definition at line 239 of file TransformMap.h.

Constructor & Destructor Documentation

◆ Builder() [1/3]

lsst::afw::cameraGeom::TransformMap::Builder::Builder ( CameraSys const &  reference)
explicit

Construct an empty builder with no transforms and only the given coordinate system.

Definition at line 252 of file TransformMap.cc.

◆ Builder() [2/3]

lsst::afw::cameraGeom::TransformMap::Builder::Builder ( Builder const &  )
default

Builders are copyable, movable, and assignable.

◆ Builder() [3/3]

lsst::afw::cameraGeom::TransformMap::Builder::Builder ( Builder &&  )
default

Builders are copyable, movable, and assignable.

◆ ~Builder()

lsst::afw::cameraGeom::TransformMap::Builder::~Builder ( )
defaultnoexcept

Member Function Documentation

◆ build()

std::shared_ptr< TransformMap const > lsst::afw::cameraGeom::TransformMap::Builder::build ( ) const

Construct a TransformMap from the connections in the builder.

Exceptions
pex::exceptions::InvalidParameterErrorThrown if there is no direct or indirect connection between FOCAL_PLANE and one or more coordinate systems, or there are duplicate connections between any two systems.
Exception Safety
strong

Definition at line 330 of file TransformMap.cc.

◆ connect() [1/3]

TransformMap::Builder & lsst::afw::cameraGeom::TransformMap::Builder::connect ( CameraSys const &  fromSys,
CameraSys const &  toSys,
std::shared_ptr< geom::TransformPoint2ToPoint2 const >  transform 
)

Add a new coordinate system to the builder.

Parameters
fromSysCoordinate system for the arguments to transform->applyForward.
toSysCoordinate system for the return values of transform->applyForward.
transformMapping from fromSys to toSys.
Returns
*this to enable chained calls.
Exceptions
pex::exceptions::InvalidParameterErrorThrown if the transform does not have forward or inverse mapping, or if fromSys and toSys are the same.
Exception Safety
strong

Definition at line 262 of file TransformMap.cc.

◆ connect() [2/3]

TransformMap::Builder & lsst::afw::cameraGeom::TransformMap::Builder::connect ( CameraSys const &  fromSys,
Transforms const &  transforms 
)

Add multiple connections relative to a single reference CameraSys.

Parameters
fromSysCoordinate system of the arguments to Transform::applyForward for each transform in the given map.
transformsA map whose keys are camera coordinate systems, and whose values point to Transforms that convert from fromSys coordinate system to the corresponding key. All Transforms must be invertible.
Returns
*this to enable chained calls.
Exceptions
lsst::pex::exceptions::InvalidParameterErrorThrown if transforms contains fromSys camera system as a key, or if any Transform is not invertible.
Exception Safety
strong

Definition at line 289 of file TransformMap.cc.

◆ connect() [3/3]

Builder& lsst::afw::cameraGeom::TransformMap::Builder::connect ( Transforms const &  transforms)
inline

Add multiple connections relative to a single reference CameraSys.

Parameters
transformsA map whose keys are camera coordinate systems, and whose values point to Transforms that convert from the reference coordinate system (i.e. the one the Builder was originally constructed with) to the corresponding key. All Transforms must be invertible.
Returns
*this to enable chained calls.
Exceptions
lsst::pex::exceptions::InvalidParameterErrorThrown if transforms contains the reference camera system as a key, or if any Transform is not invertible.
Exception Safety
strong

Definition at line 317 of file TransformMap.h.

◆ operator=() [1/2]

TransformMap::Builder & lsst::afw::cameraGeom::TransformMap::Builder::operator= ( Builder const &  )
default

Builders are copyable, movable, and assignable.

◆ operator=() [2/2]

TransformMap::Builder & lsst::afw::cameraGeom::TransformMap::Builder::operator= ( Builder &&  )
default

Builders are copyable, movable, and assignable.


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