LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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 37 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 42 of file DataIOmanip.h.

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

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 46 of file DataIOmanip.h.

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

Member Data Documentation

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

Vector to be printed.

Definition at line 38 of file DataIOmanip.h.


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