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