w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
Rstats.ipp
Go to the documentation of this file.
1// $Id: Rstats.ipp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2011-02-06 359 1.0 Initial version
8// ---------------------------------------------------------------------------
9
14// all method definitions in namespace Retro
15namespace Retro {
16
17//------------------------------------------+-----------------------------------
19
20inline void Rstats::Set(size_t ind, double val)
21{
22 fValue.at(ind) = val;
23 return;
24}
25
26//------------------------------------------+-----------------------------------
28
29inline void Rstats::Inc(size_t ind, double val)
30{
31 fValue.at(ind) += val;
32 return;
33}
34
35//------------------------------------------+-----------------------------------
37
38inline size_t Rstats::Size() const
39{
40 return fValue.size();
41}
42
43//------------------------------------------+-----------------------------------
45
46inline double Rstats::Value(size_t ind) const
47{
48 return fValue.at(ind);
49}
50
51//------------------------------------------+-----------------------------------
53
54inline const std::string& Rstats::Name(size_t ind) const
55{
56 return fName.at(ind);
57}
58
59//------------------------------------------+-----------------------------------
61
62inline const std::string& Rstats::Text(size_t ind) const
63{
64 return fText.at(ind);
65}
66
67//------------------------------------------+-----------------------------------
69
70inline double Rstats::operator[](size_t ind) const
71{
72 return fValue.at(ind);
73}
74
75//------------------------------------------+-----------------------------------
81inline std::ostream& operator<<(std::ostream& os, const Rstats& obj)
82{
83 obj.Print(os);
84 return os;
85}
86
87} // end namespace Retro
FIXME_docs.
Definition: Rstats.hpp:28
std::vector< std::string > fText
counter text
Definition: Rstats.hpp:65
std::vector< std::string > fName
counter name
Definition: Rstats.hpp:64
size_t Size() const
FIXME_docs.
Definition: Rstats.ipp:38
void Inc(size_t ind, double val=1.)
FIXME_docs.
Definition: Rstats.ipp:29
void Print(std::ostream &os, const char *format=0, int width=0, int prec=0) const
FIXME_docs.
Definition: Rstats.cpp:157
void Set(size_t ind, double val)
FIXME_docs.
Definition: Rstats.ipp:20
std::vector< double > fValue
counter value
Definition: Rstats.hpp:63
double operator[](size_t ind) const
FIXME_docs.
Definition: Rstats.ipp:70
const std::string & Name(size_t ind) const
FIXME_docs.
Definition: Rstats.ipp:54
std::ostream & operator<<(std::ostream &os, const Rstats &obj)
ostream insertion operator.
Definition: Rstats.ipp:81
double Value(size_t ind) const
FIXME_docs.
Definition: Rstats.ipp:46
const std::string & Text(size_t ind) const
FIXME_docs.
Definition: Rstats.ipp:62
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47