Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Fun4AllMemoryTracker.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Fun4AllMemoryTracker.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
#ifndef FUN4ALL_FUN4ALLMEMORYTRACKER_H
4
#define FUN4ALL_FUN4ALLMEMORYTRACKER_H
5
6
#include "
Fun4AllBase.h
"
7
8
#include <map>
9
#include <string>
10
#include <vector>
11
12
class
Fun4AllMemoryTracker
:
public
Fun4AllBase
13
{
14
public
:
15
static
Fun4AllMemoryTracker
*
instance
()
16
{
17
if
(
mInstance
)
return
mInstance
;
18
mInstance
=
new
Fun4AllMemoryTracker
();
19
return
mInstance
;
20
}
21
~Fun4AllMemoryTracker
()
override
;
22
void
Snapshot
(
const
std::string
&trackername,
const
std::string
&
group
=
""
);
23
void
Start
(
const
std::string
&trackername,
const
std::string
&
group
=
""
);
24
void
Stop
(
const
std::string
&trackername,
const
std::string
&
group
=
""
);
25
26
int
GetRSSMemory
()
const
;
27
void
PrintMemoryTracker
(
const
std::string
&
name
=
""
)
const
;
28
std::vector<int>
GetMemoryVector
(
const
std::string
&
name
)
const
;
29
30
private
:
31
Fun4AllMemoryTracker
();
32
std::string
CreateFullTrackerName
(
const
std::string
&trackername,
const
std::string
&
group
=
""
);
33
static
Fun4AllMemoryTracker
*
mInstance
;
34
std::map<std::string, std::vector<int>>
mMemoryTrackerMap
;
35
std::map<std::string, int>
mStartMem
;
36
};
37
38
#endif
coresoftware
blob
master
offline
framework
fun4all
Fun4AllMemoryTracker.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:04
using
1.8.2 with
sPHENIX GitHub integration