#include <MeshJobManager_i.hxx>
Public Member Functions | |
MeshJobManager_i (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId *contId, const char *instanceName, const char *interfaceName) | |
~MeshJobManager_i () | |
bool | configure (const char *configId, const MESHJOB::ConfigParameter &configParameter) |
CORBA::Long | initialize (const MESHJOB::MeshJobFileList &meshJobFileList, const MESHJOB::MeshJobParameterList &meshJobParameterList, const char *configId) |
Initialize a smesh computation job and return the job identifier. More... | |
bool | start (CORBA::Long jobId) |
Submit the job execution and return true if submission is OK. More... | |
char * | getState (CORBA::Long jobId) |
Request the launch manager for the state of the specified job. More... | |
MESHJOB::MeshJobResults * | finalize (CORBA::Long jobId) |
MESHJOB::MeshJobPaths * | getPaths (CORBA::Long jobId) |
bool | clean (CORBA::Long jobId) |
Clean all data associated to this job and remove the job from the launch manager. More... | |
char * | getLastErrorMessage () |
Static Public Attributes | |
static long | JOBID_UNDEFINED = -1 |
Private Member Functions | |
const char * | _writeDataFile (std::vector< MESHJOB::MeshJobFile > listConcreteMesh, std::vector< MESHJOB::MeshJobFile > listSteelBarMesh, const MESHJOB::MeshJobParameterList &meshJobParameterList) |
This function creates the padder text input file containing the input data (list of filenames and groupnames) and returns the path of the created file. More... | |
const char * | _writeScriptFile (const char *dataFileName, const char *configId) |
This function creates a shell script that runs padder with the specified data file, and returns the path of the created script file. More... | |
std::vector< std::string > * | _getResourceNames () |
Private Attributes | |
Engines::SalomeLauncher_var | _salomeLauncher |
Engines::ResourcesManager_var | _resourcesManager |
std::map< std::string, MESHJOB::ConfigParameter > | _configMap |
std::map< long, long > | _jobDateTimeMap |
std::map< long, MESHJOB::MeshJobPaths * > | _jobPathsMap |
std::string | _lastErrorMessage |
MeshJobManager_i::MeshJobManager_i | ( | CORBA::ORB_ptr | orb, |
PortableServer::POA_ptr | poa, | ||
PortableServer::ObjectId * | contId, | ||
const char * | instanceName, | ||
const char * | interfaceName | ||
) |
References _lastErrorMessage, _resourcesManager, _salomeLauncher, and LOG.
MeshJobManager_i::~MeshJobManager_i | ( | ) |
References LOG.
|
private |
References _resourcesManager, and LOG.
|
private |
This function creates the padder text input file containing the input data (list of filenames and groupnames) and returns the path of the created file.
This function is the one that knows the format of the padder input file. If the input file format changes, then this function (and only this one) should be updated. The file format is the following ([] means that the variable is optional):
[<concreteMeshFile> <concreteGroupName>] nbSteelBarMeshes <N> <steelBarMeshFile_1> <steelBarGroupName_1> <steelBarMeshFile_2> <steelBarGroupName_2> ... <steelBarMeshFile_N> <steelBarGroupName_N> <outputMedFile>
References DATAFILE(), LOCAL_INPUTDIR(), MESHJOB::MeshJobParameter::name, OUTPUTFILE(), SEPARATOR(), and MESHJOB::MeshJobParameter::value.
Referenced by initialize().
|
private |
This function creates a shell script that runs padder with the specified data file, and returns the path of the created script file.
The config id is used to retrieve the path to the binary file and other required files.
References _configMap, LOCAL_INPUTDIR(), and SCRIPTFILE().
Referenced by initialize().
bool MeshJobManager_i::clean | ( | CORBA::Long | jobId | ) |
Clean all data associated to this job and remove the job from the launch manager.
References getPaths(), MESHJOB::MeshJobPaths::local_inputdir, MESHJOB::MeshJobPaths::local_resultdir, LOG, and myStartsWith().
bool MeshJobManager_i::configure | ( | const char * | configId, |
const MESHJOB::ConfigParameter & | configParameter | ||
) |
References _configMap, and LOG.
MESHJOB::MeshJobResults * MeshJobManager_i::finalize | ( | CORBA::Long | jobId | ) |
char * MeshJobManager_i::getLastErrorMessage | ( | ) |
References _lastErrorMessage.
MESHJOB::MeshJobPaths * MeshJobManager_i::getPaths | ( | CORBA::Long | jobId | ) |
References _jobPathsMap, and LOG.
Referenced by clean(), and finalize().
char * MeshJobManager_i::getState | ( | CORBA::Long | jobId | ) |
Request the launch manager for the state of the specified job.
References _lastErrorMessage, _salomeLauncher, and LOG.
CORBA::Long MeshJobManager_i::initialize | ( | const MESHJOB::MeshJobFileList & | meshJobFileList, |
const MESHJOB::MeshJobParameterList & | meshJobParameterList, | ||
const char * | configId | ||
) |
Initialize a smesh computation job and return the job identifier.
References _configMap, _jobDateTimeMap, _jobPathsMap, _lastErrorMessage, _resourcesManager, _salomeLauncher, _writeDataFile(), _writeScriptFile(), fexists(), MESHJOB::MeshJobFile::file_name, MESHJOB::MeshJobFile::file_type, JOBID_UNDEFINED, MESHJOB::MeshJobPaths::local_inputdir, LOCAL_INPUTDIR(), MESHJOB::MeshJobPaths::local_resultdir, LOCAL_RESULTDIR(), LOG, MESHJOB::MED_CONCRETE, MESHJOB::MED_STEELBAR, OUTPUTFILE(), MESHJOB::MeshJobPaths::remote_workdir, REMOTE_WORKDIR(), and timetag().
bool MeshJobManager_i::start | ( | CORBA::Long | jobId | ) |
Submit the job execution and return true if submission is OK.
References _lastErrorMessage, _salomeLauncher, and LOG.
|
private |
Referenced by _writeScriptFile(), configure(), and initialize().
|
private |
Referenced by finalize(), and initialize().
|
private |
Referenced by getPaths(), and initialize().
|
private |
Referenced by finalize(), getLastErrorMessage(), getState(), initialize(), MeshJobManager_i(), and start().
|
private |
Referenced by _getResourceNames(), initialize(), and MeshJobManager_i().
|
private |
Referenced by finalize(), getState(), initialize(), MeshJobManager_i(), and start().
|
static |
Referenced by initialize().