LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
util::manip::details::Vector3DStruct< Vect > Class Template Reference

Utility class to store and print a 3D vector. More...

#include "DataIOmanip.h"

Public Member Functions

 Vector3DStruct (Vect const &vector)
 Constructor: print the specified vector. More...
 
template<typename Stream >
Stream & operator() (Stream &&out) const
 The printing operator. More...
 

Private Attributes

Vect const & v
 Vector to be printed. More...
 

Detailed Description

template<typename Vect>
class util::manip::details::Vector3DStruct< Vect >

Utility class to store and print a 3D vector.

Template Parameters
Vecttype of the vector to be printed (see the requirements)

The printing operation is stored internally just for convenience.

The Vect type is required to provide member functions X(), Y() and Z(), whose return value can be directly streamed.

Definition at line 35 of file DataIOmanip.h.

Constructor & Destructor Documentation

template<typename Vect >
util::manip::details::Vector3DStruct< Vect >::Vector3DStruct ( Vect const &  vector)
inline

Constructor: print the specified vector.

Definition at line 40 of file DataIOmanip.h.

40 : v(vector) {}
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:289
Vect const & v
Vector to be printed.
Definition: DataIOmanip.h:36

Member Function Documentation

template<typename Vect >
template<typename Stream >
Stream& util::manip::details::Vector3DStruct< Vect >::operator() ( Stream &&  out) const
inline

The printing operator.

Definition at line 44 of file DataIOmanip.h.

45  {
46  out << "( " << v.X() << " ; " << v.Y() << " ; " << v.Z() << " )";
47  return out;
48  } // operator()
Vect const & v
Vector to be printed.
Definition: DataIOmanip.h:36

Member Data Documentation

template<typename Vect >
Vect const& util::manip::details::Vector3DStruct< Vect >::v
private

Vector to be printed.

Definition at line 36 of file DataIOmanip.h.


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