Belle II Software  release-05-01-25
ProfileInfo.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Martin Heck, Andreas Moll *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <TObject.h>
14 
15 namespace Belle2 {
24  class ProfileInfo : public TObject {
25  public:
26 
31  ProfileInfo(unsigned long virtualMemory = 0, unsigned long rssMemory = 0, double timeInSec = 0)
32  : m_virtualMemory(virtualMemory), m_rssMemory(rssMemory), m_timeInSec(timeInSec) {}
33 
36  void set(double timeOffset = 0);
37 
42  unsigned long getVirtualMemory() const
43  {
44  return m_virtualMemory;
45  }
46 
51  unsigned long getRssMemory() const
52  {
53  return m_rssMemory;
54  }
55 
60  double getTimeInSec() const
61  {
62  return m_timeInSec;
63  }
64 
65  private:
66 
69  unsigned long m_virtualMemory;
70 
73  unsigned long m_rssMemory;
74 
77  double m_timeInSec;
78 
79  ClassDef(ProfileInfo, 2);
81  }; //class
83 } // namespace Belle2
Belle2::ProfileInfo::getRssMemory
unsigned long getRssMemory() const
Rss Memory size getter.
Definition: ProfileInfo.h:59
Belle2::ProfileInfo
Store execution time and memory usage.
Definition: ProfileInfo.h:32
Belle2::ProfileInfo::m_timeInSec
double m_timeInSec
Time used by this process in seconds.
Definition: ProfileInfo.h:85
Belle2::ProfileInfo::ProfileInfo
ProfileInfo(unsigned long virtualMemory=0, unsigned long rssMemory=0, double timeInSec=0)
Constructor.
Definition: ProfileInfo.h:39
Belle2::ProfileInfo::m_rssMemory
unsigned long m_rssMemory
Resident Memory size in kB.
Definition: ProfileInfo.h:81
Belle2::ProfileInfo::ClassDef
ClassDef(ProfileInfo, 2)
Store execution time and memory usage.
Belle2::ProfileInfo::getTimeInSec
double getTimeInSec() const
Time getter.
Definition: ProfileInfo.h:68
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ProfileInfo::getVirtualMemory
unsigned long getVirtualMemory() const
Virtual Memory size getter.
Definition: ProfileInfo.h:50
Belle2::ProfileInfo::m_virtualMemory
unsigned long m_virtualMemory
Virtual Memory size in kB.
Definition: ProfileInfo.h:77
Belle2::ProfileInfo::set
void set(double timeOffset=0)
Obtain the current profile values.
Definition: ProfileInfo.cc:18