// CondorCodJob.h #ifndef dial__CondorCodJob_H #define dial__CondorCodJob_H // Nagesh Chetan // April 2004 // // CondorCodJob is a local job that runs an executable using Condor COD. #include "dataset_util/Environment.h" #include "dial_job/Job.h" #include "CondorCodTable.h" namespace dial { class CondorCodJob : public Job { private: // data // Input data. Environment m_env; std::string m_rundir; // Filenames (including dir). std::string m_descfile; std::string m_machinefile; std::string m_claimId; CondorCodJob(const CondorCodJob&); CondorCodJob& operator = (const CondorCodJob&); public: // functions // Constructor. // rundir = directory in which to run // runfile = script to run CondorCodJob(JobId jid, const Application& app, const Task& tsk, const dset::Dataset& dst, const JobPreferences& prf, std::string jobdir, std::string runfile, std::string machinefile); // Conversion constructor. CondorCodJob(const Job& job, std::string descfile); // Destructor. ~CondorCodJob(); //start the job int start(); //update the job status int update(); //kills the job int kill(int err =0); // initialize the Cod desc file int initialize(); // activate the Cod job int activate(); // deactivate the Cod job int deactivate(); public: // const functions // Getters. std::string condor_claim_id() const { return m_claimId; } std::string condor_id() const { return local_id(); } std::string directory() const { return m_rundir;} // Output stream. std::ostream& ostr(std::ostream& lhs) const; }; } // end namespace dial #endif