KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
KVLogReader Class Referenceabstract

Base class for reading batch log files at CC-IN2P3.

Definition at line 15 of file KVLogReader.h.

Public Member Functions

 KVLogReader ()
 
virtual ~ KVLogReader ()
 
Double_t GetCPUratio () const
 calculate ratio of used CPU to requested CPU More...
 
Double_t GetCPUrequest () const
 
Double_t GetCPUused () const
 
const Char_tGetJobname () const
 
Double_t GetMEMrequest () const
 
Double_t GetMEMused () const
 
Int_t GetRunNumber () const
 try to get run number from jobname using format string fFMT More...
 
Double_t GetSCRATCHrequest () const
 
Double_t GetSCRATCHused () const
 
const Char_tGetStatus () const
 
virtual Bool_t Incomplete () const
 
Bool_t JobOK () const
 
Bool_t Killed () const
 
void ReadFile (const Char_t *fname)
 Open file 'fname' and read contents. More...
 
virtual void Reset ()
 reset informations read from file More...
 
Bool_t SegFault () const
 
void SetNameFormat (const Char_t *fmt)
 

Protected Member Functions

virtual Int_t GetByteMultiplier (const KVString &unit)=0
 
virtual void ReadCPU (const KVString &line)=0
 
void ReadJobname (const KVString &line)
 
virtual void ReadLine (const KVString &line, Bool_t &)
 
virtual void ReadMemUsed (const KVString &line)=0
 
virtual void ReadScratchUsed (const KVString &line)=0
 
virtual void ReadStatus (const KVString &line)=0
 
virtual Double_t ReadStorage (const KVString &stor)=0
 
void ReadStorageReq (const KVString &line)
 

Protected Attributes

Double_t fCPUreq
 requested CPU time in seconds More...
 
Double_t fCPUused
 normalized used CPU time in seconds More...
 
KVString fFMT
 format string used to extract run number from job name More...
 
Bool_t fGotRequests
 set true when disk & memory request has been read More...
 
Bool_t fGotStatus
 set true when end of job infos have been read More...
 
KVString fJobname
 name of job More...
 
Double_t fMemKB
 used memory in KB More...
 
Double_t fMEMreq
 requested memory (VIRTUAL STORAGE) in KB More...
 
Bool_t fOK
 job OK or not ? More...
 
Double_t fScratchKB
 used disk space in KB More...
 
Double_t fSCRreq
 requested scratch disk space in KB More...
 
KVString fStatus
 status string More...
 

#include <KVLogReader.h>

Inheritance diagram for KVLogReader:
Inheritance graph
[legend]

Constructor & Destructor Documentation

◆ KVLogReader()

KVLogReader::KVLogReader ( )

Definition at line 17 of file KVLogReader.cpp.

◆ ~ KVLogReader()

virtual KVLogReader::~ KVLogReader ( )
inlinevirtual

Definition at line 45 of file KVLogReader.h.

Member Function Documentation

◆ GetByteMultiplier()

virtual Int_t KVLogReader::GetByteMultiplier ( const KVString unit)
protectedpure virtual

Implemented in KVGELogReader.

◆ GetCPUratio()

Double_t KVLogReader::GetCPUratio ( ) const

calculate ratio of used CPU to requested CPU

Definition at line 113 of file KVLogReader.cpp.

◆ GetCPUrequest()

Double_t KVLogReader::GetCPUrequest ( ) const
inline

Definition at line 61 of file KVLogReader.h.

◆ GetCPUused()

Double_t KVLogReader::GetCPUused ( ) const
inline

Definition at line 57 of file KVLogReader.h.

◆ GetJobname()

const Char_t* KVLogReader::GetJobname ( ) const
inline

Definition at line 86 of file KVLogReader.h.

◆ GetMEMrequest()

Double_t KVLogReader::GetMEMrequest ( ) const
inline

Definition at line 69 of file KVLogReader.h.

◆ GetMEMused()

Double_t KVLogReader::GetMEMused ( ) const
inline

Definition at line 78 of file KVLogReader.h.

◆ GetRunNumber()

Int_t KVLogReader::GetRunNumber ( ) const

try to get run number from jobname using format string fFMT

Definition at line 162 of file KVLogReader.cpp.

◆ GetSCRATCHrequest()

Double_t KVLogReader::GetSCRATCHrequest ( ) const
inline

Definition at line 65 of file KVLogReader.h.

◆ GetSCRATCHused()

Double_t KVLogReader::GetSCRATCHused ( ) const
inline

Definition at line 74 of file KVLogReader.h.

◆ GetStatus()

const Char_t* KVLogReader::GetStatus ( ) const
inline

Definition at line 82 of file KVLogReader.h.

◆ Incomplete()

Bool_t KVLogReader::Incomplete ( ) const
virtual

job considered incomplete if

  • it was not 'killed'
  • it did not end in segmentation fault/violation AND
  • the end of job status report was not found
  • OR the disk & memory requests were not found
  • OR the status indicates the job was incomplete

Reimplemented in KVGELogReader.

Definition at line 181 of file KVLogReader.cpp.

◆ JobOK()

Bool_t KVLogReader::JobOK ( ) const
inline

Definition at line 92 of file KVLogReader.h.

◆ Killed()

Bool_t KVLogReader::Killed ( ) const
inline

Definition at line 97 of file KVLogReader.h.

◆ ReadCPU()

virtual void KVLogReader::ReadCPU ( const KVString line)
protectedpure virtual

Implemented in KVGELogReader.

◆ ReadFile()

void KVLogReader::ReadFile ( const Char_t fname)

Open file 'fname' and read contents.

Definition at line 43 of file KVLogReader.cpp.

◆ ReadJobname()

void KVLogReader::ReadJobname ( const KVString line)
protected

read line of type "* Jobname: run4049 *" with name of job.

Definition at line 149 of file KVLogReader.cpp.

◆ ReadLine()

void KVLogReader::ReadLine ( const KVString line,
Bool_t ok 
)
protectedvirtual

analyse contents of line read from log file

if line contains "segmentation" then we put ok=kFALSE to stop reading file

status will equal the contents of the current line

Reimplemented in KVGELogReader.

Definition at line 74 of file KVLogReader.cpp.

◆ ReadMemUsed()

virtual void KVLogReader::ReadMemUsed ( const KVString line)
protectedpure virtual

Implemented in KVGELogReader.

◆ ReadScratchUsed()

virtual void KVLogReader::ReadScratchUsed ( const KVString line)
protectedpure virtual

Implemented in KVGELogReader.

◆ ReadStatus()

virtual void KVLogReader::ReadStatus ( const KVString line)
protectedpure virtual

Implemented in KVGELogReader.

◆ ReadStorage()

virtual Double_t KVLogReader::ReadStorage ( const KVString stor)
protectedpure virtual

Implemented in KVGELogReader.

◆ ReadStorageReq()

void KVLogReader::ReadStorageReq ( const KVString line)
protected

Read lines "DISK_REQ: 3GB" and "MEM_REQ: 150MB" and fill corresponding variable with appropriate value

Definition at line 125 of file KVLogReader.cpp.

◆ Reset()

void KVLogReader::Reset ( void  )
virtual

reset informations read from file

Reimplemented in KVGELogReader.

Definition at line 28 of file KVLogReader.cpp.

◆ SegFault()

Bool_t KVLogReader::SegFault ( ) const
inline

Definition at line 101 of file KVLogReader.h.

◆ SetNameFormat()

void KVLogReader::SetNameFormat ( const Char_t fmt)
inline

Definition at line 52 of file KVLogReader.h.

Member Data Documentation

◆ fCPUreq

Double_t KVLogReader::fCPUreq
protected

requested CPU time in seconds

Definition at line 21 of file KVLogReader.h.

◆ fCPUused

Double_t KVLogReader::fCPUused
protected

normalized used CPU time in seconds

Definition at line 20 of file KVLogReader.h.

◆ fFMT

KVString KVLogReader::fFMT
protected

format string used to extract run number from job name

Definition at line 18 of file KVLogReader.h.

◆ fGotRequests

Bool_t KVLogReader::fGotRequests
protected

set true when disk & memory request has been read

Definition at line 28 of file KVLogReader.h.

◆ fGotStatus

Bool_t KVLogReader::fGotStatus
protected

set true when end of job infos have been read

Definition at line 29 of file KVLogReader.h.

◆ fJobname

KVString KVLogReader::fJobname
protected

name of job

Definition at line 19 of file KVLogReader.h.

◆ fMemKB

Double_t KVLogReader::fMemKB
protected

used memory in KB

Definition at line 25 of file KVLogReader.h.

◆ fMEMreq

Double_t KVLogReader::fMEMreq
protected

requested memory (VIRTUAL STORAGE) in KB

Definition at line 22 of file KVLogReader.h.

◆ fOK

Bool_t KVLogReader::fOK
protected

job OK or not ?

Definition at line 27 of file KVLogReader.h.

◆ fScratchKB

Double_t KVLogReader::fScratchKB
protected

used disk space in KB

Definition at line 24 of file KVLogReader.h.

◆ fSCRreq

Double_t KVLogReader::fSCRreq
protected

requested scratch disk space in KB

Definition at line 23 of file KVLogReader.h.

◆ fStatus

KVString KVLogReader::fStatus
protected

status string

Definition at line 26 of file KVLogReader.h.


The documentation for this class was generated from the following files: