KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVLogReader Class Referenceabstract

Detailed Description

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

Definition at line 16 of file KVLogReader.h.

#include <KVLogReader.h>

Inheritance diagram for KVLogReader:

Public Member Functions

 KVLogReader ()
 
virtual ~KVLogReader ()
 
Double_t GetCPUratio () const
 calculate ratio of used CPU to requested CPU
 
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
 
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.
 
virtual void Reset ()
 reset informations read from file
 
Bool_t SegFault () const
 
void SetNameFormat (const Char_t *fmt)
 

Private 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)
 

Private Attributes

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

Constructor & Destructor Documentation

◆ KVLogReader()

KVLogReader::KVLogReader ( )

Definition at line 17 of file KVLogReader.cpp.

◆ ~KVLogReader()

virtual KVLogReader::~KVLogReader ( )
inlinevirtual

Definition at line 46 of file KVLogReader.h.

Member Function Documentation

◆ GetByteMultiplier()

virtual Int_t KVLogReader::GetByteMultiplier ( const KVString unit)
privatepure 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 62 of file KVLogReader.h.

◆ GetCPUused()

Double_t KVLogReader::GetCPUused ( ) const
inline

Definition at line 58 of file KVLogReader.h.

◆ GetJobname()

const Char_t * KVLogReader::GetJobname ( ) const
inline

Definition at line 87 of file KVLogReader.h.

◆ GetMEMrequest()

Double_t KVLogReader::GetMEMrequest ( ) const
inline

Definition at line 70 of file KVLogReader.h.

◆ GetMEMused()

Double_t KVLogReader::GetMEMused ( ) const
inline

Definition at line 79 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 66 of file KVLogReader.h.

◆ GetSCRATCHused()

Double_t KVLogReader::GetSCRATCHused ( ) const
inline

Definition at line 75 of file KVLogReader.h.

◆ GetStatus()

const Char_t * KVLogReader::GetStatus ( ) const
inline

Definition at line 83 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 93 of file KVLogReader.h.

◆ Killed()

Bool_t KVLogReader::Killed ( ) const
inline

Definition at line 98 of file KVLogReader.h.

◆ ReadCPU()

virtual void KVLogReader::ReadCPU ( const KVString line)
privatepure 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)
private

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 
)
privatevirtual

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)
privatepure virtual

Implemented in KVGELogReader.

◆ ReadScratchUsed()

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

Implemented in KVGELogReader.

◆ ReadStatus()

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

Implemented in KVGELogReader.

◆ ReadStorage()

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

Implemented in KVGELogReader.

◆ ReadStorageReq()

void KVLogReader::ReadStorageReq ( const KVString line)
private

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 ( )
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 102 of file KVLogReader.h.

◆ SetNameFormat()

void KVLogReader::SetNameFormat ( const Char_t fmt)
inline

Definition at line 53 of file KVLogReader.h.

Member Data Documentation

◆ fCPUreq

Double_t KVLogReader::fCPUreq
private

requested CPU time in seconds

Definition at line 22 of file KVLogReader.h.

◆ fCPUused

Double_t KVLogReader::fCPUused
private

normalized used CPU time in seconds

Definition at line 21 of file KVLogReader.h.

◆ fFMT

KVString KVLogReader::fFMT
private

format string used to extract run number from job name

Definition at line 19 of file KVLogReader.h.

◆ fGotRequests

Bool_t KVLogReader::fGotRequests
private

set true when disk & memory request has been read

Definition at line 29 of file KVLogReader.h.

◆ fGotStatus

Bool_t KVLogReader::fGotStatus
private

set true when end of job infos have been read

Definition at line 30 of file KVLogReader.h.

◆ fJobname

KVString KVLogReader::fJobname
private

name of job

Definition at line 20 of file KVLogReader.h.

◆ fMemKB

Double_t KVLogReader::fMemKB
private

used memory in KB

Definition at line 26 of file KVLogReader.h.

◆ fMEMreq

Double_t KVLogReader::fMEMreq
private

requested memory (VIRTUAL STORAGE) in KB

Definition at line 23 of file KVLogReader.h.

◆ fOK

Bool_t KVLogReader::fOK
private

job OK or not ?

Definition at line 28 of file KVLogReader.h.

◆ fScratchKB

Double_t KVLogReader::fScratchKB
private

used disk space in KB

Definition at line 25 of file KVLogReader.h.

◆ fSCRreq

Double_t KVLogReader::fSCRreq
private

requested scratch disk space in KB

Definition at line 24 of file KVLogReader.h.

◆ fStatus

KVString KVLogReader::fStatus
private

status string

Definition at line 27 of file KVLogReader.h.