22 #ifndef _LAUNCHER_JOB_HXX_
23 #define _LAUNCHER_JOB_HXX_
41 #include <libbatch/Job.hxx>
42 #include <libbatch/JobId.hxx>
43 #include <libbatch/GenericException.hxx>
56 void setState(
const std::string & state);
57 std::string getState()
const;
59 std::string getAssignedHostnames();
61 void setNumber(
const int & number);
68 void setJobName(
const std::string & job_name);
69 virtual void setJobFile(
const std::string & job_file);
70 void setWorkDirectory(
const std::string & work_directory);
71 void setLocalDirectory(
const std::string & local_directory);
72 void setResultDirectory(
const std::string & result_directory);
73 void add_in_file(
const std::string & file);
74 void add_out_file(
const std::string & file);
75 void setMaximumDuration(
const std::string & maximum_duration);
76 void setResourceRequiredParams(
const resourceParams & resource_required_params);
77 void setQueue(
const std::string & queue);
78 void setEnvFile(
const std::string & env_file);
79 void setExclusive(
bool exclusive);
80 void setExclusiveStr(
const std::string & exclusiveStr);
81 void setMemPerCpu(
unsigned long mem_per_cpu);
82 void setWCKey(
const std::string & wckey);
83 void setExtraParams(
const std::string & extra_params);
84 void setReference(
const std::string & reference);
86 void setLauncherFile(
const std::string & launcher_file);
87 void setLauncherArgs(
const std::string & launcher_args);
89 std::string getJobName()
const;
90 std::string getJobFile()
const;
91 std::string getWorkDirectory()
const;
92 std::string getLocalDirectory()
const;
93 std::string getResultDirectory()
const;
94 const std::list<std::string> & get_in_files()
const;
95 const std::list<std::string> & get_out_files()
const;
96 std::string getMaximumDuration()
const;
98 std::string getQueue()
const;
99 std::string getEnvFile()
const;
100 std::string getJobType()
const;
101 bool getExclusive()
const;
102 std::string getExclusiveStr()
const;
103 unsigned long getMemPerCpu()
const;
104 std::string getWCKey()
const;
105 std::string getExtraParams()
const;
106 std::string getReference()
const;
109 std::string getLauncherFile()
const;
110 std::string getLauncherArgs()
const;
112 std::string updateJobState();
114 void addSpecificParameter(
const std::string & name,
115 const std::string & value);
116 const std::map<std::string, std::string> & getSpecificParameters()
const;
117 virtual void checkSpecificParameters();
120 void checkMaximumDuration(
const std::string & maximum_duration);
121 void checkResourceRequiredParams(
const resourceParams & resource_required_params);
124 long convertMaximumDuration(
const std::string & maximum_duration);
125 std::string getLaunchDate()
const;
131 virtual void update_job() = 0;
173 Batch::Job * getBatchJob();
174 Batch::Parametre common_job_params();
175 void setBatchManagerJobId(Batch::JobId batch_manager_job_id);
176 Batch::JobId getBatchManagerJobId()
const;
179 Batch::Job * _batch_job;
180 Batch::JobId _batch_job_id;