| The Gaudi Framework v32r1 (f65d50dc)

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

## Constructor & Destructor Documentation

## ◆ S_module()

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

Definition at line 779 of file pfm_gen_analysis.cpp.

779 { clear(); }
S_module::clear
void clear()
Definition: pfm_gen_analysis.cpp:780

## Member Function Documentation

## ◆ add_sample()

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

Definition at line 807 of file pfm_gen_analysis.cpp.

807 {
808 samples[index] += value;
809 return;
810 }
S_module::samples
std::map< std::string, unsigned int > samples
Definition: pfm_gen_analysis.cpp:769

## ◆ clear()

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

Definition at line 780 of file pfm_gen_analysis.cpp.

780 {
781 samples.clear();
782 total_num_samples = 0;
783 sp = 0;
784 module_name = "";
785 cmask = 0;
786 inv = 0;
787 sp = 0;
788 }
S_module::module_name
std::string module_name
Definition: pfm_gen_analysis.cpp:771
S_module::samples
std::map< std::string, unsigned int > samples
Definition: pfm_gen_analysis.cpp:769
S_module::cmask
unsigned int cmask
Definition: pfm_gen_analysis.cpp:774
boost::spirit
Definition: iter_pos.hpp:14
S_module::total_num_samples
unsigned int total_num_samples
Definition: pfm_gen_analysis.cpp:770
std::map::clear
T clear(T... args)
S_module::inv
unsigned int inv
Definition: pfm_gen_analysis.cpp:775

## ◆ get_arch()

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

Definition at line 805 of file pfm_gen_analysis.cpp.

805 { return arch; }
S_module::arch
std::string arch
Definition: pfm_gen_analysis.cpp:772

## ◆ get_c_mask()

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

Definition at line 804 of file pfm_gen_analysis.cpp.

804 { return cmask; }
S_module::cmask
unsigned int cmask
Definition: pfm_gen_analysis.cpp:774

## ◆ get_event()

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

Definition at line 806 of file pfm_gen_analysis.cpp.

806 { return event; }
S_module::event
std::string event
Definition: pfm_gen_analysis.cpp:773

## ◆ get_inv_mask()

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

Definition at line 803 of file pfm_gen_analysis.cpp.

803 { return inv; }
S_module::inv
unsigned int inv
Definition: pfm_gen_analysis.cpp:775

## ◆ get_max()

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

Definition at line 811 of file pfm_gen_analysis.cpp.

811 {
812 auto max_pos = std::max_element( samples.begin(), samples.end(),
813 []( const auto& lhs, const auto& rhs ) { return lhs.second < rhs.second; } );
814 if ( max_pos == samples.end() ) return false;
815 strcpy( index, ( max_pos->first ).c_str() );
816 value = max_pos->second;
817 samples.erase( max_pos );
818 return true;
819 }
S_module::samples
std::map< std::string, unsigned int > samples
Definition: pfm_gen_analysis.cpp:769
std::max_element
T max_element(T... args)
std::map::end
T end(T... args)
std::map::erase
T erase(T... args)
std::strcpy
T strcpy(T... args)
std::map::begin
T begin(T... args)

## ◆ get_module_name()

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

Definition at line 820 of file pfm_gen_analysis.cpp.

820 { return module_name; }
S_module::module_name
std::string module_name
Definition: pfm_gen_analysis.cpp:771

## ◆ get_smpl_period()

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

Definition at line 802 of file pfm_gen_analysis.cpp.

802 { return sp; }
S_module::sp
unsigned int sp
Definition: pfm_gen_analysis.cpp:776

## ◆ get_total_num_samples()

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

Definition at line 821 of file pfm_gen_analysis.cpp.

821 { return total_num_samples; }
S_module::total_num_samples
unsigned int total_num_samples
Definition: pfm_gen_analysis.cpp:770

## ◆ init()

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

790 {
791 module_name = name;
792 arch = architecture;
793 event = event_name;
794 cmask = c_mask;
795 inv = inv_mask;
796 sp = smpl_period;
797 }
S_module::module_name
std::string module_name
Definition: pfm_gen_analysis.cpp:771
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
S_module::cmask
unsigned int cmask
Definition: pfm_gen_analysis.cpp:774
boost::spirit
Definition: iter_pos.hpp:14
S_module::arch
std::string arch
Definition: pfm_gen_analysis.cpp:772
S_module::inv
unsigned int inv
Definition: pfm_gen_analysis.cpp:775

## ◆ set_total()

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

Definition at line 798 of file pfm_gen_analysis.cpp.

798 {
799 total_num_samples = total;
800 return;
801 }
S_module::total_num_samples
unsigned int total_num_samples
Definition: pfm_gen_analysis.cpp:770

## Member Data Documentation

## ◆ arch

std::string S_module::arch
| private

Definition at line 772 of file pfm_gen_analysis.cpp.

## ◆ cmask

unsigned int S_module::cmask
| private

Definition at line 774 of file pfm_gen_analysis.cpp.

## ◆ event

std::string S_module::event
| private

Definition at line 773 of file pfm_gen_analysis.cpp.

## ◆ inv

unsigned int S_module::inv
| private

Definition at line 775 of file pfm_gen_analysis.cpp.

## ◆ module_name

std::string S_module::module_name
| private

Definition at line 771 of file pfm_gen_analysis.cpp.

## ◆ samples

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

Definition at line 769 of file pfm_gen_analysis.cpp.

## ◆ sp

unsigned int S_module::sp
| private

Definition at line 776 of file pfm_gen_analysis.cpp.

## ◆ total_num_samples

unsigned int S_module::total_num_samples
| private

Definition at line 770 of file pfm_gen_analysis.cpp.

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

- GaudiProfiling/src/app/pfm_gen_analysis.cpp