Index: /Interface_Web/trunk/pspaWT/include/GWt_pspaApplication.h
===================================================================
--- /Interface_Web/trunk/pspaWT/include/GWt_pspaApplication.h	(revision 226)
+++ /Interface_Web/trunk/pspaWT/include/GWt_pspaApplication.h	(revision 227)
@@ -38,5 +38,5 @@
  dataManager* dtmanage_;
  string nameOfCase_;
-
+ string workingDir_;
  WDialog* dialogSave_;
  WDialog* dialogOpen_;
Index: /Interface_Web/trunk/pspaWT/include/dataManager.h
===================================================================
--- /Interface_Web/trunk/pspaWT/include/dataManager.h	(revision 226)
+++ /Interface_Web/trunk/pspaWT/include/dataManager.h	(revision 227)
@@ -21,6 +21,6 @@
   vector<sectionToExecute*> jobList_;
 
-  bool createInputFileParmela( unsigned int numeroDeb, unsigned int numerpFin);
-  bool createInputFileTransport( unsigned int numeroDeb, unsigned int numeroFin);
+  bool createInputFileParmela( unsigned int numeroDeb, unsigned int numerpFin, string workingDir);
+  bool createInputFileTransport( unsigned int numeroDeb, unsigned int numeroFin, string workingDir);
   void removeFile(string nameOfFile); 
   void clearSectionToExecute();
@@ -48,11 +48,11 @@
   abstractElement* addElement(typedElement elemType);
   string getLabelFromElementNumero(int numero);
-  void initializeExecution();
+  void initializeExecution(string workingDir);
   string checkExecute();
-  bool executeTransport( unsigned int indexDeb, unsigned int indexFin, string& resul);
-  bool executeParmela( unsigned int indexDeb, unsigned int indexFin, string& resul);
-  bool executeAll(string& resul);
-  void saveConfiguration(string nameOfFile);
-  bool restoreElements(string inputFileName);
+  bool executeTransport( unsigned int indexDeb, unsigned int indexFin, string workingDir,  string& resul);
+  bool executeParmela( unsigned int indexDeb, unsigned int indexFin, string workingDir, string& resul);
+  bool executeAll(string workingDir, string& resul);
+  void saveConfiguration(string workingDir, string nameOfFile);
+  bool restoreElements(string workingDir, string inputFileName);
   void donneesRmsEnveloppe( string type, unsigned int numeroDeb, unsigned int numeroFin, vector<double>& xcor, vector<double>& ycor);
 };
Index: /Interface_Web/trunk/pspaWT/include/environmentVariables.h
===================================================================
--- /Interface_Web/trunk/pspaWT/include/environmentVariables.h	(revision 226)
+++ /Interface_Web/trunk/pspaWT/include/environmentVariables.h	(revision 227)
@@ -4,7 +4,7 @@
 #include <stdlib.h>
 #include <stdio.h>
-static string WHERE_WE_ARE = string(getenv("PWD"));
-static string WORKINGAREA =  WHERE_WE_ARE.append("/workingArea/");
-
+//static string WHERE_WE_ARE = string(getenv("PWD"));
+//static string WORKINGAREA =  WHERE_WE_ARE.append("/workingArea/");
+static string WORKINGAREA = "../workingArea/";
 #endif
 
Index: /Interface_Web/trunk/pspaWT/include/particleBeam.h
===================================================================
--- /Interface_Web/trunk/pspaWT/include/particleBeam.h	(revision 226)
+++ /Interface_Web/trunk/pspaWT/include/particleBeam.h	(revision 227)
@@ -63,8 +63,8 @@
   virtual ~particleBeam() {;}
 
-  bool setFromParmela(unsigned numeroElement,double referencefrequency);
+  bool setFromParmela(string workingDir,unsigned numeroElement,double referencefrequency);
   void buildMomentRepresentation();
 
-  bool  setFromTransport(string elementLabel, const nomdElements elem);
+  bool  setFromTransport(string workingDir, string elementLabel, const nomdElements elem);
 
   //  void setFromBeamParameters(double x, double xp, double y, double yp, double dl, double del, double P0);
Index: /Interface_Web/trunk/pspaWT/src/GWt_pspaApplication.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/src/GWt_pspaApplication.cc	(revision 226)
+++ /Interface_Web/trunk/pspaWT/src/GWt_pspaApplication.cc	(revision 227)
@@ -42,4 +42,6 @@
 PspaApplication::PspaApplication(const WEnvironment& env) : WApplication(env)
 {
+
+  workingDir_ = WApplication::appRoot()+ WORKINGAREA;
   nameOfCase_ = "pspa"; // default
 
@@ -403,5 +405,5 @@
 {
   bool caMarche = true;
-  dtmanage_->initializeExecution();
+  dtmanage_->initializeExecution(workingDir_);
   
   list<GWt_sectionToExecute*>::iterator itr;
@@ -450,5 +452,5 @@
 
   string resultat;
-  if ( !dtmanage_->executeAll(resultat)) {
+  if ( !dtmanage_->executeAll(workingDir_, resultat)) {
     GWt_dialog warningDialog("PSPA : Echec", " echec lors de l'exécution !", GWt_dialog::Error, true,true);
     warningDialog.exec();
@@ -484,5 +486,5 @@
 {
   if ( code != Wt::WDialog::Accepted ) { GWt_tools::addConsoleMessage(" pas de sauvegarde"); return;}
-  else { GWt_tools::addConsoleMessage("sauvegarde sur repertoire : " + WORKINGAREA);}
+  else { GWt_tools::addConsoleMessage("sauvegarde sur repertoire : " + workingDir_);}
   nameOfCase_ = saveNameEdit_->text().toUTF8();
   cout << " PspaApplication::dialogSaveDone() nameOfCase_= " << nameOfCase_ << endl;
@@ -491,5 +493,6 @@
   GWt_globalParameters* bibi = static_cast<GWt_globalParameters*>(globalParam_);
   bibi->updateGlobals();
-  dtmanage_->saveConfiguration(nameOfCase_);
+  //  dtmanage_->saveConfiguration(nameOfCase_);
+  dtmanage_->saveConfiguration(workingDir_ ,  nameOfCase_);
 }
 
@@ -514,5 +517,5 @@
 
   if ( code != Wt::WDialog::Accepted ) { GWt_tools::addConsoleMessage(" pas de restauration"); return;}
-  else { GWt_tools::addConsoleMessage("restauration depuis le repertoire " + WORKINGAREA);}
+  else { GWt_tools::addConsoleMessage("restauration depuis le repertoire " + workingDir_ );}
 
   nameOfCase_ = openNameEdit_->text().toUTF8();
@@ -521,5 +524,5 @@
   dialogSave_ = NULL;
 
-  bool test = dtmanage_->restoreElements(WORKINGAREA +  nameOfCase_ +".save");
+  bool test = dtmanage_->restoreElements(workingDir_,  nameOfCase_);
   if ( !test ) {
 	GWt_dialog restoreWarning(" element restoring", "failure in restoring elements !", GWt_dialog::Error, false,true);
@@ -582,5 +585,5 @@
       GWt_tools::addConsoleMessage(string("restauration..."));
 
-      if ( !dtmanage_->restoreElements(uploadFileSelectorWidget_->spoolFileName()) ) {
+      if ( !dtmanage_->restoreElements(workingDir_, uploadFileSelectorWidget_->spoolFileName()) ) {
 	GWt_dialog restoreWarning(" element restoring", "failure in restoring elements !", GWt_dialog::Error, false,true);
 	restoreWarning.exec();
@@ -748,5 +751,5 @@
  chart->paint(p);
  std::string name;
- name = WORKINGAREA+"/chart-"+sessionId ()+".png";
+ name = workingDir_ + "/chart-"+sessionId ()+".png";
  std::ofstream f(name.c_str(), std::ios::out |std::ios::trunc | std::ios::binary);
  pngImage.write(f);
@@ -830,5 +833,5 @@
  chart->paint(p);
  std::string name;
- name = WORKINGAREA+"/chart-"+sessionId ()+".png";
+ name = workingDir_ + "/chart-"+sessionId ()+".png";
  std::ofstream f(name.c_str(), std::ios::out |std::ios::trunc | std::ios::binary);
  pngImage.write(f);
Index: /Interface_Web/trunk/pspaWT/src/GWt_tools.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/src/GWt_tools.cc	(revision 226)
+++ /Interface_Web/trunk/pspaWT/src/GWt_tools.cc	(revision 227)
@@ -5,4 +5,5 @@
 
 WContainerWidget* GWt_tools::console_ = new WContainerWidget();
+
 void GWt_tools::addConsoleMessage(WString msg) {
   WText *w = new WText(console_);
Index: /Interface_Web/trunk/pspaWT/src/dataManager.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/src/dataManager.cc	(revision 226)
+++ /Interface_Web/trunk/pspaWT/src/dataManager.cc	(revision 227)
@@ -1,4 +1,4 @@
 #include "dataManager.h"
-#include "environmentVariables.h"
+//#include "environmentVariables.h"
 #include "transportMoments.h"
 
@@ -90,10 +90,10 @@
 }
 
-bool dataManager::executeTransport( unsigned int indexDeb, unsigned int indexFin, string& resul)
+bool dataManager::executeTransport( unsigned int indexDeb, unsigned int indexFin, string workingDir, string& resul)
 {
   ostringstream sortie;
   resul.clear();
   sortie << " EXECUTION DE TRANSPORT DE " << indexDeb << " a " << indexFin << endl;
-  if ( !createInputFileTransport( indexDeb, indexFin) )
+  if ( !createInputFileTransport( indexDeb, indexFin, workingDir) )
     {
       sortie << " error creating transport input file "  << endl;
@@ -105,7 +105,7 @@
   string bufString;
   char buf[132];
-  string transportJob = WORKINGAREA + "transport";
+  string transportJob = workingDir + "transport";
   transportJob += string(" <  ");
-  transportJob += WORKINGAREA + "transport.input";
+  transportJob += workingDir + "transport.input";
   //  transportJob += string(" >  ");
   //  transportJob += WORKINGAREA + "transport.output";
@@ -113,5 +113,5 @@
 
   ofstream outfile;
-  string nameOut = WORKINGAREA + "transport.output";
+  string nameOut = workingDir + "transport.output";
 
 
@@ -148,5 +148,5 @@
 	    string elemLabel = getLabelFromElementNumero (k);
 	    abstractElement* ptr = elementsGallery_.getElementPointerFromNumero(k);
-	    if (!diagnosticBeam_.back().setFromTransport(elemLabel, ptr->getNomdElement() )  )
+	    if (!diagnosticBeam_.back().setFromTransport(workingDir, elemLabel, ptr->getNomdElement() )  )
 	      {
 		sortie << " reading transport output  failed " << endl;
@@ -164,10 +164,10 @@
 }
 
-bool  dataManager::executeParmela(unsigned int indexDeb,unsigned int indexFin,string& resul)
+bool  dataManager::executeParmela(unsigned int indexDeb,unsigned int indexFin,string workingDir,string& resul)
 {
   ostringstream sortie;
   bool ExecuteStatus = true;
   resul.clear();
-  if ( !createInputFileParmela(indexDeb,indexFin) )
+  if ( !createInputFileParmela(indexDeb,indexFin, workingDir) )
     {
       sortie << " error creating parmela input file "  << endl;
@@ -179,7 +179,7 @@
 
   char buf[132];
-  string parmelaJob = WORKINGAREA + "parmela";
+  string parmelaJob = workingDir + "parmela";
   parmelaJob += string("   ");
-  parmelaJob += WORKINGAREA;
+  parmelaJob += workingDir;
   cout << " job parmela= " << parmelaJob << endl;
   FILE* pp = popen(parmelaJob.c_str(), "r");
@@ -207,5 +207,5 @@
 	  {
 	    diagnosticBeam_.push_back(particleBeam());
-	    if (! diagnosticBeam_.back().setFromParmela(k, globParam_.getFrequency()) )
+	    if (! diagnosticBeam_.back().setFromParmela(workingDir, k, globParam_.getFrequency()) )
 	      {
 		sortie << " reading parmdesz  failed " << endl;
@@ -224,5 +224,5 @@
 }
 
-bool dataManager::createInputFileTransport( unsigned int numeroDeb, unsigned int numeroFin)
+bool dataManager::createInputFileTransport( unsigned int numeroDeb, unsigned int numeroFin, string workingDir)
 {
   unsigned int k;
@@ -246,5 +246,5 @@
 
   ofstream outfile;
-  string name = WORKINGAREA + "transport.input";
+  string name = workingDir + "transport.input";
   outfile.open(name.c_str(), ios::out);
   if (!outfile) 
@@ -309,5 +309,5 @@
 }
 
-bool dataManager::createInputFileParmela( unsigned int numeroDeb, unsigned int numeroFin)
+bool dataManager::createInputFileParmela( unsigned int numeroDeb, unsigned int numeroFin, string workingDir)
 {
   unsigned int k;
@@ -323,5 +323,5 @@
 
   ofstream outfile;
-  string name = WORKINGAREA + "parmin";
+  string name = workingDir + "parmin";
   outfile.open(name.c_str(), ios::out);
   if (!outfile) {
@@ -361,10 +361,10 @@
 }
 
-void dataManager::initializeExecution()
-{
-  removeFile("parmdesz");
-  removeFile("parmin");
-  removeFile("transport.input");
-  removeFile("transport.output");
+void dataManager::initializeExecution(string workingDir)
+{
+  removeFile(workingDir + "parmdesz");
+  removeFile(workingDir + "parmin");
+  removeFile(workingDir + "transport.input");
+  removeFile(workingDir + "transport.output");
   diagnosticBeam_.clear();
   currentBeam_ = NULL;
@@ -375,13 +375,12 @@
 {
   ifstream fileExists;
-  string completeName = WORKINGAREA + nameOfFile;
-  fileExists.open(completeName.c_str(), ios::in);
+  fileExists.open(nameOfFile.c_str(), ios::in);
   if (fileExists) {
     fileExists.close();
-    remove(completeName.c_str());
-  }
-}
-
-bool dataManager::executeAll(string &resul)
+    remove(nameOfFile.c_str());
+  }
+}
+
+bool dataManager::executeAll(string workingDir, string &resul)
 {
   bool success = true;
@@ -397,7 +396,7 @@
 
       if(jobList_[k]->software == nomDeLogiciel::parmela) {
-	success = executeParmela( debut, fin, resultatPartiel);
+	success = executeParmela( debut, fin, workingDir, resultatPartiel);
       } else if (jobList_[k]->software == nomDeLogiciel::transport) {
-	success = executeTransport( debut, fin, resultatPartiel);
+	success = executeTransport( debut, fin, workingDir, resultatPartiel);
       } else {
 	success = false;
@@ -411,8 +410,8 @@
 }
 
-void dataManager::saveConfiguration(string nameOfFile)
+void dataManager::saveConfiguration(string workingDir, string nameOfFile)
 {
   ofstream outfile;
-  string name = WORKINGAREA + nameOfFile + ".save";
+  string name = workingDir + nameOfFile + ".save";
   outfile.open(name.c_str(), ios::out);
   if (!outfile) {
@@ -431,15 +430,15 @@
 }
 
-bool dataManager::restoreElements(string inputFileName)
+bool dataManager::restoreElements(string workingDir, string inputFileName)
 {
   cout << "dataManager::restoreElements() fichier " << inputFileName << endl;
   ifstream infile;
-  //  string name = WORKINGAREA + "pspa.save";
-  infile.open(inputFileName.c_str(), ios::in);
+   string name = workingDir + inputFileName + ".save";
+  infile.open(name.c_str(), ios::in);
   if (!infile) {
-    cerr << " error opening input stream " << inputFileName << endl;
-    return false;
-  }
-  else cout << " successful opening input stream " << inputFileName << endl;
+    cerr << " error opening input stream " << name << endl;
+    return false;
+  }
+  else cout << " successful opening input stream " << name << endl;
 
   string globalTitle;
Index: /Interface_Web/trunk/pspaWT/src/particleBeam.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/src/particleBeam.cc	(revision 226)
+++ /Interface_Web/trunk/pspaWT/src/particleBeam.cc	(revision 227)
@@ -6,5 +6,6 @@
 #include <algorithm>
 
-#include "environmentVariables.h"
+//#include "environmentVariables.h"
+#include <Wt/WApplication>
 
 
@@ -94,5 +95,5 @@
 
 
-bool  particleBeam::setFromTransport(string elLab, const nomdElements elem)
+bool  particleBeam::setFromTransport(string workingDir, string elLab, const nomdElements elem)
 {
   string elementLabel = elLab;
@@ -104,5 +105,6 @@
   string buf;
   ifstream infile;
-  string nameIn = WORKINGAREA + "transport.output";
+  //  string nameIn = WORKINGAREA + "transport.output";
+  string nameIn = workingDir + "transport.output";
   infile.open(nameIn.c_str(), ios::in);
   if (!infile) {
@@ -139,8 +141,8 @@
 
 
-bool particleBeam::setFromParmela(unsigned numeroElement, double referencefrequency) {
+bool particleBeam::setFromParmela(string workingDir,unsigned numeroElement, double referencefrequency) {
   unsigned  k;
   FILE* filefais;
-  string nomfilefais = WORKINGAREA + "parmdesz";
+  string nomfilefais = workingDir + "parmdesz";
   cout << " nom fichier desz : " << nomfilefais << endl;
   filefais = fopen(nomfilefais.c_str(), "r");
