4#include "KV_CCIN2P3_Slurm.h"
7#include "KVDataAnalyser.h"
8#include "KVDataAnalysisTask.h"
9#include "KVDataSetAnalyser.h"
10#include "KVSimDirAnalyser.h"
27 fDefJobTime =
gEnv->
GetValue(
"GE.BatchSystem.DefaultJobTime",
"00:05:00");
28 fDefJobMem =
gEnv->
GetValue(
"GE.BatchSystem.DefaultJobMemory",
"3G");
29 fTimeSet = fMemSet =
kFALSE;
31 SetRunsPerJob(
gEnv->
GetValue(
"GE.BatchSystem.RunsPerJob", 1));
124 cout <<
"Enter max CPU time per job (ss/mn:ss/hh:mn:ss) ["
143 cout <<
"Enter max memory per job (xKB/xMB/xGB) ["
190 env->
SetValue(
"SimDirAnalyser.CopyFilesToWorkingDirectory",
true);
222 if (!strcmp(
option,
"log")) {
224 cout <<
"* MEM_REQ: " <<
GetJobMemory() <<
" *" << endl;
274 KVString ressource_list(
" -L xrootd");
276 if ((NeedToAddSPS || repIsSPS)) {
277 ressource_list +=
",sps";
279 oldoptions += ressource_list;
327 while (remaining_runs && !runs.
End()) {
351 while ((of = it())) {
352 cur_file_list.
Add(of);
361 cur_file_list.
Clear();
R__EXTERN TSystem * gSystem
Base class for interface to a batch job management system.
virtual void WriteBatchEnvFile(TEnv *)
virtual const Char_t * GetDefaultJobOptions() const
KVString fJobName
base job name
virtual void SetDefaultJobOptions(const Char_t *opt)
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 ReadBatchEnvFile(TEnv *)
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
KVString fCurrJobName
name of current job being submitted
virtual void GetBatchSystemParameterList(KVNameValueList &)
virtual void Clear(Option_t *opt="")
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
KVDataAnalysisTask * GetAnalysisTask() const
virtual KVString GetRootDirectoryOfDataToAnalyse() const
Pilots user analysis of experimental data.
void SetFullRunList(const KVNumberList &nl)
const KVNumberList & GetRunList() const
void SetRuns(const KVNumberList &nl, Bool_t check=kTRUE)
Extended TList class which owns its objects by default.
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Int_t GetIntValue(const Char_t *name) const
void SetValue(const Char_t *name, value_type value)
Bool_t GetBoolValue(const Char_t *name) const
const Char_t * GetStringValue(const Char_t *name) const
Strings used to represent a set of ranges of values.
Int_t First() const
Returns smallest number included in list.
const Char_t * AsString(Int_t maxchars=0) const
void SetList(const TString &)
void Add(Int_t)
Add value 'n' to the list.
void Clear(Option_t *="")
Empty number list, reset it to initial state.
Int_t Last() const
Returns largest number included in list.
Class piloting analyses of simulated data.
void SetFileList(TList *l) override
TList * GetFileList() const
Int_t GetNumberOfFilesToAnalyse() const override
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Int_t GetNValues(TString delim) const
Interface to CCIN2P3 Grid Engine batch job management system.
void SetRunsPerJob(Int_t n)
KVString fDefJobTime
default job length
virtual void Print(Option_t *="") const
virtual void ChangeDefJobOpt(KVDataAnalyser *)
Bool_t MultiJobsMode() const
void SetMultiJobsMode(Bool_t on=kTRUE)
const Char_t * GetJobName() const
const Char_t * GetJobTime(void) const
returns the parameter string corresponding to the job CPU time
virtual void Clear(Option_t *opt="")
Clear previously set parameters in order to create a new job submission command.
virtual Bool_t CheckJobParameters()
Checks the job and asks for any missing parameters.
void SetJobMemory(const Char_t *h="")
Bool_t fMultiJobs
set to kTRUE if several jobs are to be submitted for the runlist set in fAnalyser
KVNumberList fCurrJobRunList
runlist for (multi job mode) job being submitted
virtual void GetBatchSystemParameterList(KVNameValueList &)
const Char_t * GetJobMemory(void) const
returns the parameter string corresponding to the job Memory
void ChooseJobMemory(void)
void SetJobTime(const Char_t *h="")
virtual void SetBatchSystemParameters(const KVNameValueList &)
Use the parameters in the list to set all relevant parameters for batch system.
void PrintJobs(Option_t *opt="")
Print list of owner's jobs.
Int_t fRunsPerJob
number of runs per job submitted in multi job mode (default=1)
KVString fDefJobMem
default job memory allocation (with units, e.g. "512M")
virtual void ReadBatchEnvFile(TEnv *)
virtual void SanitizeJobName() const
Int_t GetRunsPerJob() const
virtual void WriteBatchEnvFile(TEnv *)
void ls(Option_t *option="") const override
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)
void Clear(Option_t *option="") override
void Add(TObject *obj) override
const char * GetName() const override
virtual Bool_t InheritsFrom(const char *classname) const
std::istream & ReadToDelim(std::istream &str, char delim='\n')
const char * Data() const
TString & Prepend(char c, Ssiz_t rep=1)
void Form(const char *fmt,...)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
TString & ReplaceAll(const char *s1, const char *s2)
virtual const char * WorkingDirectory()