ATLAS Offline Software
Loading...
Searching...
No Matches
TBProfiler.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TBUTILS_TBPROFILER_H
6#define TBUTILS_TBPROFILER_H
7
8#include <vector>
9#include <cmath>
10
11template<typename T>
13{
14 public:
15
17 TBProfiler(size_t storeSize);
18 TBProfiler(size_t storeSize, const T& lowerLimit, const T& upperLimit);
19
20 virtual ~TBProfiler();
21
22
23 void addData(const T& theChannel, const T& theData);
24 void addData(const std::vector<T>& theData);
25 void addData(size_t index, const T& theData);
26
27 bool getAverages(std::vector<T>& theAverages) const;
28 bool getAverages(size_t theIndex,T& theAverage) const;
29 bool getStandardDevs(std::vector<T>& theVariances) const;
30 bool getStandardDevs(size_t theIndex, T& theDev) const;
31 bool getErrors(std::vector<T>& theErrors) const;
32 bool getErrors(size_t theIndex, T& theError) const;
33 bool getBinEntries(std::vector<size_t>& theEntries) const;
34 bool getBinEntries(size_t theIndex, size_t& theEntries ) const;
35
36 const std::vector<T>& getSums() const;
37 const std::vector<T>& getSumOfSquares() const;
38 const std::vector<size_t>& getEntries() const;
39
40 size_t getNumberOfChannels() const;
41 T getChannelWidth() const;
42 T getMinChannel() const;
43 T getMaxChannel() const;
44 size_t getIndex(const T& theChannel) const;
45
46 protected:
47
48 std::vector<T> m_sum;
49 std::vector<T> m_sumOfSquares;
50 std::vector<size_t> m_entries;
51
52 bool setupAction(size_t theSize);
53
54 private:
55
58 std::vector<T> m_binLimits;
60};
61
63
64#endif
void addData(const T &theChannel, const T &theData)
bool m_channelFill
Definition TBProfiler.h:56
size_t getNumberOfChannels() const
bool getErrors(size_t theIndex, T &theError) const
virtual ~TBProfiler()
bool setupAction(size_t theSize)
void addData(size_t index, const T &theData)
std::vector< T > m_sumOfSquares
Definition TBProfiler.h:49
bool getAverages(size_t theIndex, T &theAverage) const
bool getAverages(std::vector< T > &theAverages) const
std::vector< T > m_binLimits
Definition TBProfiler.h:58
bool getBinEntries(std::vector< size_t > &theEntries) const
TBProfiler(size_t storeSize)
bool getStandardDevs(std::vector< T > &theVariances) const
bool getErrors(std::vector< T > &theErrors) const
const std::vector< T > & getSums() const
bool getStandardDevs(size_t theIndex, T &theDev) const
const std::vector< T > & getSumOfSquares() const
std::vector< T > m_sum
Definition TBProfiler.h:48
TBProfiler(size_t storeSize, const T &lowerLimit, const T &upperLimit)
bool getBinEntries(size_t theIndex, size_t &theEntries) const
size_t getIndex(const T &theChannel) const
void addData(const std::vector< T > &theData)
bool m_skipFlag
Definition TBProfiler.h:57
const std::vector< size_t > & getEntries() const
T getMinChannel() const
T getMaxChannel() const
std::vector< size_t > m_entries
Definition TBProfiler.h:50
T getChannelWidth() const
Definition index.py:1