| The Gaudi Framework v29r0 (ff2e7097)

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

## Constructor & Destructor Documentation

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

Definition at line 816 of file pfm_gen_analysis.cpp.

816 { clear(); }
S_module::clear
void clear()
Definition: pfm_gen_analysis.cpp:817

## Member Function Documentation

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

Definition at line 847 of file pfm_gen_analysis.cpp.

848 {
849 samples[index] += value;
850 return;
851 }
S_module::samples
std::map< std::string, unsigned int > samples
Definition: pfm_gen_analysis.cpp:806

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

Definition at line 817 of file pfm_gen_analysis.cpp.

818 {
819 samples.clear();
820 total_num_samples = 0;
821 sp = 0;
822 module_name = "";
823 cmask = 0;
824 inv = 0;
825 sp = 0;
826 }
S_module::module_name
std::string module_name
Definition: pfm_gen_analysis.cpp:808
S_module::samples
std::map< std::string, unsigned int > samples
Definition: pfm_gen_analysis.cpp:806
S_module::cmask
unsigned int cmask
Definition: pfm_gen_analysis.cpp:811
boost::spirit
Definition: iter_pos.hpp:13
S_module::total_num_samples
unsigned int total_num_samples
Definition: pfm_gen_analysis.cpp:807
std::map::clear
T clear(T...args)
S_module::inv
unsigned int inv
Definition: pfm_gen_analysis.cpp:812

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

Definition at line 845 of file pfm_gen_analysis.cpp.

845 { return arch; }
S_module::arch
std::string arch
Definition: pfm_gen_analysis.cpp:809

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

Definition at line 844 of file pfm_gen_analysis.cpp.

844 { return cmask; }
S_module::cmask
unsigned int cmask
Definition: pfm_gen_analysis.cpp:811

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

Definition at line 846 of file pfm_gen_analysis.cpp.

846 { return event; }
S_module::event
std::string event
Definition: pfm_gen_analysis.cpp:810

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

Definition at line 843 of file pfm_gen_analysis.cpp.

843 { return inv; }
S_module::inv
unsigned int inv
Definition: pfm_gen_analysis.cpp:812

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

Definition at line 852 of file pfm_gen_analysis.cpp.

853 {
854 if ( samples.empty() ) return false;
855 unsigned int cur_max = 0;
856 std::map<std::string, unsigned int>::iterator max_pos;
857 for ( std::map<std::string, unsigned int>::iterator it = samples.begin(); it != samples.end(); ++it ) {
858 if ( it->second > cur_max ) {
859 cur_max = it->second;
860 max_pos = it;
861 }
862 }
863 strcpy( index, ( max_pos->first ).c_str() );
864 *value = max_pos->second;
865 samples.erase( max_pos );
866 return true;
867 }
S_module::samples
std::map< std::string, unsigned int > samples
Definition: pfm_gen_analysis.cpp:806
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 868 of file pfm_gen_analysis.cpp.

868 { return module_name; }
S_module::module_name
std::string module_name
Definition: pfm_gen_analysis.cpp:808

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

Definition at line 842 of file pfm_gen_analysis.cpp.

842 { return sp; }
S_module::sp
unsigned int sp
Definition: pfm_gen_analysis.cpp:813

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

Definition at line 869 of file pfm_gen_analysis.cpp.

869 { return total_num_samples; }
S_module::total_num_samples
unsigned int total_num_samples
Definition: pfm_gen_analysis.cpp:807

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

829 {
830 module_name = name;
831 arch = architecture;
832 event = event_name;
833 cmask = c_mask;
834 inv = inv_mask;
835 sp = smpl_period;
836 }
S_module::module_name
std::string module_name
Definition: pfm_gen_analysis.cpp:808
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:32
S_module::cmask
unsigned int cmask
Definition: pfm_gen_analysis.cpp:811
boost::spirit
Definition: iter_pos.hpp:13
S_module::arch
std::string arch
Definition: pfm_gen_analysis.cpp:809
S_module::inv
unsigned int inv
Definition: pfm_gen_analysis.cpp:812

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

Definition at line 837 of file pfm_gen_analysis.cpp.

838 {
839 total_num_samples = total;
840 return;
841 }
S_module::total_num_samples
unsigned int total_num_samples
Definition: pfm_gen_analysis.cpp:807

## Member Data Documentation

std::string S_module::arch
| private

Definition at line 809 of file pfm_gen_analysis.cpp.

unsigned int S_module::cmask
| private

Definition at line 811 of file pfm_gen_analysis.cpp.

std::string S_module::event
| private

Definition at line 810 of file pfm_gen_analysis.cpp.

unsigned int S_module::inv
| private

Definition at line 812 of file pfm_gen_analysis.cpp.

std::string S_module::module_name
| private

Definition at line 808 of file pfm_gen_analysis.cpp.

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

Definition at line 806 of file pfm_gen_analysis.cpp.

unsigned int S_module::sp
| private

Definition at line 813 of file pfm_gen_analysis.cpp.

unsigned int S_module::total_num_samples
| private

Definition at line 807 of file pfm_gen_analysis.cpp.

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

- GaudiProfiling/src/app/pfm_gen_analysis.cpp