Salome HOME
the dump state for batch of yacs file is optional
[modules/kernel.git] / src / Launcher / Launcher_Job_YACSFile.cxx
index 1126e90ab95c0adea097ae4e9795c78c366a162f..31bd4fe14f6348fee9ae897953b953ec062aa99d 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2009 CEA/DEN, EDF R&D
+//  Copyright (C) 2009-2010  CEA/DEN, EDF R&D
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-// Author: AndrĂ© RIBES - EDF R&D
 
+// Author: AndrĂ© RIBES - EDF R&D
+//
 #include "Launcher_Job_YACSFile.hxx"
 
 
-Launcher::Job_YACSFile::Job_YACSFile() {}
+Launcher::Job_YACSFile::Job_YACSFile() {_job_type = "yacs_file"; _dumpState=0;}
 
 Launcher::Job_YACSFile::~Job_YACSFile() {}
 
@@ -34,5 +35,14 @@ Launcher::Job_YACSFile::setJobFile(const std::string & job_file)
 void
 Launcher::Job_YACSFile::addJobTypeSpecificScript(std::ofstream & launch_script_stream)
 {
-  launch_script_stream << _resource_definition.AppliPath << "/runSession -p $appli_port driver " << _job_file_name_complete << " > logs/yacs_" << _launch_date << ".log 2>&1" << std::endl;
+  launch_script_stream << _resource_definition.AppliPath << "/runSession -p $appli_port driver " << _job_file_name_complete;
+  if(_dumpState > 0)
+    launch_script_stream << " --dump=" << _dumpState;
+  launch_script_stream << " > logs/yacs_" << _launch_date << ".log 2>&1" << std::endl;
+}
+
+void
+Launcher::Job_YACSFile::setDumpState(const int dumpState)
+{
+  _dumpState = dumpState;
 }