ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
CoWTools::Monitor Class Reference

#include <Monitor.h>

Collaboration diagram for CoWTools::Monitor:

Public Types

enum  VecPos {
  VMem =0, RSS =1, PSS =2, Shared =3,
  Private =4, Anon =5
}
 

Public Member Functions

 Monitor (std::string &out)
 
 Monitor (MsgStream &out)
 
 Monitor (std::vector< long > &out)
 
 ~Monitor ()
 
 Monitor (const Monitor &)=delete
 
Monitoroperator= (const Monitor &)=delete
 

Private Member Functions

const CoWTools::CoWRecordStats parseSmaps () const
 

Private Attributes

StreamBasem_out
 
CoWTools::CoWRecordStats m_stats
 

Detailed Description

Definition at line 16 of file Monitor.h.

Member Enumeration Documentation

◆ VecPos

Enumerator
VMem 
RSS 
PSS 
Shared 
Private 
Anon 

Definition at line 18 of file Monitor.h.

18 {VMem=0,RSS=1,PSS=2,Shared=3,Private=4,Anon=5};

Constructor & Destructor Documentation

◆ Monitor() [1/4]

CoWTools::Monitor::Monitor ( std::string &  out)

Definition at line 13 of file Monitor.cxx.

13  {
16  }

◆ Monitor() [2/4]

CoWTools::Monitor::Monitor ( MsgStream &  out)

Definition at line 18 of file Monitor.cxx.

18  {
21  }

◆ Monitor() [3/4]

CoWTools::Monitor::Monitor ( std::vector< long > &  out)

Definition at line 23 of file Monitor.cxx.

23  {
26  }

◆ ~Monitor()

CoWTools::Monitor::~Monitor ( )

Definition at line 27 of file Monitor.cxx.

27  {
30  delete m_out;
31  }

◆ Monitor() [4/4]

CoWTools::Monitor::Monitor ( const Monitor )
delete

Member Function Documentation

◆ operator=()

Monitor& CoWTools::Monitor::operator= ( const Monitor )
delete

◆ parseSmaps()

const CoWTools::CoWRecordStats CoWTools::Monitor::parseSmaps ( ) const
private

Definition at line 33 of file Monitor.cxx.

33  {
34  std::ifstream pfile("/proc/self/smaps");
35  CoWTools::CoWRecordStats total,curr;
36  if(pfile.is_open()){
37  std::string line;
38  std::stringstream ss;
39  std::string libLine;
40  while(!std::getline(pfile,line).eof()){
41  if(line.empty())continue;
42  if(line.size()>30 && line.at(0)!='V'){
43  ss.seekg(0);
44  curr.parseRecord(ss);
45  total+=curr;
46  ss.str("");
47  ss.clear();
48  continue;
49  }
50  ss<<line<<std::endl;
51  ss.clear();
52  }
53  if(ss.str().size()>200){
54  curr.parseRecord(ss);
55  total+=curr;
56  }
57  pfile.close();
58  }
59  return total;
60  }

Member Data Documentation

◆ m_out

StreamBase* CoWTools::Monitor::m_out
private

Definition at line 28 of file Monitor.h.

◆ m_stats

CoWTools::CoWRecordStats CoWTools::Monitor::m_stats
private

Definition at line 29 of file Monitor.h.


The documentation for this class was generated from the following files:
CoWTools::Monitor::m_stats
CoWTools::CoWRecordStats m_stats
Definition: Monitor.h:29
checkFileSG.line
line
Definition: checkFileSG.py:75
CoWTools::Monitor::m_out
StreamBase * m_out
Definition: Monitor.h:28
CoWTools::Monitor::Anon
@ Anon
Definition: Monitor.h:18
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
CoWTools::Monitor::parseSmaps
const CoWTools::CoWRecordStats parseSmaps() const
Definition: Monitor.cxx:33
LArNewCalib_Delay_OFC_Cali.pfile
string pfile
Definition: LArNewCalib_Delay_OFC_Cali.py:181
CoWTools::VecStream
Definition: VecStream.h:16
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
CoWTools::Monitor::Private
@ Private
Definition: Monitor.h:18
CoWTools::StreamBase::putResults
virtual void putResults(const CoWRecordStats &)=0
CoWTools::StrStream
Definition: StrStream.h:14
CoWTools::MStrStream
Definition: MStrStream.h:15
CoWTools::Monitor::VMem
@ VMem
Definition: Monitor.h:18
CoWTools::CoWRecordStats::parseRecord
void parseRecord(std::istream &in)
Definition: CoWRecordStats.cxx:40
CoWTools::CoWRecordStats
Definition: CoWRecordStats.h:13
CoWTools::Monitor::PSS
@ PSS
Definition: Monitor.h:18
CoWTools::Monitor::Shared
@ Shared
Definition: Monitor.h:18
CoWTools::Monitor::RSS
@ RSS
Definition: Monitor.h:18