Classes | Namespaces | Macros | Functions
Trace.h File Reference
#include <algorithm>
#include <complex>
#include <iostream>
#include <string>
#include <vector>
#include <utl/ErrorLogger.h>
#include <utl/SVector.h>
#include <utl/ShadowPtr_fwd.h>
#include <utl/IteratorRange.h>

Go to the source code of this file.

Classes

class  utl::Trace< T >
 Template class for a FADC data or calibrated data container. Use the typedefs (TraceD, TraceI, etc.) defined in Trace-fwd.h. More...
 

Namespaces

 std
 
 utl
 

Macros

#define INNER_ARITHMETIC_BINARY_OPERATOR(_op_)
 
#define INNER_AUGMENTED_ARITHMETIC_OPERATOR(_op_)
 
#define LEFT_OUTER_ARITHMETIC_OPERATOR(_op_)
 
#define OUTER_AUGMENTED_ARITHMETIC_OPERATOR(_op_)
 
#define RIGHT_OUTER_ARITHMETIC_OPERATOR(_op_)
 

Functions

template<typename _T1_ , typename _T2_ >
utl::Trace< _T2_ > utl::operator* (const utl::Trace< _T1_ > &trace, const _T2_ value)
 
template<typename _T1_ , typename _T2_ >
utl::Trace< _T2_ > utl::operator* (const _T2_ value, const utl::Trace< _T1_ > &trace)
 
template<typename _T1_ , typename _T2_ >
utl::Trace< _T2_ > utl::operator+ (const utl::Trace< _T1_ > &trace, const _T2_ value)
 
template<typename _T1_ , typename _T2_ >
utl::Trace< _T2_ > utl::operator+ (const _T2_ value, const utl::Trace< _T1_ > &trace)
 
template<typename _T1_ , typename _T2_ >
utl::Trace< _T2_ > utl::operator- (const utl::Trace< _T1_ > &trace, const _T2_ value)
 
template<typename _T1_ , typename _T2_ >
utl::Trace< _T2_ > utl::operator- (const _T2_ value, const utl::Trace< _T1_ > &trace)
 
template<typename _T1_ , typename _T2_ >
utl::Trace< _T2_ > utl::operator/ (const utl::Trace< _T1_ > &trace, const _T2_ value)
 
template<typename T >
void std::swap (utl::Trace< T > &t1, utl::Trace< T > &t2)
 

Detailed Description

Template class for a FADC data or calibrated data container.

Author
Lukas Nellen
Darko Veberic
Tim Huege
Date
31 Jan 2003
10 Jun 2005 DV update
05 Oct 2018 add fScale

Definition in file Trace.h.

Macro Definition Documentation

#define INNER_ARITHMETIC_BINARY_OPERATOR (   _op_)
Value:
template<typename T> \
Trace<T> \
Trace<T>::operator _op_(const Trace<T>& trace) \
const \
{ \
const SizeType size = GetSize(); \
if (IsSameTypeAs(trace)) { \
Trace<T> result(size, fBinning); \
transform(fArray.begin(), fArray.end(), trace.Begin(), result.Begin(), \
[](const auto& l, const auto& r) { return l _op_ r;} ); \
result.fStart = fStart; \
result.fStop = fStop; \
result.fScale = fScale; \
return result; \
} else { \
ERROR("Attempting to operate on two traces of different type"); \
Trace<T> foo; \
return foo; \
} \
}
const Data result[]
if(dataRoot)
Definition: XXMLManager.h:1003
#define ERROR(message)
Macro for logging error messages.
Definition: ErrorLogger.h:165

Definition at line 247 of file Trace.h.

#define INNER_AUGMENTED_ARITHMETIC_OPERATOR (   _op_)
Value:
template<typename T> \
Trace<T>& \
Trace<T>::operator _op_##=(const Trace<T>& trace) \
{ \
if (IsSameTypeAs(trace)) { \
transform(fArray.begin(), fArray.end(), trace.Begin(), fArray.begin(), \
[](const auto& l, const auto& r) { return l _op_ r;} ); \
ERROR("Attempting to operate on two traces of different types"); \
return *this; \
}
if(dataRoot)
Definition: XXMLManager.h:1003
#define ERROR(message)
Macro for logging error messages.
Definition: ErrorLogger.h:165

Definition at line 277 of file Trace.h.

#define LEFT_OUTER_ARITHMETIC_OPERATOR (   _op_)
Value:
template <typename _T1_, typename _T2_> \
utl::Trace<_T2_> \
operator _op_(const utl::Trace<_T1_>& trace, const _T2_ value) \
{ \
utl::Trace<_T2_> result(trace.GetSize(), trace.GetBinning()); \
transform(trace.Begin(), trace.End(), result.Begin(), \
[&value](const auto& elem) { return elem _op_ value; }); \
result.SetStart(trace.GetStart()); \
result.SetStop(trace.GetStop()); \
result.SetScale(trace.GetScale()); \
return result; \
}
const Data result[]
Template class for a FADC data or calibrated data container. Use the typedefs (TraceD, TraceI, etc.) defined in Trace-fwd.h.
Definition: Trace-fwd.h:19

Definition at line 318 of file Trace.h.

#define OUTER_AUGMENTED_ARITHMETIC_OPERATOR (   _op_)
Value:
template<typename T> \
Trace<T>& \
Trace<T>::operator _op_##=(const T value) \
{ \
transform(fArray.begin(), fArray.end(), fArray.begin(), \
[&value](const auto& elem) { return elem _op_ value; }); \
return *this; \
}

Definition at line 298 of file Trace.h.

#define RIGHT_OUTER_ARITHMETIC_OPERATOR (   _op_)
Value:
template <typename _T1_, typename _T2_> \
utl::Trace<_T2_> \
operator _op_(const _T2_ value, const utl::Trace<_T1_>& trace) \
{ \
utl::Trace<_T2_> result(trace.GetSize(), trace.GetBinning()); \
transform(trace.Begin(), trace.End(), result.Begin(), \
[&value](const auto& elem) { return value _op_ elem; }); \
result.SetStart(trace.GetStart()); \
result.SetStop(trace.GetStop()); \
result.SetScale(trace.GetScale()); \
return result; \
}
const Data result[]
Template class for a FADC data or calibrated data container. Use the typedefs (TraceD, TraceI, etc.) defined in Trace-fwd.h.
Definition: Trace-fwd.h:19

Definition at line 332 of file Trace.h.


, generated on Tue Sep 26 2023.