#include <ShowerLibStatistics.h>
Definition at line 20 of file ShowerLibStatistics.h.
◆ ShowerLibStatistics()
ShowerLib::ShowerLibStatistics::ShowerLibStatistics |
( |
const std::map< int, std::string > & |
bincaptions, |
|
|
const std::map< int, int > & |
binsizes |
|
) |
| |
◆ recordShowerLibUse()
void ShowerLib::ShowerLibStatistics::recordShowerLibUse |
( |
int |
binkey | ) |
|
◆ statistics()
const std::string ShowerLib::ShowerLibStatistics::statistics |
( |
| ) |
|
Definition at line 33 of file ShowerLibStatistics.cxx.
35 std::stringstream
out;
36 out << std::fixed << std::setprecision(2);
38 out <<
"Bin Statistics: " << std::endl;
43 totnum += (*it).second;
44 int curcalls =
m_calls.at((*it).first);
45 int curlen = (*it).second;
49 use = 100 * curcalls/curlen;
51 if (maxuse < use) maxuse = use;
52 if (minuse == -1) minuse = use;
53 else if (minuse > use) minuse = use;
55 out <<
name <<
" size " << std::setw(7) << curlen <<
" / calls " << std::setw(9) << curcalls <<
" ("<< std::setw(6) << use <<
"%)" << std::endl;
62 out <<
"Total: size " << std::setw(6) << totnum <<
" / calls " << std::setw(9) <<
m_counter <<
" (min " << minuse <<
"% av " << (100 *
m_counter/totnum) <<
"% max " << maxuse <<
"%)" << std::endl;
◆ m_binsizes
std::map<int,int> ShowerLib::ShowerLibStatistics::m_binsizes |
|
private |
◆ m_binstrings
std::map<int,std::string> ShowerLib::ShowerLibStatistics::m_binstrings |
|
private |
◆ m_calls
std::map<int,int> ShowerLib::ShowerLibStatistics::m_calls |
|
private |
◆ m_counter
int ShowerLib::ShowerLibStatistics::m_counter |
|
private |
The documentation for this class was generated from the following files: