KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KV_CCIN2P3_GE.h
Go to the documentation of this file.
1 
4 #ifndef __KV_CCIN2P3_GE_H
5 #define __KV_CCIN2P3_GE_H
6 
7 #include <KVBatchSystem.h>
8 
15 
16 protected:
17 
26 
27  virtual void ChangeDefJobOpt(KVDataAnalyser*);
28 
29 public:
30 
31  KV_CCIN2P3_GE(const Char_t* name);
32  virtual ~ KV_CCIN2P3_GE();
33 
34  void SetJobTime(const Char_t* h = ""); /* Set CPU time for batch job */
35  void SetJobMemory(const Char_t* h = ""); /* Set max memory for batch job */
36  void SetJobDisk(const Char_t* h = ""); /* Set max disk space for batch job */
37  void PrintJobs(Option_t* opt = ""); /* Print list of all jobs submitted to system */
38 
39  virtual Bool_t CheckJobParameters(); /* Checks job parameters */
40  void SetMultiJobsMode(Bool_t on = kTRUE)
41  {
42  fMultiJobs = on;
43  }
45  {
46  return fMultiJobs;
47  }
48 
50  {
52  fRunsPerJob = n;
53  }
55  {
57  return fRunsPerJob;
58  }
59 
60  const Char_t* GetJobTime(void) const; /* Get CPU time for batch job */
61  const Char_t* GetJobMemory(void) const; /* Get max memory for batch job */
62  const Char_t* GetJobDisk(void) const; /* Get max disk space for batch job */
63 
64  void ChooseJobTime(void); /* Choose CPU time for batch job */
65  void ChooseJobMemory(void); /* Choose max memory for batch job */
66  void ChooseJobDisk(void); /* Choose max disk space for batch job */
67 
68  virtual void Clear(Option_t* opt = "");
69 
70  virtual void WriteBatchEnvFile(TEnv*);
71  virtual void ReadBatchEnvFile(TEnv*);
72  virtual void Print(Option_t* /*option*/ = "") const;
73 
74  virtual void SanitizeJobName() const;
75 
76  virtual KVList* GetListOfJobs();
77 
78  void SetSendMailOnJobStart();
79  void SetSendMailOnJobEnd();
80  void SetSendMailAddress(const char*);
81 
82  void Run();
84  virtual void SetBatchSystemParameters(const KVNameValueList&);
85 
86  ClassDef(KV_CCIN2P3_GE, 1) //Interface to CCIN2P3-GE batch job management system
87 };
88 
89 #endif
int Int_t
char Char_t
bool Bool_t
const char Option_t
#define ClassDef(name, id)
Base class for interface to a batch job management system.
Definition: KVBatchSystem.h:77
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.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:72
Interface to CCIN2P3 Grid Engine batch job management system.
Definition: KV_CCIN2P3_GE.h:14
virtual KVList * GetListOfJobs()
Bool_t fMultiJobs
set to kTRUE if several jobs are to be submitted for the runlist set in fAnalyser
Definition: KV_CCIN2P3_GE.h:18
virtual void GetBatchSystemParameterList(KVNameValueList &)
void SetSendMailOnJobEnd()
add option to send mail when job ends
Bool_t MultiJobsMode() const
Definition: KV_CCIN2P3_GE.h:44
const Char_t * GetJobTime(void) const
returns the parameter string corresponding to the job CPU time
Int_t fRunsPerJob
number of runs per job submitted in multi job mode (default=1)
Definition: KV_CCIN2P3_GE.h:19
void PrintJobs(Option_t *opt="")
Print list of owner's jobs.
void SetJobMemory(const Char_t *h="")
KV_CCIN2P3_GE(const Char_t *name)
void ChooseJobDisk(void)
KVString fDefJobTime
default job length
Definition: KV_CCIN2P3_GE.h:20
void SetJobDisk(const Char_t *h="")
virtual void WriteBatchEnvFile(TEnv *)
virtual void SanitizeJobName() const
virtual void Print(Option_t *="") const
virtual ~ KV_CCIN2P3_GE()
KVString fDefJobDisk
default job disk space (with units, e.g. "1G")
Definition: KV_CCIN2P3_GE.h:22
KVString fDefJobMem
default job memory allocation (with units, e.g. "512M")
Definition: KV_CCIN2P3_GE.h:21
virtual Bool_t CheckJobParameters()
Checks the job and asks for any missing parameters.
void SetSendMailAddress(const char *)
set email address for notifications
const Char_t * GetJobDisk(void) const
returns the parameter string corresponding to the job Disk
virtual void Clear(Option_t *opt="")
Clear previously set parameters in order to create a new job submission command.
void ChooseJobMemory(void)
void ChooseJobTime(void)
void SetJobTime(const Char_t *h="")
Int_t GetRunsPerJob() const
Definition: KV_CCIN2P3_GE.h:54
const Char_t * GetJobMemory(void) const
returns the parameter string corresponding to the job Memory
virtual void ChangeDefJobOpt(KVDataAnalyser *)
void SetRunsPerJob(Int_t n)
Definition: KV_CCIN2P3_GE.h:49
void SetSendMailOnJobStart()
add option to send mail when job starts
virtual void SetBatchSystemParameters(const KVNameValueList &)
Use the parameters in the list to set all relevant parameters for batch system.
virtual void ReadBatchEnvFile(TEnv *)
void SetMultiJobsMode(Bool_t on=kTRUE)
Definition: KV_CCIN2P3_GE.h:40
const Int_t n