Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
VectorAccumulable< T > Class Template Reference

#include <VectorAccummulable.hh>

Inheritance diagram for VectorAccumulable< T >:
G4VAccumulable

Public Member Functions

 VectorAccumulable ()=default
 
 ~VectorAccumulable () override=default
 
void AddValue (T value)
 
const std::vector< T > & GetVector () const
 
void Merge (const G4VAccumulable &other) override
 
void Reset () override
 

Private Attributes

std::vector< T > fTVector
 

Detailed Description

template<typename T>
class VectorAccumulable< T >

Definition at line 41 of file VectorAccummulable.hh.

Constructor & Destructor Documentation

◆ VectorAccumulable()

template<typename T >
VectorAccumulable< T >::VectorAccumulable ( )
default

◆ ~VectorAccumulable()

template<typename T >
VectorAccumulable< T >::~VectorAccumulable ( )
overridedefault

Member Function Documentation

◆ AddValue()

template<typename T >
void VectorAccumulable< T >::AddValue ( value)
inline

Definition at line 60 of file VectorAccummulable.hh.

60 {
61 fTVector.push_back(value);
62}
std::vector< T > fTVector

◆ GetVector()

template<typename T >
const std::vector< T > & VectorAccumulable< T >::GetVector ( ) const
inline

Definition at line 65 of file VectorAccummulable.hh.

66{
67 return fTVector;
68}

◆ Merge()

template<typename T >
void VectorAccumulable< T >::Merge ( const G4VAccumulable other)
inlineoverride

Definition at line 71 of file VectorAccummulable.hh.

71 {
72 for (const auto& value : static_cast<const VectorAccumulable<T>&>(other).fTVector ) {
73 fTVector.push_back(value);
74 }
75}

◆ Reset()

template<typename T >
void VectorAccumulable< T >::Reset ( )
inlineoverride

Definition at line 78 of file VectorAccummulable.hh.

78 {
79 fTVector.clear();
80}

Member Data Documentation

◆ fTVector

template<typename T >
std::vector<T> VectorAccumulable< T >::fTVector
private

Definition at line 54 of file VectorAccummulable.hh.


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

Applications | User Support | Publications | Collaboration