KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVBatchSystem.h
1/*
2$Id: KVBatchSystem.h,v 1.11 2008/04/03 07:35:45 franklan Exp $
3$Revision: 1.11 $
4$Date: 2008/04/03 07:35:45 $
5*/
6
9
10#ifndef __KVBATCHSYSTEM_H
11#define __KVBATCHSYSTEM_H
12
13#include "KVNameValueList.h"
14#include "KVNumberList.h"
15#include "KVString.h"
16#include "KVBase.h"
17
18class KVDataAnalyser;
19class TEnv;
20class TGWindow;
21class KVList;
22
69
73
78class KVBatchSystem : public KVBase {
79
80protected:
81
90
91 virtual void ChangeDefJobOpt(KVDataAnalyser* da);
92
93public:
94
95 KVBatchSystem(const Char_t* name);
96 virtual ~ KVBatchSystem();
97
99 {
100 return fParList;
101 };
102
103 virtual const Char_t* GetJobSubCmd() const
104 {
105 return fJobSubCmd.Data();
106 };
107 virtual void SubmitTask(KVDataAnalyser* da);
108 virtual void SubmitJob();
109 virtual void PrintJobs(Option_t* /* opt */ = "")
110 {
111 ;
112 }
113 virtual Bool_t CheckJobParameters();
114
115 virtual void Run();
116
117 virtual void SetJobScript(const Char_t* path)
118 {
119 fJobScript = path;
120 };
121
122 virtual void SetDefaultJobOptions(const Char_t* opt)
123 {
125 fDefOpt = opt;
126 };
127 virtual const Char_t* GetDefaultJobOptions() const
128 {
129 return fDefOpt.Data();
130 };
131
132 virtual void SetJobName(const Char_t* name);
133 virtual const Char_t* GetJobName() const;
134
135 virtual const Char_t* GetJobSubCmdLine();
136
137 virtual void Clear(Option_t* opt = "");
138
139 static KVBatchSystem* GetBatchSystem(const Char_t* plugin);
140
141 void cd();
142
143 virtual Bool_t MultiJobsMode() const
144 {
145 return kFALSE;
146 }
147
148 virtual void WriteBatchEnvFile(TEnv*);
149 virtual void ReadBatchEnvFile(TEnv*);
150 virtual void Print(Option_t* /*option*/ = "") const;
151
152 virtual void SetAnalyser(KVDataAnalyser* da)
153 {
154 fAnalyser = da;
155 }
156
157
158 virtual void SanitizeJobName() const {}
159
160 virtual KVList* GetListOfJobs();
161
162 virtual void AlterJobs(TGWindow*, TList*)
163 {
164 ;
165 }
166
168 virtual void SetBatchSystemParameters(const KVNameValueList&);
169
170 ClassDef(KVBatchSystem, 2) //Base class for interface to batch job management system
171};
172
174R__EXTERN KVBatchSystem* gBatchSystem;
175
176#endif
#define R__EXTERN
bool Bool_t
char Char_t
constexpr Bool_t kFALSE
const char Option_t
#define ClassDef(name, id)
Base class for KaliVeda framework.
Definition KVBase.h:142
Base class for interface to a batch job management system.
virtual void SubmitTask(KVDataAnalyser *da)
KVString fJobSubCmd
shell command for submitting job
virtual void WriteBatchEnvFile(TEnv *)
virtual const Char_t * GetDefaultJobOptions() const
KVString fJobName
base job name
virtual const Char_t * GetJobSubCmdLine()
virtual void SetJobName(const Char_t *name)
virtual void SetDefaultJobOptions(const Char_t *opt)
virtual Bool_t MultiJobsMode() const
void cd()
Make this the default batch system.
virtual void SubmitJob()
KVString fJobScript
full path of shell script to be executed by batch system
KVNameValueList & GetParameters()
virtual const Char_t * GetJobName() const
virtual void Run()
virtual void SanitizeJobName() const
virtual void PrintJobs(Option_t *="")
KVNameValueList fParList
list of parameters/switches to be passed on job submission command line
virtual KVList * GetListOfJobs()
virtual void Print(Option_t *="") const
virtual void ChangeDefJobOpt(KVDataAnalyser *da)
virtual void SetAnalyser(KVDataAnalyser *da)
static KVBatchSystem * GetBatchSystem(const Char_t *plugin)
virtual const Char_t * GetJobSubCmd() const
virtual void AlterJobs(TGWindow *, TList *)
virtual void ReadBatchEnvFile(TEnv *)
KVString fDefOpt
default options for job submission command
virtual void SetBatchSystemParameters(const KVNameValueList &)
Use the parameters in the list to set all relevant parameters for batch system.
KVDataAnalyser * fAnalyser
the analyser object which requests job submission, it has all details on the job
virtual void SetJobScript(const Char_t *path)
KVString fCurrJobName
name of current job being submitted
virtual void GetBatchSystemParameterList(KVNameValueList &)
virtual void Clear(Option_t *opt="")
KVNumberList fCurrJobRunList
runlist for (multi job mode) job being submitted
virtual Bool_t CheckJobParameters()
Checks the job and ask for the job name if needed.
Manager class which sets up and runs data analysis tasks.
Extended TList class which owns its objects by default.
Definition KVList.h:28
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Strings used to represent a set of ranges of values.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition KVString.h:73
const char * Data() const