1 #ifndef MemoryMonitor_h
2 #define MemoryMonitor_h
4 #include "marlin/Processor.h"
11 using namespace lcio ;
12 using namespace marlin ;
39 virtual void processRunHeader( LCRunHeader* run ) ;
42 virtual void processEvent( LCEvent * evt ) ;
45 virtual void check( LCEvent * evt ) ;
59 int parseLine(
char* line){
61 while (*line < '0' || *line >
'9') line++;
69 FILE* file = fopen(
"/proc/self/status",
"r");
74 while (fgets(line, 128, file) != NULL){
75 if (strncmp(line,
"VmRSS:", 6) == 0){
76 result = parseLine(line);
virtual Processor * newProcessor()
Return a new instance of the processor.
Definition: MemoryMonitor.h:31
MemoryMonitor is a memory monitoring application for Marlin.
Definition: MemoryMonitor.h:27
Base class for Marlin processors.
Definition: Processor.h:64