10#include "KVBatchSystem.h"
15#include "KVDataAnalyser.h"
16#include "KVDataAnalysisTask.h"
54 Warning(
"KVBatchSystem",
"Batch system %s has unknown job submission command: %s",
71 if (gBatchSystem ==
this)
141 command_line += par->
GetName();
155 return command_line.
Data();
274 Info(
"SubmitTask",
"Task submission for analyser class : %s", da->
ClassName());
315 Info(
"ChangeDefJobOpt",
"Batch job options for this job are : %s", tmp.
Data());
382 while (!jobName.
Length()) {
383 cout <<
"Please enter the job name : ";
432 if (!strcmp(
option,
"log")) {
434 <<
" executed by batch system " <<
GetName() << endl;
436 else if (!strcmp(
option,
"all")) {
491 nl.
SetValue(
"AutoJobNameFormat",
"$UserClass");
char * Form(const char *fmt,...)
R__EXTERN TSystem * gSystem
Base class for KaliVeda framework.
static Bool_t FindExecutable(TString &exec, const Char_t *path="$(PATH)")
virtual void Print(Option_t *option="") const
static TPluginHandler * LoadPlugin(const Char_t *base, const Char_t *uri="0")
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 *)
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.
KVString fJobScript
full path of shell script to be executed by batch system
KVBatchSystem(const Char_t *name)
virtual const Char_t * GetJobName() const
virtual void SanitizeJobName() const
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 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 ~KVBatchSystem()
Destructor.
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.
virtual TString ExpandAutoBatchName(const Char_t *format) const
virtual void WriteBatchEnvFile(const TString &, Bool_t sav=kTRUE)
KVDataAnalysisTask * GetAnalysisTask() const
Extended TList class which owns its objects by default.
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
virtual void Print(Option_t *opt="") const
KVNamedParameter * GetParameter(Int_t idx) const
return the parameter object with index idx
void SetValue(const Char_t *name, value_type value)
virtual void Clear(Option_t *opt="")
Int_t GetNpar() const
return the number of stored parameters
Bool_t GetBoolValue(const Char_t *name) const
const Char_t * GetStringValue(const Char_t *name) const
A generic named parameter storing values of different types.
const Char_t * GetString() const
TString GetTString() const
Int_t First() const
Returns smallest number included in list.
Int_t Last() const
Returns largest number included in list.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
virtual const char * GetValue(const char *name, const char *dflt) const
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
virtual void SetTitle(const char *title="")
const char * GetName() const override
const char * GetTitle() const override
virtual const char * ClassName() const
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
Longptr_t ExecPlugin(int nargs)
std::istream & ReadToDelim(std::istream &str, char delim='\n')
const char * Data() const
void Form(const char *fmt,...)
TString & ReplaceAll(const char *s1, const char *s2)
virtual Int_t Exec(const char *shellcmd)
virtual const char * WorkingDirectory()
virtual void Setenv(const char *name, const char *value)
virtual const char * TempDirectory() const