| The Gaudi Framework v27r1

- 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 723 of file pfm_gen_analysis.cpp.

## Constructor & Destructor Documentation

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

Definition at line 736 of file pfm_gen_analysis.cpp.

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

## Member Function Documentation

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

Definition at line 784 of file pfm_gen_analysis.cpp.

785 {
786 samples[index] += value;
787 return;
788 }
S_module::samples
std::map< std::string, unsigned int > samples
Definition: pfm_gen_analysis.cpp:726
dump_component_properties.value
list value
Definition: dump_component_properties.py:12

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

Definition at line 740 of file pfm_gen_analysis.cpp.

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

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

Definition at line 776 of file pfm_gen_analysis.cpp.

777 {
778 return arch;
779 }
S_module::arch
std::string arch
Definition: pfm_gen_analysis.cpp:729

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

Definition at line 772 of file pfm_gen_analysis.cpp.

773 {
774 return cmask;
775 }
S_module::cmask
unsigned int cmask
Definition: pfm_gen_analysis.cpp:731

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

Definition at line 780 of file pfm_gen_analysis.cpp.

781 {
782 return event;
783 }
S_module::event
std::string event
Definition: pfm_gen_analysis.cpp:730

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

Definition at line 768 of file pfm_gen_analysis.cpp.

769 {
770 return inv;
771 }
S_module::inv
unsigned int inv
Definition: pfm_gen_analysis.cpp:732

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

Definition at line 789 of file pfm_gen_analysis.cpp.

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

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

Definition at line 807 of file pfm_gen_analysis.cpp.

808 {
809 return module_name;
810 }
S_module::module_name
std::string module_name
Definition: pfm_gen_analysis.cpp:728

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

Definition at line 764 of file pfm_gen_analysis.cpp.

765 {
766 return sp;
767 }
S_module::sp
unsigned int sp
Definition: pfm_gen_analysis.cpp:733

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

Definition at line 811 of file pfm_gen_analysis.cpp.

812 {
813 return total_num_samples;
814 }
S_module::total_num_samples
unsigned int total_num_samples
Definition: pfm_gen_analysis.cpp:727

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 750 of file pfm_gen_analysis.cpp.

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

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

Definition at line 759 of file pfm_gen_analysis.cpp.

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

## Member Data Documentation

std::string S_module::arch
| private

Definition at line 729 of file pfm_gen_analysis.cpp.

unsigned int S_module::cmask
| private

Definition at line 731 of file pfm_gen_analysis.cpp.

std::string S_module::event
| private

Definition at line 730 of file pfm_gen_analysis.cpp.

unsigned int S_module::inv
| private

Definition at line 732 of file pfm_gen_analysis.cpp.

std::string S_module::module_name
| private

Definition at line 728 of file pfm_gen_analysis.cpp.

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

Definition at line 726 of file pfm_gen_analysis.cpp.

unsigned int S_module::sp
| private

Definition at line 733 of file pfm_gen_analysis.cpp.

unsigned int S_module::total_num_samples
| private

Definition at line 727 of file pfm_gen_analysis.cpp.

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

- GaudiProfiling/src/app/pfm_gen_analysis.cpp