The Gaudi Framework  v30r3 (a5ef0a68)
S_module Class Reference
Collaboration diagram for S_module:

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(); }

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  }
std::map< std::string, unsigned int > samples
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  }
std::string module_name
std::map< std::string, unsigned int > samples
unsigned int cmask
unsigned int total_num_samples
T clear(T...args)
unsigned int inv
std::string S_module::get_arch ( )
inline

Definition at line 845 of file pfm_gen_analysis.cpp.

845 { return arch; }
std::string arch
unsigned int S_module::get_c_mask ( )
inline

Definition at line 844 of file pfm_gen_analysis.cpp.

844 { return cmask; }
unsigned int cmask
std::string S_module::get_event ( )
inline

Definition at line 846 of file pfm_gen_analysis.cpp.

846 { return event; }
std::string event
unsigned int S_module::get_inv_mask ( )
inline

Definition at line 843 of file pfm_gen_analysis.cpp.

843 { return inv; }
unsigned int inv
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;
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  }
std::map< std::string, unsigned int > samples
T empty(T...args)
T end(T...args)
STL class.
T erase(T...args)
T strcpy(T...args)
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; }
std::string module_name
unsigned int S_module::get_smpl_period ( )
inline

Definition at line 842 of file pfm_gen_analysis.cpp.

842 { return sp; }
unsigned int sp
unsigned int S_module::get_total_num_samples ( )
inline

Definition at line 869 of file pfm_gen_analysis.cpp.

869 { return total_num_samples; }
unsigned int total_num_samples
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  }
std::string module_name
unsigned int cmask
std::string arch
unsigned int inv
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  }
unsigned int total_num_samples

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: