| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Attributes | List of all members
S_module Class Reference
Collaboration diagram for S_module:
[legend]

## Public Member Functions
| S_module ()
void | clear ()
void | init (const char *name, const char *architecture, const char *event_name, unsigned int c_mask, unsigned int inv_mask, unsigned int smpl_period)
void | set_total (unsigned int total)
unsigned int | get_smpl_period ()
unsigned int | get_inv_mask ()
unsigned int | get_c_mask ()
std::string | get_arch ()
std::string | get_event ()
void | add_sample (const char *index, unsigned int value)
bool | get_max (char *index, unsigned int *value)
std::string | get_module_name ()
unsigned int | get_total_num_samples ()

## Private Attributes
std::map< std::string, unsigned int > | samples
unsigned int | total_num_samples
std::string | module_name
std::string | arch
std::string | event
unsigned int | cmask
unsigned int | inv
unsigned int | sp

## Detailed Description

Definition at line 724 of file pfm_gen_analysis.cpp.

## Constructor & Destructor Documentation

S_module::S_module | ( |  | ) |
| inline

Definition at line 737 of file pfm_gen_analysis.cpp.

738 {
739 clear();
740 }
S_module::clear
void clear()
Definition: pfm_gen_analysis.cpp:741

## Member Function Documentation

void S_module::add_sample | ( | const char * | index,
|  | unsigned int | value
| ) |  |
| inline

Definition at line 785 of file pfm_gen_analysis.cpp.

786 {
787 samples[index] += value;
788 return;
789 }
S_module::samples
std::map< std::string, unsigned int > samples
Definition: pfm_gen_analysis.cpp:727

void S_module::clear | ( |  | ) |
| inline

Definition at line 741 of file pfm_gen_analysis.cpp.

742 {
743 samples.clear();
744 total_num_samples = 0;
745 sp = 0;
746 module_name = "";
747 cmask = 0;
748 inv = 0;
749 sp = 0;
750 }
S_module::module_name
std::string module_name
Definition: pfm_gen_analysis.cpp:729
S_module::samples
std::map< std::string, unsigned int > samples
Definition: pfm_gen_analysis.cpp:727
S_module::cmask
unsigned int cmask
Definition: pfm_gen_analysis.cpp:732
boost::spirit
Definition: iter_pos.hpp:13
S_module::total_num_samples
unsigned int total_num_samples
Definition: pfm_gen_analysis.cpp:728
std::map::clear
T clear(T...args)
S_module::inv
unsigned int inv
Definition: pfm_gen_analysis.cpp:733

std::string S_module::get_arch | ( |  | ) |
| inline

Definition at line 777 of file pfm_gen_analysis.cpp.

778 {
779 return arch;
780 }
S_module::arch
std::string arch
Definition: pfm_gen_analysis.cpp:730

unsigned int S_module::get_c_mask | ( |  | ) |
| inline

Definition at line 773 of file pfm_gen_analysis.cpp.

774 {
775 return cmask;
776 }
S_module::cmask
unsigned int cmask
Definition: pfm_gen_analysis.cpp:732

std::string S_module::get_event | ( |  | ) |
| inline

Definition at line 781 of file pfm_gen_analysis.cpp.

782 {
783 return event;
784 }
S_module::event
std::string event
Definition: pfm_gen_analysis.cpp:731

unsigned int S_module::get_inv_mask | ( |  | ) |
| inline

Definition at line 769 of file pfm_gen_analysis.cpp.

770 {
771 return inv;
772 }
S_module::inv
unsigned int inv
Definition: pfm_gen_analysis.cpp:733

bool S_module::get_max | ( | char * | index,
|  | unsigned int * | value
| ) |  |
| inline

Definition at line 790 of file pfm_gen_analysis.cpp.

791 {
792 if(samples.empty()) return false;
793 unsigned int cur_max = 0;
794 std::map<std::string, unsigned int>::iterator max_pos;
795 for(std::map<std::string, unsigned int>::iterator it = samples.begin(); it != samples.end(); ++it)
796 {
797 if(it->second > cur_max)
798 {
799 cur_max = it->second;
800 max_pos = it;
801 }
802 }
803 strcpy(index, (max_pos->first).c_str());
804 *value = max_pos->second;
805 samples.erase(max_pos);
806 return true;
807 }
S_module::samples
std::map< std::string, unsigned int > samples
Definition: pfm_gen_analysis.cpp:727
std::map::empty
T empty(T...args)
std::map::end
T end(T...args)
std::map
STL class.
std::map::erase
T erase(T...args)
std::strcpy
T strcpy(T...args)
std::map::begin
T begin(T...args)

std::string S_module::get_module_name | ( |  | ) |
| inline

Definition at line 808 of file pfm_gen_analysis.cpp.

809 {
810 return module_name;
811 }
S_module::module_name
std::string module_name
Definition: pfm_gen_analysis.cpp:729

unsigned int S_module::get_smpl_period | ( |  | ) |
| inline

Definition at line 765 of file pfm_gen_analysis.cpp.

766 {
767 return sp;
768 }
S_module::sp
unsigned int sp
Definition: pfm_gen_analysis.cpp:734

unsigned int S_module::get_total_num_samples | ( |  | ) |
| inline

Definition at line 812 of file pfm_gen_analysis.cpp.

813 {
814 return total_num_samples;
815 }
S_module::total_num_samples
unsigned int total_num_samples
Definition: pfm_gen_analysis.cpp:728

void S_module::init | ( | const char * | name,
|  | const char * | architecture,
|  | const char * | event_name,
|  | unsigned int | c_mask,
|  | unsigned int | inv_mask,
|  | unsigned int | smpl_period
| ) |  |
| inline

Definition at line 751 of file pfm_gen_analysis.cpp.

752 {
753 module_name = name;
754 arch = architecture;
755 event = event_name;
756 cmask = c_mask;
757 inv = inv_mask;
758 sp = smpl_period;
759 }
S_module::module_name
std::string module_name
Definition: pfm_gen_analysis.cpp:729
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
S_module::cmask
unsigned int cmask
Definition: pfm_gen_analysis.cpp:732
boost::spirit
Definition: iter_pos.hpp:13
S_module::arch
std::string arch
Definition: pfm_gen_analysis.cpp:730
S_module::inv
unsigned int inv
Definition: pfm_gen_analysis.cpp:733

void S_module::set_total | ( | unsigned int | total | ) |
| inline

Definition at line 760 of file pfm_gen_analysis.cpp.

761 {
762 total_num_samples = total;
763 return;
764 }
S_module::total_num_samples
unsigned int total_num_samples
Definition: pfm_gen_analysis.cpp:728

## Member Data Documentation

std::string S_module::arch
| private

Definition at line 730 of file pfm_gen_analysis.cpp.

unsigned int S_module::cmask
| private

Definition at line 732 of file pfm_gen_analysis.cpp.

std::string S_module::event
| private

Definition at line 731 of file pfm_gen_analysis.cpp.

unsigned int S_module::inv
| private

Definition at line 733 of file pfm_gen_analysis.cpp.

std::string S_module::module_name
| private

Definition at line 729 of file pfm_gen_analysis.cpp.

std::map<std::string, unsigned int> S_module::samples
| private

Definition at line 727 of file pfm_gen_analysis.cpp.

unsigned int S_module::sp
| private

Definition at line 734 of file pfm_gen_analysis.cpp.

unsigned int S_module::total_num_samples
| private

Definition at line 728 of file pfm_gen_analysis.cpp.

The documentation for this class was generated from the following file:

- GaudiProfiling/src/app/pfm_gen_analysis.cpp