KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVBatchJob.h
Go to the documentation of this file.
1 
4 #ifndef __KVBATCHJOB_H
5 #define __KVBATCHJOB_H
6 
7 #include "KVBase.h"
8 #include <KVDatime.h>
9 
15 class KVBatchJob : public KVBase {
16 protected:
26 
27 public:
28  KVBatchJob();
29  virtual ~KVBatchJob();
30 
31  const Char_t* GetStatus() const
32  {
33  return GetTitle();
34  }
35  void SetStatus(const Char_t* s)
36  {
37  SetTitle(s);
38  }
39  const KVDatime& GetSubmitted() const
40  {
41  return submitted;
42  }
44  {
45  submitted = m;
46  }
47  Int_t GetJobID() const
48  {
49  return GetNumber();
50  }
51  void SetJobID(Int_t n)
52  {
53  SetNumber(n);
54  }
56  {
57  cpu_used = m;
58  }
59  virtual Int_t GetCPUusage() const
60  {
61  return cpu_used;
62  }
63  void SetMemUsed(const Char_t* m)
64  {
65  mem_used = m;
66  }
67  const Char_t* GetMemUsed() const
68  {
69  return mem_used;
70  }
71  void SetCPUmax(Int_t c)
72  {
73  cpu_max = c;
74  }
75  Int_t GetCPUmax() const
76  {
77  return cpu_max;
78  }
79  void SetMemMax(const Char_t* m)
80  {
81  mem_max = m;
82  }
83  const Char_t* GetMemMax() const
84  {
85  return mem_max;
86  }
87  void SetDiskMax(const Char_t* m)
88  {
89  disk_max = m;
90  }
91  const Char_t* GetDiskMax() const
92  {
93  return disk_max;
94  }
95  void SetDiskUsed(const Char_t* m)
96  {
97  disk_used = m;
98  }
99  const Char_t* GetDiskUsed() const
100  {
101  return disk_used;
102  }
104  {
105  events_total = c;
106  }
108  {
109  return events_total;
110  }
112  {
113  events_read = c;
114  }
116  {
117  return events_read;
118  }
120  {
121  return (events_total ? Int_t(100 * (1.*events_read) / (1.*events_total)) : 0);
122  }
123  virtual void DeleteJob()
124  {
125  ;
126  }
127  virtual void UpdateDiskUsedEventsRead();
128 
129  void ls(Option_t* /*opt*/ = "") const;
130 
131  ClassDef(KVBatchJob, 1) //Job handled by batch system
132 };
133 
134 #endif
int Int_t
#define c(i)
char Char_t
const char Option_t
#define ClassDef(name, id)
Base class for KaliVeda framework.
Definition: KVBase.h:135
virtual void SetNumber(UInt_t num)
Definition: KVBase.h:209
UInt_t GetNumber() const
Definition: KVBase.h:213
Handles jobs submitted to batch system.
Definition: KVBatchJob.h:15
const Char_t * GetMemUsed() const
Definition: KVBatchJob.h:67
void SetCPUmax(Int_t c)
Definition: KVBatchJob.h:71
const KVDatime & GetSubmitted() const
Definition: KVBatchJob.h:39
void SetSubmitted(KVDatime &m)
Definition: KVBatchJob.h:43
virtual void DeleteJob()
Definition: KVBatchJob.h:123
void SetEventsRead(Int_t c)
Definition: KVBatchJob.h:111
Int_t GetEventsTotal() const
Definition: KVBatchJob.h:107
void ls(Option_t *="") const
Definition: KVBatchJob.cpp:40
KVDatime submitted
Definition: KVBatchJob.h:17
Int_t GetCPUmax() const
Definition: KVBatchJob.h:75
const Char_t * GetDiskMax() const
Definition: KVBatchJob.h:91
virtual Int_t GetCPUusage() const
Definition: KVBatchJob.h:59
TString disk_max
Definition: KVBatchJob.h:22
Int_t cpu_used
Definition: KVBatchJob.h:18
void SetEventsTotal(Int_t c)
Definition: KVBatchJob.h:103
void SetJobID(Int_t n)
Definition: KVBatchJob.h:51
virtual void UpdateDiskUsedEventsRead()
Definition: KVBatchJob.cpp:53
const Char_t * GetMemMax() const
Definition: KVBatchJob.h:83
const Char_t * GetStatus() const
Definition: KVBatchJob.h:31
void SetMemUsed(const Char_t *m)
Definition: KVBatchJob.h:63
Int_t GetPercentageComplete() const
Definition: KVBatchJob.h:119
Int_t GetJobID() const
Definition: KVBatchJob.h:47
virtual ~KVBatchJob()
Destructor.
Definition: KVBatchJob.cpp:31
KVBatchJob()
Default constructor.
Definition: KVBatchJob.cpp:15
void SetMemMax(const Char_t *m)
Definition: KVBatchJob.h:79
const Char_t * GetDiskUsed() const
Definition: KVBatchJob.h:99
TString disk_used
Definition: KVBatchJob.h:23
Int_t cpu_max
Definition: KVBatchJob.h:20
void SetCPUusage(Int_t m)
Definition: KVBatchJob.h:55
Int_t events_read
Definition: KVBatchJob.h:25
void SetDiskMax(const Char_t *m)
Definition: KVBatchJob.h:87
TString mem_max
Definition: KVBatchJob.h:21
void SetStatus(const Char_t *s)
Definition: KVBatchJob.h:35
TString mem_used
Definition: KVBatchJob.h:19
void SetDiskUsed(const Char_t *m)
Definition: KVBatchJob.h:95
Int_t events_total
Definition: KVBatchJob.h:24
Int_t GetEventsRead() const
Definition: KVBatchJob.h:115
Extension of TDatime to handle various useful date formats.
Definition: KVDatime.h:32
virtual void SetTitle(const char *title="")
virtual const char * GetTitle() const
const Int_t n
const long double s
Definition: KVUnits.h:94
const long double m
Definition: KVUnits.h:70