Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
EventFilter
Utilities
interface
CPUStat.h
Go to the documentation of this file.
1
#ifndef EVF_CPUSTAT
2
#define EVF_CPUSTAT
3
4
#include <vector>
5
#include <string>
6
#include <iostream>
7
8
namespace
evf{
9
10
class
CurlPoster;
11
12
class
CPUStat
{
13
public
:
14
CPUStat
(
unsigned
int
nstates, std::string iDieUrl);
15
~CPUStat
();
16
void
addEntry
(
int
sta)
17
{
18
mstat_
[sta]++;
19
entries_
++;
20
}
21
void
reset
()
22
{
23
for
(
int
i
= 0;
i
<
nstates_
;
i
++)
24
mstat_
[
i
]=0;
25
entries_
= 0;
26
}
27
void
printStat
(){
28
std::cout
<<
"dump of microstates avg.:"
<<
entries_
<<
" samples"
<< std::endl;
29
for
(
int
i
= 0;
i
<
nstates_
;
i
++)
30
if
(
mstat_
[
i
]!=0)
std::cout
<<
i
<<
" "
<< float(
mstat_
[
i
])/float(
entries_
)
31
<< std::endl;
32
}
33
void
sendStat
(
unsigned
int
);
34
void
sendLegenda
(
const
std::vector<std::string> &);
35
private
:
36
std::string
iDieUrl_
;
37
CurlPoster
*
poster_
;
38
int
nstates_
;
39
int
entries_
;
40
int
*
mstat_
;
41
};
42
}
43
#endif
i
int i
Definition:
DBlmapReader.cc:9
evf::CPUStat
Definition:
CPUStat.h:12
evf::CPUStat::printStat
void printStat()
Definition:
CPUStat.h:27
evf::CPUStat::entries_
int entries_
Definition:
CPUStat.h:39
evf::CPUStat::~CPUStat
~CPUStat()
Definition:
CPUStat.cc:15
evf::CurlPoster
Definition:
CurlPoster.h:10
evf::CPUStat::poster_
CurlPoster * poster_
Definition:
CPUStat.h:37
evf::CPUStat::addEntry
void addEntry(int sta)
Definition:
CPUStat.h:16
evf::CPUStat::sendStat
void sendStat(unsigned int)
Definition:
CPUStat.cc:21
evf::CPUStat::reset
void reset()
Definition:
CPUStat.h:21
evf::CPUStat::CPUStat
CPUStat(unsigned int nstates, std::string iDieUrl)
Definition:
CPUStat.cc:6
evf::CPUStat::nstates_
int nstates_
Definition:
CPUStat.h:38
evf::CPUStat::sendLegenda
void sendLegenda(const std::vector< std::string > &)
Definition:
CPUStat.cc:26
evf::CPUStat::mstat_
int * mstat_
Definition:
CPUStat.h:40
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:41
evf::CPUStat::iDieUrl_
std::string iDieUrl_
Definition:
CPUStat.h:36
Generated for CMSSW Reference Manual by
1.8.5