ATLAS Offline Software
|
Helper class to accumulate calibration triggers. More...
#include <LArCalibTriggerAccumulator.h>
Public Types | |
enum | ERRTYPE { NoError =0, WrongNSamples, NumericOverflow } |
Public Member Functions | |
LArCalibTriggerAccumulator () | |
LArCalibTriggerAccumulator (const std::vector< uint64_t > &sampleSum, const std::vector< uint64_t > &sample2Sum, uint32_t m_nTrigger) | |
uint32_t | nTriggers () const |
return the number of triggers More... | |
size_t | nsamples () const |
return number of samples More... | |
const std::vector< uint64_t > & | sampleSum () const |
return a reference to a stl vector containing the sample-sums More... | |
const std::vector< uint64_t > & | sample2Sum () const |
return a reference to a stl vector containing the sum of the squares of the sample More... | |
ERRTYPE | add (const std::vector< short > &digits) |
accumulated individual set of digits. More... | |
template<class INTTYPE > | |
ERRTYPE | add (const std::vector< INTTYPE > &sampleSum, const std::vector< INTTYPE > &sample2Sum, const uint32_t nTrigger) |
accumulated pre-accumulated digits. More... | |
std::vector< float > | mean () const |
Calculates and returns the Mean value of each ADC sample. More... | |
std::vector< float > | RMS () const |
Calculates and returns the RMS value of each ADC sample. More... | |
double | mean (const size_t i) const |
Calculates and returns the Mean value for one ADC sample. More... | |
double | RMS (const size_t i) const |
Calculates and returns the RMS value for one ADC sample. More... | |
Private Attributes | |
std::vector< uint64_t > | m_sampleSum |
sum of samples More... | |
std::vector< uint64_t > | m_sample2Sum |
sum of squares of samples More... | |
uint32_t | m_nTrigger |
number of triggers More... | |
Helper class to accumulate calibration triggers.
Contains sum of ADC counts and the sum of the squares of ADC counts So far only used by the Ramp builder. Could be used for Delay runs
Definition at line 30 of file LArCalibTriggerAccumulator.h.
Enumerator | |
---|---|
NoError | |
WrongNSamples | |
NumericOverflow |
Definition at line 46 of file LArCalibTriggerAccumulator.h.
LArCalibTriggerAccumulator::LArCalibTriggerAccumulator | ( | ) |
Definition at line 8 of file LArCalibTriggerAccumulator.cxx.
LArCalibTriggerAccumulator::LArCalibTriggerAccumulator | ( | const std::vector< uint64_t > & | sampleSum, |
const std::vector< uint64_t > & | sample2Sum, | ||
uint32_t | m_nTrigger | ||
) |
Definition at line 10 of file LArCalibTriggerAccumulator.cxx.
LArCalibTriggerAccumulator::ERRTYPE LArCalibTriggerAccumulator::add | ( | const std::vector< INTTYPE > & | sampleSum, |
const std::vector< INTTYPE > & | sample2Sum, | ||
const uint32_t | nTrigger | ||
) |
accumulated pre-accumulated digits.
Templated to allow 32 and 64 bit ints as input. Can return an error
Definition at line 97 of file LArCalibTriggerAccumulator.h.
LArCalibTriggerAccumulator::ERRTYPE LArCalibTriggerAccumulator::add | ( | const std::vector< short > & | digits | ) |
accumulated individual set of digits.
Can return an error
Definition at line 17 of file LArCalibTriggerAccumulator.cxx.
std::vector< float > LArCalibTriggerAccumulator::mean | ( | ) | const |
Calculates and returns the Mean value of each ADC sample.
Definition at line 68 of file LArCalibTriggerAccumulator.cxx.
double LArCalibTriggerAccumulator::mean | ( | const size_t | i | ) | const |
Calculates and returns the Mean value for one ADC sample.
Definition at line 49 of file LArCalibTriggerAccumulator.cxx.
|
inline |
|
inline |
std::vector< float > LArCalibTriggerAccumulator::RMS | ( | ) | const |
Calculates and returns the RMS value of each ADC sample.
Definition at line 82 of file LArCalibTriggerAccumulator.cxx.
double LArCalibTriggerAccumulator::RMS | ( | const size_t | i | ) | const |
Calculates and returns the RMS value for one ADC sample.
Definition at line 57 of file LArCalibTriggerAccumulator.cxx.
|
inline |
return a reference to a stl vector containing the sum of the squares of the sample
Definition at line 69 of file LArCalibTriggerAccumulator.h.
|
inline |
return a reference to a stl vector containing the sample-sums
Definition at line 66 of file LArCalibTriggerAccumulator.h.
|
private |
number of triggers
Definition at line 41 of file LArCalibTriggerAccumulator.h.
|
private |
sum of squares of samples
Definition at line 38 of file LArCalibTriggerAccumulator.h.
|
private |
sum of samples
Definition at line 35 of file LArCalibTriggerAccumulator.h.