Project
Loading...
Searching...
No Matches
o2::tpc::CalArray< T > Class Template Reference

#include <CalArray.h>

Public Member Functions

 CalArray ()=default
 Default constructor.
 
 ~CalArray ()=default
 Default destructor.
 
 CalArray (const PadSubset padSubset, const int padSubsetNumber)
 
 CalArray (const std::string_view name, const int padSubsetNumber)
 
 CalArray (const std::string_view name, const PadSubset padSubset, const int padSubsetNumber)
 
PadSubset getPadSubset () const
 
int getPadSubsetNumber () const
 
void setValue (const size_t channel, const T &value)
 
const T getValue (const size_t channel) const
 
void setValue (const size_t row, const size_t pad, const T &value)
 
const T getValue (const size_t row, const size_t pad) const
 
void setName (const std::string &name)
 
const std::string & getName () const
 
const std::vector< T > & getData () const
 
std::vector< T > & getData ()
 
template<typename U = T>
const U getSum () const
 calculate the sum of all elements
 
const CalArray< T > & multiply (const T &val)
 Multiply all val to all channels.
 
const CalArrayoperator+= (const CalArray &other)
 Add other to this channel by channel.
 
const CalArrayoperator-= (const CalArray &other)
 Subtract other from this channel by channel.
 
const CalArrayoperator*= (const CalArray &other)
 Multiply other to this channel by channel.
 
const CalArrayoperator/= (const CalArray &other)
 Divide this by other channel by channel.
 
bool operator== (const CalArray &other) const
 check for equality
 
const CalArrayoperator+= (const T &val)
 Add value to all channels.
 
const CalArrayoperator-= (const T &val)
 Subtract value from all channels.
 
const CalArrayoperator*= (const T &val)
 Multiply value to all channels.
 
const CalArrayoperator/= (const T &val)
 Divide value on all channels.
 
const CalArrayoperator= (const T &val)
 assigment to all channls
 
template<typename U = T>
getMean () const
 

Detailed Description

template<class T>
class o2::tpc::CalArray< T >

Class to hold calibration data on a pad level

Calibration data per pad for a certain subset of pads: Full readout chamber, readout partition, or pad region

Definition at line 39 of file CalArray.h.

Constructor & Destructor Documentation

◆ CalArray() [1/4]

template<class T >
o2::tpc::CalArray< T >::CalArray ( )
default

Default constructor.

◆ ~CalArray()

template<class T >
o2::tpc::CalArray< T >::~CalArray ( )
default

Default destructor.

◆ CalArray() [2/4]

template<class T >
o2::tpc::CalArray< T >::CalArray ( const PadSubset  padSubset,
const int  padSubsetNumber 
)
inline

Constructor sets a default name depending on the pad subset type and number

Parameters
padSubsetpad subset type (e.g. PadSubset::ROC)
padSubsetNumbernumber of the pad subset (e.g. 0 for ROC 0)

Definition at line 51 of file CalArray.h.

◆ CalArray() [3/4]

template<class T >
o2::tpc::CalArray< T >::CalArray ( const std::string_view  name,
const int  padSubsetNumber 
)
inline

Constructor assumes PadSubset::ROC

Parameters
namename of the calibration array
padSubsetNumbernumber of the pad subset (e.g. 0 for ROC 0)

Definition at line 64 of file CalArray.h.

◆ CalArray() [4/4]

template<class T >
o2::tpc::CalArray< T >::CalArray ( const std::string_view  name,
const PadSubset  padSubset,
const int  padSubsetNumber 
)
inline

Constructor

Parameters
namename of the calibration array
padSubsetNumbernumber of the pad subset (e.g. 0 for ROC 0)

Definition at line 77 of file CalArray.h.

Member Function Documentation

◆ getData() [1/2]

template<class T >
std::vector< T > & o2::tpc::CalArray< T >::getData ( )
inline

Definition at line 105 of file CalArray.h.

◆ getData() [2/2]

template<class T >
const std::vector< T > & o2::tpc::CalArray< T >::getData ( ) const
inline

Definition at line 104 of file CalArray.h.

◆ getMean()

template<class T >
template<typename U = T>
U o2::tpc::CalArray< T >::getMean ( ) const
inline

Definition at line 152 of file CalArray.h.

◆ getName()

template<class T >
const std::string & o2::tpc::CalArray< T >::getName ( ) const
inline

Definition at line 102 of file CalArray.h.

◆ getPadSubset()

template<class T >
PadSubset o2::tpc::CalArray< T >::getPadSubset ( ) const
inline

Return the pad subset type

Returns
pad subset type

Definition at line 89 of file CalArray.h.

◆ getPadSubsetNumber()

template<class T >
int o2::tpc::CalArray< T >::getPadSubsetNumber ( ) const
inline

Return the pad subset number (e.g. ROC number)

Returns
pad subset number (e.g. ROC number)

Definition at line 93 of file CalArray.h.

◆ getSum()

template<class T >
template<typename U = T>
const U o2::tpc::CalArray< T >::getSum ( ) const
inline

calculate the sum of all elements

Definition at line 109 of file CalArray.h.

◆ getValue() [1/2]

template<class T >
const T o2::tpc::CalArray< T >::getValue ( const size_t  channel) const
inline

Definition at line 96 of file CalArray.h.

◆ getValue() [2/2]

template<class T >
const T o2::tpc::CalArray< T >::getValue ( const size_t  row,
const size_t  pad 
) const
inline
Todo:
might need check for row, pad or position limits

Definition at line 218 of file CalArray.h.

◆ multiply()

template<class T >
const CalArray< T > & o2::tpc::CalArray< T >::multiply ( const T &  val)
inline

Multiply all val to all channels.

Definition at line 115 of file CalArray.h.

◆ operator*=() [1/2]

template<class T >
const CalArray< T > & o2::tpc::CalArray< T >::operator*= ( const CalArray< T > &  other)
inline

Multiply other to this channel by channel.

Definition at line 260 of file CalArray.h.

◆ operator*=() [2/2]

template<class T >
const CalArray< T > & o2::tpc::CalArray< T >::operator*= ( const T &  val)
inline

Multiply value to all channels.

Definition at line 329 of file CalArray.h.

◆ operator+=() [1/2]

template<class T >
const CalArray< T > & o2::tpc::CalArray< T >::operator+= ( const CalArray< T > &  other)
inline

Add other to this channel by channel.

Definition at line 228 of file CalArray.h.

◆ operator+=() [2/2]

template<class T >
const CalArray< T > & o2::tpc::CalArray< T >::operator+= ( const T &  val)
inline

Add value to all channels.

Definition at line 309 of file CalArray.h.

◆ operator-=() [1/2]

template<class T >
const CalArray< T > & o2::tpc::CalArray< T >::operator-= ( const CalArray< T > &  other)
inline

Subtract other from this channel by channel.

Definition at line 246 of file CalArray.h.

◆ operator-=() [2/2]

template<class T >
const CalArray< T > & o2::tpc::CalArray< T >::operator-= ( const T &  val)
inline

Subtract value from all channels.

Definition at line 319 of file CalArray.h.

◆ operator/=() [1/2]

template<class T >
const CalArray< T > & o2::tpc::CalArray< T >::operator/= ( const CalArray< T > &  other)
inline

Divide this by other channel by channel.

Definition at line 278 of file CalArray.h.

◆ operator/=() [2/2]

template<class T >
const CalArray< T > & o2::tpc::CalArray< T >::operator/= ( const T &  val)
inline

Divide value on all channels.

Definition at line 339 of file CalArray.h.

◆ operator=()

template<class T >
const CalArray & o2::tpc::CalArray< T >::operator= ( const T &  val)
inline

assigment to all channls

Definition at line 145 of file CalArray.h.

◆ operator==()

template<class T >
bool o2::tpc::CalArray< T >::operator== ( const CalArray< T > &  other) const
inline

check for equality

Definition at line 297 of file CalArray.h.

◆ setName()

template<class T >
void o2::tpc::CalArray< T >::setName ( const std::string &  name)
inline

Definition at line 101 of file CalArray.h.

◆ setValue() [1/2]

template<class T >
void o2::tpc::CalArray< T >::setValue ( const size_t  channel,
const T &  value 
)
inline

Definition at line 95 of file CalArray.h.

◆ setValue() [2/2]

template<class T >
void o2::tpc::CalArray< T >::setValue ( const size_t  row,
const size_t  pad,
const T &  value 
)
inline
Todo:
might need check for row, pad or position limits

Definition at line 208 of file CalArray.h.


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