KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVBatchSystem.h
Go to the documentation of this file.
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 
18 class KVDataAnalyser;
19 class TEnv;
20 class TGWindow;
21 class KVList;
22 
68 
72 
77 class KVBatchSystem : public KVBase {
78 
79 protected:
80 
89 
90  virtual void ChangeDefJobOpt(KVDataAnalyser* da);
91 
92 public:
93 
94  KVBatchSystem(const Char_t* name);
95  virtual ~ KVBatchSystem();
96 
98  {
99  return fParList;
100  };
101 
102  virtual const Char_t* GetJobSubCmd() const
103  {
104  return fJobSubCmd.Data();
105  };
106  virtual void SubmitTask(KVDataAnalyser* da);
107  virtual void SubmitJob();
108  virtual void PrintJobs(Option_t* /* opt */ = "")
109  {
110  ;
111  }
112  virtual Bool_t CheckJobParameters();
113 
114  virtual void Run();
115 
116  virtual void SetJobScript(const Char_t* path)
117  {
118  fJobScript = path;
119  };
120 
121  virtual void SetDefaultJobOptions(const Char_t* opt)
122  {
124  fDefOpt = opt;
125  };
126  virtual const Char_t* GetDefaultJobOptions() const
127  {
128  return fDefOpt.Data();
129  };
130 
131  virtual void SetJobName(const Char_t* name);
132  virtual const Char_t* GetJobName() const;
133 
134  virtual const Char_t* GetJobSubCmdLine();
135 
136  virtual void Clear(Option_t* opt = "");
137 
138  static KVBatchSystem* GetBatchSystem(const Char_t* plugin);
139 
140  void cd();
141 
142  virtual Bool_t MultiJobsMode() const
143  {
144  return kFALSE;
145  }
146 
147  virtual void WriteBatchEnvFile(TEnv*);
148  virtual void ReadBatchEnvFile(TEnv*);
149  virtual void Print(Option_t* /*option*/ = "") const;
150 
151  virtual void SetAnalyser(KVDataAnalyser* da)
152  {
153  fAnalyser = da;
154  }
155 
156 
157  virtual void SanitizeJobName() const {}
158 
159  virtual KVList* GetListOfJobs();
160 
161  virtual void AlterJobs(TGWindow*, TList*)
162  {
163  ;
164  }
165 
167  virtual void SetBatchSystemParameters(const KVNameValueList&);
168 
169  ClassDef(KVBatchSystem, 2) //Base class for interface to batch job management system
170 };
171 
174 
175 #endif
#define R__EXTERN
R__EXTERN KVBatchSystem * gBatchSystem
................ global variable
char Char_t
const Bool_t kFALSE
bool Bool_t
const char Option_t
#define ClassDef(name, id)
Base class for KaliVeda framework.
Definition: KVBase.h:141
Base class for interface to a batch job management system.
Definition: KVBatchSystem.h:77
virtual void SubmitTask(KVDataAnalyser *da)
KVString fJobSubCmd
shell command for submitting job
Definition: KVBatchSystem.h:84
virtual void WriteBatchEnvFile(TEnv *)
KVString fJobName
base job name
Definition: KVBatchSystem.h:83
virtual const Char_t * GetJobSubCmdLine()
virtual ~ KVBatchSystem()
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
Definition: KVBatchSystem.h:85
KVBatchSystem(const Char_t *name)
virtual const Char_t * GetDefaultJobOptions() const
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
Definition: KVBatchSystem.h:82
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
Definition: KVBatchSystem.h:86
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
Definition: KVBatchSystem.h:81
virtual void SetJobScript(const Char_t *path)
KVString fCurrJobName
name of current job being submitted
Definition: KVBatchSystem.h:87
virtual void GetBatchSystemParameterList(KVNameValueList &)
virtual void Clear(Option_t *opt="")
KVNumberList fCurrJobRunList
runlist for (multi job mode) job being submitted
Definition: KVBatchSystem.h:88
KVNameValueList & GetParameters()
Definition: KVBatchSystem.h:97
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:27
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:83
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:72
const char * Data() const