4 #include "KVLogReader.h"
31 fCPUused = fCPUreq = fSCRreq = fMEMreq = fScratchKB = fMemKB = 0;
49 ifstream filestream(fname);
50 if (!filestream.good()) {
51 cout <<
"Error in KVLogReader::ReadFile - cannot open file " << fname
56 line.ReadLine(filestream);
58 while (filestream.good() && ok) {
60 line.ReadLine(filestream);
83 if (
line.Contains(
"egmentation")) {
88 else if (
line.Contains(
"Temps limite atteint")) {
91 fStatus =
"VEDA Fortran out of time";
94 else if (
line.Contains(
"rfcp : Input/output error")) {
97 fStatus =
"rfcp error";
100 else if (
line.Contains(
"TXNetFile") &&
line.Contains(
"open attempt failed")) {
103 fStatus =
"XROOTD error";
116 return (fCPUreq ? fCPUused / fCPUreq : 0.);
134 if (
type ==
"DISK_REQ")
136 else if (
type ==
"MEM_REQ")
140 if (fSCRreq && fMEMreq) fGotRequests =
kTRUE;
153 unique_ptr<TObjArray> toks(
line.Tokenize(
"*: "));
154 fJobname = ((
TObjString*) toks->At(1))->GetString();
166 sscanf(fJobname.Data(), fFMT.Data(), &run);
192 (!Killed() && !SegFault())
197 || (fStatus ==
"VEDA Fortran out of time")
198 || (fStatus.BeginsWith(
"rfcp"))
size_t size(const MatrixT &matrix)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Base class for reading batch log files at CC-IN2P3.
virtual void ReadLine(const KVString &line, Bool_t &)
void ReadStorageReq(const KVString &line)
void ReadJobname(const KVString &line)
Double_t GetCPUratio() const
calculate ratio of used CPU to requested CPU
void ReadFile(const Char_t *fname)
Open file 'fname' and read contents.
virtual void Reset()
reset informations read from file
virtual Bool_t Incomplete() const
Int_t GetRunNumber() const
try to get run number from jobname using format string fFMT
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....