HighLAND
|
#include <MemoryUsage.hxx>
Classes | |
struct | CmpMemResident |
struct | CmpMemVirtual |
Public Member Functions | |
MemoryUsage () | |
Construct the memory usage class with logging disabled. | |
void | Enable (bool enable=true) |
void | LogMemory () |
void | Write () |
Write histograms of the memory usage to the output file. | |
This class can be used to generate histograms of the memory used by a highland analysis. Logging can be enabled by specifying the "-m" option on the command line. AnalysisBase and SimpleLoopBase will then instantiate, log and write out the memory usage to the output file.
Definition at line 11 of file MemoryUsage.hxx.
void MemoryUsage::Enable | ( | bool | enable = true | ) |
Called to enable the memory logging. Enable the logging of memory usage. If this is not called, LogMemory() and Write() have no effects. This can be called with a bool argument to set the enabled flag. If the argument is false, then memory logging is disabled.
Definition at line 14 of file MemoryUsage.cxx.
void MemoryUsage::LogMemory | ( | ) |
Log the current memory usage. Record the current memory being used by the process. If Enable() has not been called, this function does nothing. In general, the memory usage should be logged once per event, but it can be called any number of times. Logging memory requires saving two float and two longs into a vector.
Definition at line 18 of file MemoryUsage.cxx.