EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4AllMemoryTracker Class Reference

#include <fun4all_coresoftware/blob/master/offline/framework/fun4all/Fun4AllMemoryTracker.h>

+ Inheritance diagram for Fun4AllMemoryTracker:
+ Collaboration diagram for Fun4AllMemoryTracker:

Public Member Functions

 ~Fun4AllMemoryTracker () override
 
void Snapshot (const std::string &trackername, const std::string &group="")
 
void Start (const std::string &trackername, const std::string &group="")
 
void Stop (const std::string &trackername, const std::string &group="")
 
int GetRSSMemory () const
 
void PrintMemoryTracker (const std::string &name="") const
 
std::vector< int > GetMemoryVector (const std::string &name) const
 
- Public Member Functions inherited from Fun4AllBase
virtual ~Fun4AllBase ()
 
virtual const std::string Name () const
 Returns the name of this module.
 
virtual void Name (const std::string &name)
 Sets the name of this module.
 
virtual void Print (const std::string &what="ALL") const
 
virtual void Verbosity (const int ival)
 Sets the verbosity of this module (0 by default=quiet).
 
virtual void Verbosity (enu_Verbosity ival)
 Sets the verbosity of this module (0 by default=quiet).
 
virtual int Verbosity () const
 Gets the verbosity of this module.
 

Static Public Member Functions

static Fun4AllMemoryTrackerinstance ()
 

Private Member Functions

 Fun4AllMemoryTracker ()
 
std::string CreateFullTrackerName (const std::string &trackername, const std::string &group="")
 

Private Attributes

std::map< std::string,
std::vector< int > > 
mMemoryTrackerMap
 
std::map< std::string, int > mStartMem
 

Static Private Attributes

static Fun4AllMemoryTrackermInstance = nullptr
 

Additional Inherited Members

- Public Types inherited from Fun4AllBase
enum  enu_Verbosity {
  VERBOSITY_QUIET = 0, VERBOSITY_SOME = 1, VERBOSITY_MORE = 2, VERBOSITY_EVEN_MORE = 3,
  VERBOSITY_A_LOT = 4, VERBOSITY_MAX = INT_MAX - 10
}
 
- Protected Member Functions inherited from Fun4AllBase
 Fun4AllBase (const std::string &name="NONAME")
 

Detailed Description

Definition at line 12 of file Fun4AllMemoryTracker.h.

View newest version in sPHENIX GitHub at line 12 of file Fun4AllMemoryTracker.h

Constructor & Destructor Documentation

Fun4AllMemoryTracker::~Fun4AllMemoryTracker ( )
override

Definition at line 24 of file Fun4AllMemoryTracker.cc.

View newest version in sPHENIX GitHub at line 24 of file Fun4AllMemoryTracker.cc

References mMemoryTrackerMap, and mStartMem.

Fun4AllMemoryTracker::Fun4AllMemoryTracker ( )
private

Definition at line 12 of file Fun4AllMemoryTracker.cc.

View newest version in sPHENIX GitHub at line 12 of file Fun4AllMemoryTracker.cc

Referenced by instance().

+ Here is the caller graph for this function:

Member Function Documentation

string Fun4AllMemoryTracker::CreateFullTrackerName ( const std::string &  trackername,
const std::string &  group = "" 
)
private

Definition at line 97 of file Fun4AllMemoryTracker.cc.

View newest version in sPHENIX GitHub at line 97 of file Fun4AllMemoryTracker.cc

References name.

Referenced by Snapshot(), Start(), and Stop().

+ Here is the caller graph for this function:

vector< int > Fun4AllMemoryTracker::GetMemoryVector ( const std::string &  name) const

Definition at line 149 of file Fun4AllMemoryTracker.cc.

View newest version in sPHENIX GitHub at line 149 of file Fun4AllMemoryTracker.cc

References mMemoryTrackerMap.

int Fun4AllMemoryTracker::GetRSSMemory ( ) const

Definition at line 17 of file Fun4AllMemoryTracker.cc.

View newest version in sPHENIX GitHub at line 17 of file Fun4AllMemoryTracker.cc

Referenced by Snapshot(), Start(), and Stop().

+ Here is the caller graph for this function:

static Fun4AllMemoryTracker* Fun4AllMemoryTracker::instance ( void  )
inlinestatic

Definition at line 15 of file Fun4AllMemoryTracker.h.

View newest version in sPHENIX GitHub at line 15 of file Fun4AllMemoryTracker.h

References Fun4AllMemoryTracker(), and mInstance.

+ Here is the call graph for this function:

void Fun4AllMemoryTracker::PrintMemoryTracker ( const std::string &  name = "") const

Definition at line 107 of file Fun4AllMemoryTracker.cc.

View newest version in sPHENIX GitHub at line 107 of file Fun4AllMemoryTracker.cc

References mMemoryTrackerMap.

Referenced by Fun4AllServer::PrintMemoryTracker().

+ Here is the caller graph for this function:

void Fun4AllMemoryTracker::Snapshot ( const std::string &  trackername,
const std::string &  group = "" 
)

Definition at line 30 of file Fun4AllMemoryTracker.cc.

View newest version in sPHENIX GitHub at line 30 of file Fun4AllMemoryTracker.cc

References CreateFullTrackerName(), GetRSSMemory(), mMemoryTrackerMap, name, and Fun4AllBase::Verbosity().

Referenced by Fun4AllServer::BeginRun(), and Fun4AllServer::process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Fun4AllMemoryTracker::Start ( const std::string &  trackername,
const std::string &  group = "" 
)

Definition at line 51 of file Fun4AllMemoryTracker.cc.

View newest version in sPHENIX GitHub at line 51 of file Fun4AllMemoryTracker.cc

References CreateFullTrackerName(), GetRSSMemory(), mStartMem, name, and Fun4AllBase::Verbosity().

Referenced by Fun4AllServer::BeginRun(), Fun4AllServer::process_event(), and Fun4AllServer::registerSubsystem().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Fun4AllMemoryTracker::Stop ( const std::string &  trackername,
const std::string &  group = "" 
)

Definition at line 70 of file Fun4AllMemoryTracker.cc.

View newest version in sPHENIX GitHub at line 70 of file Fun4AllMemoryTracker.cc

References CreateFullTrackerName(), GetRSSMemory(), mMemoryTrackerMap, mStartMem, name, and Fun4AllBase::Verbosity().

Referenced by Fun4AllServer::BeginRun(), Fun4AllServer::process_event(), and Fun4AllServer::registerSubsystem().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

Fun4AllMemoryTracker * Fun4AllMemoryTracker::mInstance = nullptr
staticprivate

Definition at line 33 of file Fun4AllMemoryTracker.h.

View newest version in sPHENIX GitHub at line 33 of file Fun4AllMemoryTracker.h

Referenced by instance().

std::map<std::string, std::vector<int> > Fun4AllMemoryTracker::mMemoryTrackerMap
private

Definition at line 34 of file Fun4AllMemoryTracker.h.

View newest version in sPHENIX GitHub at line 34 of file Fun4AllMemoryTracker.h

Referenced by GetMemoryVector(), PrintMemoryTracker(), Snapshot(), Stop(), and ~Fun4AllMemoryTracker().

std::map<std::string, int> Fun4AllMemoryTracker::mStartMem
private

Definition at line 35 of file Fun4AllMemoryTracker.h.

View newest version in sPHENIX GitHub at line 35 of file Fun4AllMemoryTracker.h

Referenced by Start(), Stop(), and ~Fun4AllMemoryTracker().


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