Index: /Interface_Web/trunk/pspaWT/History
===================================================================
--- /Interface_Web/trunk/pspaWT/History	(revision 358)
+++ /Interface_Web/trunk/pspaWT/History	(revision 359)
@@ -6,6 +6,37 @@
      =========================================================
 
+4 Mars : Laurent Garnier
+- pspa.css 
+  o Changement de styles sur les icones de la beamLine
+  o Ajout de style qui servirons plus tard
+- elementCell, elementDrift, elementBend, elementBeam, elementSnapshot, elementSoleno,
+  elementRfGun, elementFit, elementSnapshot :
+  o Ajout de registerAcceptableSoftware() et suppression de is_accepted_by_software() 
+    déplacé dans abstractElement
+- abstractElement : ajout de 
+  o setSoftware(nomDeLogiciel prog)
+  o getAbstractSoftware() 
+  o registerAcceptableSoftware(nomDeLogiciel abs)
+- dataManager.cc :
+  o  Suppression de checkExecute() et checkElementsForExec(). Dans la méthode 
+     GWt_softwarePanel::areDataCoherent(), elles sont remplacées par l'appel à
+     pspa_->getBeamLine()->getAbstractElement(i)->setSoftware(prog.getString() qui renvoie
+     false si on ne peux pas ajouter ce software avec cet élément.
+- GWt_softwarePanel.cc : Suppression de l'appel à checkExecute() (voir ci dessus)
+- GWt_ligneFaisceau : 
+  o Ajout de update()
+  o manageLineFaisceauLayout(), ajout d'un if (sur NULL pointer possible)
+- GWt_elementLigneFaisceau:
+  o  Ajout d'une variable privée : elementContainer_
+  o Suppression de la seconde ligne du tableau contenu dans cet élément
+  o setElementLabel : Mise à jour du tooltip
+  o mise a jour de la couleur de fond des sections
+- GWt_abstractElement
+  o Protection dans : updateLabelAndToolTipWidget()
+- softwareParmela  : ajout d'une protection sur NULL pointer dans createInputFile()
+- trivaluedBool.h : Changement des noms (confusions possibles) en TBoolError, TBoolIgnore, TBoolOk
 1er Mars : Laurent Garnier
 - Fix le bug sur le serveur : Mauvaise variable utilisée. Introduit le 26 février
+- Ajout d'un nouvel icone qui servira plus tard : advanced.png
 
 27 février 2013 Laurent Garnier
Index: /Interface_Web/trunk/pspaWT/htdocs/pspa.css
===================================================================
--- /Interface_Web/trunk/pspaWT/htdocs/pspa.css	(revision 358)
+++ /Interface_Web/trunk/pspaWT/htdocs/pspa.css	(revision 359)
@@ -57,6 +57,5 @@
   background-color: #FFFFFF;
   box-shadow: 0 1px 3px rgba(34, 25, 25, 0.4);
-  font-size: 11px;
-  padding: 15px 15px 0;
+  padding: 8px 8px;
   position: absolute;
   border-radius: 5px;
@@ -80,2 +79,82 @@
 	text-shadow: 0px 0px 1px #333;
 }
+
+
+
+
+.Button.WhiteButton.ContrastButton {
+    border: 0 none;
+    box-shadow: 0 1px rgba(255, 255, 255, 0.35) inset, 0 0 0 1px rgba(140, 126, 126, 0.5);
+}
+.pin .WhiteButton.Button11 {
+    border-radius: 6px 6px 6px 6px;
+    padding: 7px 9px;
+}
+
+
+element.style.div {
+    left: -8px;
+    position: static;
+    top: -8px;
+    z-index: 3;
+    top: auto;
+}
+
+.beamLineElementActions element.style.div{
+    left: -8px;
+    position: static;
+    top: -8px;
+    z-index: 3;
+    top: auto;
+}
+
+.beamLineElementActions {
+    left: -8px;
+    position: static;
+    top: -8px;
+    z-index: 3;
+    top: auto;
+}
+
+.Button.WhiteButton, .repin_memo_on .pin:hover .beamLineElementActions .repin_link {
+    background-color: #F0EDED;
+    background-image: -moz-linear-gradient(center top , #FDFAFB, #F9F7F7 50%, #F6F3F4 50%, #F0EDED);
+    border-color: #BBBBBB;
+    color: #524D4D;
+    text-shadow: 0 1px rgba(255, 255, 255, 0.9);
+}
+.Button.Button11 {
+    border-radius: 3px 3px 3px 3px;
+}
+.beamLineElementActions .likebutton, .beamLineElementActions .comment, .beamLineElementActions .repin_link, .beamLineElementActions .editbutton, .beamLineElementActions .software {
+    display: none;
+}
+
+.beamLineElementActions .parameters {
+    background-image: url("advanced.png");
+    background-repeat: no;
+}
+
+.Button {
+    border: 1px solid transparent;
+    border-radius: 0.3em 0.3em 0.3em 0.3em;
+    box-shadow: 0 1px rgba(255, 255, 255, 0.8), 0 1px rgba(255, 255, 255, 0.35) inset;
+    cursor: pointer;
+    display: inline-block;
+    font-family: "helvetica neue",arial,sans-serif;
+    font-weight: bold;
+    line-height: 1em;
+    margin: 0;
+    padding: 0.45em 0.825em;
+    text-align: center;
+    transition: all 0.05s ease-in-out 0s;
+}
+*|*:-moz-any-link:not(svg|a) {
+    text-decoration: underline;
+}
+*|*:link {
+    color: #FF6666;
+}
+:-moz-any-link {
+    cursor: pointer;
+}
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/abstractElement.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/abstractElement.h	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/abstractElement.h	(revision 359)
@@ -9,4 +9,9 @@
 #include "nomDeLogiciel.h"
 #include "trivaluedBool.h"
+#include "abstractSoftware.h"
+#include "softwareGenerator.h"
+#include "softwareParmela.h"
+#include "softwareTest.h"
+#include "softwareTransport.h"
 
 using namespace std;
@@ -54,5 +59,7 @@
     double getLenghtOfElement() const;
     int getNbParams() const;
-    virtual trivaluedBool is_accepted_by_software(nomDeLogiciel soft) const;
+
+    trivaluedBool is_accepted_by_software(nomDeLogiciel soft);
+    
     virtual void setPhaseStep(double);
     virtual double getInitialKineticEnergy() const;
@@ -66,4 +73,32 @@
     virtual void FileInput(ifstream& ifs) = 0;
     virtual string print() = 0;
+
+    /** Return the abstractSofware associated with this element
+     */
+    inline abstractSoftware* getAbstractSoftware() {
+        return abstractSoftware_;
+    }
+    
+    
+    void registerAcceptableSoftware(nomDeLogiciel abs,trivaluedBool b);
+    /**
+     Set the software to this element
+     @param abstractName the name of the abstract software
+     @return trivaluedBool if this software is/not allowed/ignore on this component
+     */
+    trivaluedBool setSoftware(nomDeLogiciel abstractName);
+    
+    private :
+    abstractSoftware *abstractSoftware_;
+
+    /**
+     Acceptable software list for this element
+     */
+    std::vector <nomDeLogiciel> acceptableSoftware_;
+
+    /**
+     Ignore software list for this element
+     */
+    std::vector <nomDeLogiciel> ignoreSoftware_;
 };
 #endif
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/dataManager.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/dataManager.h	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/dataManager.h	(revision 359)
@@ -12,4 +12,5 @@
 #include "beam2Moments.h"
 #include "parmelaParticle.h"
+#include "nomDeLogiciel.h"
 
 class PspaApplication;
@@ -31,6 +32,6 @@
     
   void addSectionToExecute(int debut, int fin, nomDeLogiciel prog);
-    
-  abstractElement* addElement(typedElement elemType);
+
+    abstractElement* addElement(typedElement elemType);
   void removeElement(string);
   
@@ -46,9 +47,9 @@
   */
   int getNumeroFromElementLabel(string);
-  abstractElement* getElementPointerFromNumero(int);
+    abstractElement*  getElementPointerFromNumero(int);
   
   void initializeExecution();
-  trivaluedBool checkExecute(string& diagnostic);
-  trivaluedBool checkElementsForExec(nomDeLogiciel logiciel, unsigned indexDeb, unsigned indexFin, string& diagnostic);
+//  trivaluedBool checkExecute(string& diagnostic);
+//  trivaluedBool checkElementsForExec(nomDeLogiciel logiciel, unsigned indexDeb, unsigned indexFin, string& diagnostic);
   bool executeAll();
  
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/elementBeam.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/elementBeam.h	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/elementBeam.h	(revision 359)
@@ -30,6 +30,4 @@
     ~elementBeam();
     
-    virtual  trivaluedBool is_accepted_by_software(nomDeLogiciel soft) const;
-    
     
     virtual void setParametersString(string* param);
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/elementBend.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/elementBend.h	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/elementBend.h	(revision 359)
@@ -42,8 +42,5 @@
     
     double getLenghtOfElement() const;
-    
-    virtual trivaluedBool is_accepted_by_software(nomDeLogiciel soft) const;
-    
-    
+        
     virtual void setParametersString(string* param);
     
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/elementCell.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/elementCell.h	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/elementCell.h	(revision 359)
@@ -46,6 +46,4 @@
     ~elementCell() { ;}
     
-    virtual trivaluedBool is_accepted_by_software(nomDeLogiciel soft) const;
-    
     virtual string* getParametersString() const;
     
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/elementDrift.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/elementDrift.h	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/elementDrift.h	(revision 359)
@@ -20,6 +20,4 @@
     
     ~elementDrift() {;}
-    
-    virtual trivaluedBool is_accepted_by_software(nomDeLogiciel soft) const;
     
     
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/elementFit.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/elementFit.h	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/elementFit.h	(revision 359)
@@ -29,6 +29,4 @@
     ~elementFit() {;}
     
-    virtual  trivaluedBool is_accepted_by_software(nomDeLogiciel soft) const;
-    
     
     virtual void setParametersString(string* param);
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/elementRfgun.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/elementRfgun.h	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/elementRfgun.h	(revision 359)
@@ -46,6 +46,4 @@
     ~elementRfgun() {;}
     
-    virtual  trivaluedBool is_accepted_by_software(nomDeLogiciel soft) const;
-    
     virtual void setPhaseStep(double ph) { phaseStep_ = ph;}
     
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/elementSnapshot.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/elementSnapshot.h	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/elementSnapshot.h	(revision 359)
@@ -18,5 +18,4 @@
   ~elementSnapshot() {;}
   
-  virtual trivaluedBool is_accepted_by_software(nomDeLogiciel soft) const;
   virtual string* getParametersString() const;
   virtual void setParametersString(string* param);
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/elementSoleno.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/elementSoleno.h	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/elementSoleno.h	(revision 359)
@@ -32,6 +32,4 @@
     ~elementSoleno() {;}
     
-    virtual trivaluedBool is_accepted_by_software(nomDeLogiciel soft) const;
-    
     virtual void setParametersString(string* param);
     
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/softwareGenerator.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/softwareGenerator.h	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/softwareGenerator.h	(revision 359)
@@ -4,5 +4,4 @@
 
 #include "abstractSoftware.h"
-#include "dataManager.h"
 
 class softwareGenerator : public abstractSoftware
@@ -13,6 +12,4 @@
 
 
-softwareGenerator();
- 
  bool beamFromGenerator(string beamFileName, string workingDir, vector<double>& centroid, bareParticle& refPart,vector<bareParticle>& particles, vector<bareParticle>& passiveParticles );
 
@@ -20,5 +17,7 @@
 
 
- softwareGenerator(string inputFileName, globalParameters* globals, dataManager* dt);
+    softwareGenerator();
+    
+    softwareGenerator(string inputFileName, globalParameters* globals, dataManager* dt);
 
   virtual ~softwareGenerator() {;}
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/softwareParmela.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/softwareParmela.h	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/softwareParmela.h	(revision 359)
@@ -14,6 +14,4 @@
 
 
-  softwareParmela();
-
   bool beamFromParmela(string workingDir,unsigned numeroElement, double referencefrequency, vector<double>& centroid, bareParticle& refPart,vector<bareParticle>& particles );
 
@@ -21,5 +19,7 @@
 
  public : 
-  softwareParmela(string inputFileName, globalParameters* globals, dataManager* beamLine);
+    softwareParmela();
+    
+    softwareParmela(string inputFileName, globalParameters* globals, dataManager* beamLine);
 
   virtual ~softwareParmela() {;}
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/softwareTest.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/softwareTest.h	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/softwareTest.h	(revision 359)
@@ -11,6 +11,4 @@
  protected : 
 
-  softwareTest();
-
   bool beamToParin(string workingDir, particleBeam* beam );
   bool beamFromParin(string workingDir, vector<bareParticle>& particles );
@@ -18,5 +16,7 @@
  public :
 
-softwareTest(string inputFileName, globalParameters* globals, dataManager* );
+    softwareTest();
+    
+    softwareTest(string inputFileName, globalParameters* globals, dataManager* );
 
   virtual ~softwareTest() {;}
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/softwareTransport.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/softwareTransport.h	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/softwareTransport.h	(revision 359)
@@ -7,12 +7,11 @@
 {
 
- protected : 
-
-  softwareTransport();
+    protected :
 
   bool  moments2FromTransport(string workingDir, string elLab, const nomdElements elem, beam2Moments& moments) const;
 
  public : 
-  softwareTransport(string inputFileName, globalParameters* globals, dataManager* beamLine);
+    softwareTransport();
+    softwareTransport(string inputFileName, globalParameters* globals, dataManager* beamLine);
 
   virtual ~softwareTransport() {;}
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/trivaluedBool.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/trivaluedBool.h	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/trivaluedBool.h	(revision 359)
@@ -2,5 +2,5 @@
 #define TRIVALUEDBOOL_SEEN
 
-enum trivaluedBool {error, warning, ok};
+enum trivaluedBool {TBoolError, TBoolIgnore, TBoolOk};
 
 #endif
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/abstractElement.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/abstractElement.cc	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/abstractElement.cc	(revision 359)
@@ -4,4 +4,5 @@
 
 abstractElement::abstractElement() 
+: abstractSoftware_(NULL)
 {
   setDefaultValues();
@@ -76,8 +77,21 @@
 }
 
-trivaluedBool abstractElement::is_accepted_by_software(nomDeLogiciel soft) const {
-  cout << " abstractElement : generic method is_accepted_by_software()  " << endl;
-  return error;
+
+trivaluedBool abstractElement::is_accepted_by_software(nomDeLogiciel prog) {
+    if (acceptableSoftware_.size() == 0) {
+        return TBoolError;
+    }
+
+    if ( std::find(acceptableSoftware_.begin(), acceptableSoftware_.end(), prog) != acceptableSoftware_.end()) {
+        return TBoolOk;
+    } else if ( std::find(ignoreSoftware_.begin(), ignoreSoftware_.end(), prog) != ignoreSoftware_.end()) {
+        return TBoolIgnore;
+    } else {
+        return TBoolError;
+    }
+
+    return TBoolOk;
 }
+
 
 double abstractElement::getInitialKineticEnergy() const {
@@ -89,2 +103,36 @@
   return "";
 }
+
+trivaluedBool abstractElement::setSoftware(nomDeLogiciel prog) {
+    if (acceptableSoftware_.size() == 0) {
+        return TBoolError;
+    }
+    
+    if ( std::find(acceptableSoftware_.begin(), acceptableSoftware_.end(), prog) != acceptableSoftware_.end()) {
+        if (prog == nomDeLogiciel::parmela){
+            abstractSoftware_ = new softwareParmela();
+        } else if (prog == nomDeLogiciel::transport) {
+            abstractSoftware_ = new softwareTransport();
+        } else if (prog == nomDeLogiciel::generator) {
+            abstractSoftware_ = new softwareGenerator();
+        } else if (prog == nomDeLogiciel::test) {
+            abstractSoftware_ = new softwareTest();
+        } else if (prog == nomDeLogiciel::unknownSoftware) {
+            abstractSoftware_ = NULL;
+        }
+    } else if ( std::find(ignoreSoftware_.begin(), ignoreSoftware_.end(), prog) != ignoreSoftware_.end()) {
+        return TBoolIgnore;
+    } else {
+        return TBoolError;
+    }
+    return TBoolOk;
+}
+
+
+void abstractElement::registerAcceptableSoftware(nomDeLogiciel abs,trivaluedBool b) {
+    if (b == TBoolIgnore) {
+        ignoreSoftware_.push_back(abs);
+    } else if (b == TBoolOk){
+        acceptableSoftware_.push_back(abs);
+    }
+}
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/dataManager.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/dataManager.cc	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/dataManager.cc	(revision 359)
@@ -14,21 +14,21 @@
 
 dataManager::dataManager(PspaApplication* pspa) :
-  currentBeam_(NULL),
-  pspa_ (pspa)
+currentBeam_(NULL),
+pspa_ (pspa)
 {}
 
-dataManager::~dataManager() 
-{
-  unsigned k;
-  for (k=0; k < jobList_.size();k++) {
-    if ( jobList_[k] != NULL ) delete jobList_[k];
-  }
-  if ( currentBeam_ == NULL ) delete currentBeam_;
+dataManager::~dataManager()
+{
+    unsigned k;
+    for (k=0; k < jobList_.size();k++) {
+        if ( jobList_[k] != NULL ) delete jobList_[k];
+    }
+    if ( currentBeam_ == NULL ) delete currentBeam_;
 }
 
 void dataManager::consoleMessage(string message) {
-  GWt_console* console = static_cast<GWt_console*> (wApp->findWidget ("console"));
-  if (console) console->addConsoleMessage(message);
-  pspa_->processEvents();
+    GWt_console* console = static_cast<GWt_console*> (wApp->findWidget ("console"));
+    if (console) console->addConsoleMessage(message);
+    pspa_->processEvents();
 }
 
@@ -43,17 +43,17 @@
 int dataManager::getNumeroFromElementLabel(string label)
 {
-  int index = -1;
-  
-  for (int k = 0; k < getBeamLineSize() ; k++)
+    int index = -1;
+    
+    for (int k = 0; k < getBeamLineSize() ; k++)
     {
-      if (pspa_->getBeamLine()->getAbstractElement(k) != NULL){
-	if ( pspa_->getBeamLine()->getAbstractElement(k)->getLabel() == label )
-	  {
-	    index = (int)k + 1;
-	    return index;
-	  }
-      }
-    }
-  return index;
+        if (pspa_->getBeamLine()->getAbstractElement(k) != NULL){
+            if ( pspa_->getBeamLine()->getAbstractElement(k)->getLabel() == label )
+            {
+                index = (int)k + 1;
+                return index;
+            }
+        }
+    }
+    return index;
 }
 
@@ -61,5 +61,5 @@
 abstractElement* dataManager::getElementPointerFromNumero(int k)
 {
-  return pspa_->getBeamLine()->getAbstractElement(k-1);
+    return pspa_->getBeamLine()->getAbstractElement(k-1);
 }
 
@@ -67,74 +67,26 @@
 void dataManager::addSectionToExecute(int debut, int fin, nomDeLogiciel prog)
 {
-  jobList_.push_back(new sectionToExecute);
-  jobList_.back()->firstElement = debut;
-  jobList_.back()->lastElement = fin;
-  jobList_.back()->software  = prog;
+    jobList_.push_back(new sectionToExecute);
+    jobList_.back()->firstElement = debut;
+    jobList_.back()->lastElement = fin;
+    jobList_.back()->software  = prog;
 }
 
 void dataManager::clearSectionToExecute()
 {
-  unsigned k;
-  for(k = 0; k < jobList_.size(); k++)
+    unsigned k;
+    for(k = 0; k < jobList_.size(); k++)
     {
-      if ( jobList_[k] != NULL ) delete jobList_[k];
-    }
-  jobList_.clear();
-}
-
-trivaluedBool dataManager::checkExecute(string& diagnostic)
-{
-  cout << "dataManager::checkExecute()" << endl;
-  consoleMessage(" VERIFICATION AVANT EXECUTION ");
-  
-  trivaluedBool resul = ok;
-  diagnostic.clear();
-  
-  for(unsigned k = 0; k < jobList_.size(); k++) {
-    
-    unsigned numeroDeb = jobList_[k]->firstElement;
-    unsigned numeroFin = jobList_[k]->lastElement;
-    
-    if ( numeroFin  < numeroDeb ) {
-      diagnostic += " last element before first for job " + (jobList_[k]->software).getString() + " \n";
-      resul = error;
-      break;
-    }
-
-    string checkCompatibility;
-    resul = checkElementsForExec(jobList_[k]->software,numeroDeb,numeroFin,checkCompatibility);
-    diagnostic += checkCompatibility;
-  } //k
-
-  return resul;
-}
-
-trivaluedBool dataManager::checkElementsForExec(nomDeLogiciel logiciel,unsigned numeroDeb,unsigned numeroFin,string& diagnostic)
-{
-  trivaluedBool resul = ok;
-  trivaluedBool accepted;
-
-  diagnostic.clear();  
-  abstractElement* elPtr;
-
-  for(unsigned j = numeroDeb; j <= numeroFin; j++) {
-    elPtr = pspa_->getBeamLine()->getAbstractElement(j-1);
-    accepted = elPtr->is_accepted_by_software(logiciel);
-
-    if(accepted == error) {
-      diagnostic += " the element " + elPtr->getNomdElement().getElementName() + " is not allowed with " + logiciel.getString() + " \n";
-      resul = error;
-    } else if (accepted  == warning) {
-      diagnostic += " the element " + elPtr->getNomdElement().getElementName() + " will be ignored by " + logiciel.getString() + " \n";
-      if ( resul != error ) resul = warning;
-    }
-  }
-
-  return resul;
-}
+        if ( jobList_[k] != NULL ) delete jobList_[k];
+    }
+    jobList_.clear();
+}
+
+
+
 
 void dataManager::initializeExecution()
 {
-  string workingDir = pspa_->getWorkingDir();
+    string workingDir = pspa_->getWorkingDir();
     if (workingDir == "") {
         return;
@@ -165,51 +117,51 @@
 bool dataManager::executeAll()
 {
-  bool success = true;
-  abstractSoftware* softw = NULL;
-  string workingDir = pspa_->getWorkingDir();
-
-  for(unsigned k = 0; k < jobList_.size(); k++)
-    { 
-      cout << " dataManager::executeAll je m'apprete a executer : " << (jobList_[k]->software).getString() << endl;
-      
-      int debut = jobList_[k]->firstElement;
-      int fin = jobList_[k]->lastElement;
-      softw = createSoftwareConnexion(jobList_[k]->software);
-      
-      if (softw == NULL) {
-	success = false;
-	consoleMessage("dataManager::executeAll : unknown software");
-	break;
-      }
-
-      success = softw->createInputFile(currentBeam_,debut,fin,workingDir);
-      if ( success ) {
-	success = softw->execute(debut,fin,workingDir);
-	if ( success ) {
-	  success = softw->buildBeamAfterElements(debut,fin,diagnosticBeam_,workingDir);
-	}
-      }
-      
-      delete softw;
-      if ( success ) {
-	currentBeam_ = &diagnosticBeam_.back();
-	cout << " execute termine avec succes " << endl;
-      } else {
-	currentBeam_ = NULL;
-	cout << " execute termine en ECHEC " << endl;
-      }
-      if ( !success ) break;
-  
-      //debug
-      cout << "dataManager::executeAll #diagnosticBeam= " << diagnosticBeam_.size() << endl;
-      cout << "dataManager::executeAll #getBeamLineSize()= " << getBeamLineSize() << endl;
-      for (int j = debut; j <= fin; j++) {
-	abstractElement* elPtr= getElementPointerFromNumero(j);
-	cout << "[" << j << "] " << elPtr->getNomdElement().getElementName() << endl;
-      } 
-
+    bool success = true;
+    abstractSoftware* softw = NULL;
+    string workingDir = pspa_->getWorkingDir();
+    
+    for(unsigned k = 0; k < jobList_.size(); k++)
+    {
+        cout << " dataManager::executeAll je m'apprete a executer : " << (jobList_[k]->software).getString() << endl;
+        
+        int debut = jobList_[k]->firstElement;
+        int fin = jobList_[k]->lastElement;
+        softw = createSoftwareConnexion(jobList_[k]->software);
+        
+        if (softw == NULL) {
+            success = false;
+            consoleMessage("dataManager::executeAll : unknown software");
+            break;
+        }
+        
+        success = softw->createInputFile(currentBeam_,debut,fin,workingDir);
+        if ( success ) {
+            success = softw->execute(debut,fin,workingDir);
+            if ( success ) {
+                success = softw->buildBeamAfterElements(debut,fin,diagnosticBeam_,workingDir);
+            }
+        }
+        
+        delete softw;
+        if ( success ) {
+            currentBeam_ = &diagnosticBeam_.back();
+            cout << " execute termine avec succes " << endl;
+        } else {
+            currentBeam_ = NULL;
+            cout << " execute termine en ECHEC " << endl;
+        }
+        if ( !success ) break;
+        
+        //debug
+        cout << "dataManager::executeAll #diagnosticBeam= " << diagnosticBeam_.size() << endl;
+        cout << "dataManager::executeAll #getBeamLineSize()= " << getBeamLineSize() << endl;
+        for (int j = debut; j <= fin; j++) {
+            abstractElement* elPtr= getElementPointerFromNumero(j);
+            cout << "[" << j << "] " << elPtr->getNomdElement().getElementName() << endl;
+        }
+        
     } //k
-  
-  return success;
+    
+    return success;
 }
 
@@ -222,5 +174,5 @@
     cout << " et qu'on puisse restaurer normalement" << endl;
     string name = pspa_->getWorkingDir() + "/" + nameOfFile + ".save";
-
+    
     // make dir if not exist
     boost::filesystem::create_directories(pspa_->getWorkingDir() + folder + "/");
@@ -230,13 +182,13 @@
         cerr << " error opening output file for persistency " << name << endl;
     }
-  
-  outfile << globParam_.FileOutputFlow();
-  abstractElement* elPtr;
-  for(unsigned k = 0; k < getBeamLineSize() ; k++)
+    
+    outfile << globParam_.FileOutputFlow();
+    abstractElement* elPtr;
+    for(unsigned k = 0; k < getBeamLineSize() ; k++)
     {
-      elPtr = pspa_->getBeamLine()->getAbstractElement(k);
-      outfile << elPtr->FileOutputFlow();
-    }
-  outfile.close();
+        elPtr = pspa_->getBeamLine()->getAbstractElement(k);
+        outfile << elPtr->FileOutputFlow();
+    }
+    outfile.close();
 }
 
@@ -283,9 +235,9 @@
     }
     infile.close();
-
+    
     // debug
     // unsigned k;
     // for(k = 0; k < getBeamLineSize(); k++) {
-    //     abstractElement* ptr = pspa_->getBeamLine()->getAbstractElement(k);        
+    //     abstractElement* ptr = pspa_->getBeamLine()->getAbstractElement(k);
     //     cout << "reupere " << ptr->getLabel() << endl;
     // }
@@ -295,9 +247,9 @@
 particleBeam* dataManager::getDiagnosticBeam(unsigned index)
 {
-  if (index >= diagnosticBeam_.size()) {
-    return NULL;
-  } else {
-    return &diagnosticBeam_.at(index);
-  }
+    if (index >= diagnosticBeam_.size()) {
+        return NULL;
+    } else {
+        return &diagnosticBeam_.at(index);
+    }
 }
 
@@ -331,4 +283,5 @@
 // }
 
+
 // on ne tient pas compte des elements "snapshot" presents dans la beamLine
 void dataManager::donneesRmsEnveloppe(string type,vector<double>& xcor,vector<double>& ycor)
@@ -358,30 +311,27 @@
       i++;
     }
-  } else {
-    cerr << " dataManager::donneesRmsEnveloppe type " << type << " not programmed " << endl;
-    return;
   }
 }
 
 int dataManager::getBeamLineSize() {
-  return pspa_->getBeamLine()->getBeamLineSize();
-}
-
-abstractSoftware* dataManager::createSoftwareConnexion(nomDeLogiciel logi) 
-{
-  string inputFileName;
-  if(logi == nomDeLogiciel::parmela) {
-    inputFileName = "parmin";
-    return new softwareParmela(inputFileName, &globParam_, this);
-  } else if (logi == nomDeLogiciel::transport) {
-    inputFileName = "transport.input";
-    return new softwareTransport(inputFileName, &globParam_, this);
-  } else if (logi == nomDeLogiciel::generator) {
-    inputFileName = "generator.in";
-    return new softwareGenerator(inputFileName, &globParam_, this);
-  } else if (logi == nomDeLogiciel::test) {
-    return new softwareTest(inputFileName, &globParam_, this);
-  } else {
-    return NULL;
-  } 
-}
+    return pspa_->getBeamLine()->getBeamLineSize();
+}
+
+abstractSoftware* dataManager::createSoftwareConnexion(nomDeLogiciel logi)
+{
+    string inputFileName;
+    if(logi == nomDeLogiciel::parmela) {
+        inputFileName = "parmin";
+        return new softwareParmela(inputFileName, &globParam_, this);
+    } else if (logi == nomDeLogiciel::transport) {
+        inputFileName = "transport.input";
+        return new softwareTransport(inputFileName, &globParam_, this);
+    } else if (logi == nomDeLogiciel::generator) {
+        inputFileName = "generator.in";
+        return new softwareGenerator(inputFileName, &globParam_, this);
+    } else if (logi == nomDeLogiciel::test) {
+        return new softwareTest(inputFileName, &globParam_, this);
+    } else {
+        return NULL;
+    }
+}
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/elementBeam.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/elementBeam.cc	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/elementBeam.cc	(revision 359)
@@ -10,4 +10,5 @@
     parametersString_ = new string[nbParam_+1];
     //  transportOk_ = true;
+    registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk);
 }
 
@@ -36,8 +37,4 @@
 }
 
-trivaluedBool elementBeam::is_accepted_by_software(nomDeLogiciel soft) const {
-    if ( soft == nomDeLogiciel::transport ) return ok;
-    else return error;
-}
 
 string* elementBeam::getParametersString() const {
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/elementBend.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/elementBend.cc	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/elementBend.cc	(revision 359)
@@ -13,4 +13,6 @@
   // transportOk_ = true;
   // parmelaOk_ = true;
+    registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk);
+    registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolOk);
 }
 
@@ -56,10 +58,4 @@
 {
  return 1.0e2 * radius_ * angleDeg_ * DEG_TO_RADIANS; 
-}
-
-trivaluedBool elementBend::is_accepted_by_software(nomDeLogiciel soft) const {
-  if ( soft == nomDeLogiciel::transport  ) return ok;
-  else if ( soft == nomDeLogiciel::parmela ) return ok;
-  else return error;
 }
 
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/elementCell.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/elementCell.cc	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/elementCell.cc	(revision 359)
@@ -15,8 +15,9 @@
       parametersString_ = new string[nbParam_+1];
       //      parmelaOk_ = true;
+        registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolOk);
     }
 
-  void elementCell::setDefaultValues()
-  {
+void elementCell::setDefaultValues()
+{
     defaultLabel_ = "cell";
     initialPhaseDef_ = 0.0;
@@ -26,8 +27,8 @@
     offsetMagDef_ = 0.0;
     scaleFactorDef_ = 1.0;
-  }
+}
 
-  void elementCell::setDefaults()
-  {
+void elementCell::setDefaults()
+{
     label_ = defaultLabel_;
     initialPhase_ = initialPhaseDef_;
@@ -39,8 +40,4 @@
   }
 
-trivaluedBool elementCell::is_accepted_by_software(nomDeLogiciel soft) const {
-  if ( soft == nomDeLogiciel::parmela ) return ok;
-  else return error;
-}
 
   string* elementCell::getParametersString() const 
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/elementDrift.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/elementDrift.cc	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/elementDrift.cc	(revision 359)
@@ -13,4 +13,8 @@
   nbParam_ = elementName_.getElementNbParameters();
   parametersString_ = new string[nbParam_+1];
+    registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk);
+    registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolOk);
+    registerAcceptableSoftware(nomDeLogiciel::test, TBoolOk);
+
 }
 
@@ -23,12 +27,4 @@
     label_ = defaultLabel_;
   }
-
-
-trivaluedBool elementDrift::is_accepted_by_software(nomDeLogiciel soft) const {
-  if ( soft == nomDeLogiciel::transport  ) return ok;
-  else if ( soft == nomDeLogiciel::parmela ) return ok;
-  else if ( soft == nomDeLogiciel::test ) return ok;
-  else return error;
-}
 
 
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/elementFit.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/elementFit.cc	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/elementFit.cc	(revision 359)
@@ -11,4 +11,6 @@
     // transportOk_ = true;
     // parmelaIgnored_ = true;
+    registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk);
+    registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolIgnore);
 }
 
@@ -29,9 +31,4 @@
 }
 
-trivaluedBool elementFit::is_accepted_by_software(nomDeLogiciel soft) const {
-    if ( soft == nomDeLogiciel::transport ) return ok;
-    else if ( soft == nomDeLogiciel::parmela ) return warning;
-    else return error;
-}
 
 
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/elementRfgun.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/elementRfgun.cc	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/elementRfgun.cc	(revision 359)
@@ -8,15 +8,17 @@
 
 elementRfgun::elementRfgun() : abstractElement() 
-    {
-      setDefaultValues();
-      setDefaults();
-      elementName_ = nomdElements("rfgun");
-      nbParam_ = elementName_.getElementNbParameters();
-      parametersString_ = new string[nbParam_+1];
-      //      parmelaOk_ = true;
-    }
+{
+    setDefaultValues();
+    setDefaults();
+    elementName_ = nomdElements("rfgun");
+    nbParam_ = elementName_.getElementNbParameters();
+    parametersString_ = new string[nbParam_+1];
+    //      parmelaOk_ = true;
+    registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolOk);
+    registerAcceptableSoftware(nomDeLogiciel::generator, TBoolOk);
+}
 
-  void elementRfgun::setDefaultValues()
-  {
+void elementRfgun::setDefaultValues()
+{
     defaultLabel_ = "rfgun";
     defaultPhaseStep_ = 1.0;
@@ -47,12 +49,6 @@
   }
 
-trivaluedBool elementRfgun::is_accepted_by_software(nomDeLogiciel soft) const {
-  cout << " elementRfgun : c'est le bon is_accepted_by_software " << endl;
-  if ( soft == nomDeLogiciel::parmela ) return ok;
-  else if ( soft == nomDeLogiciel::generator ) return ok;
-  else return error;
-}
 
- string* elementRfgun::getParametersString() const 
+string* elementRfgun::getParametersString() const
   {
    int compteur = -1;
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/elementSnapshot.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/elementSnapshot.cc	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/elementSnapshot.cc	(revision 359)
@@ -6,9 +6,13 @@
 elementSnapshot::elementSnapshot() : abstractElement() 
 {
-  setDefaultValues();
-  setDefaults();
-  elementName_ = nomdElements("snapshot");
-  nbParam_ = elementName_.getElementNbParameters();
-  parametersString_ = new string[nbParam_+1];
+    setDefaultValues();
+    setDefaults();
+    elementName_ = nomdElements("snapshot");
+    nbParam_ = elementName_.getElementNbParameters();
+    parametersString_ = new string[nbParam_+1];
+    registerAcceptableSoftware(nomDeLogiciel::transport, TBoolIgnore);
+    registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolIgnore);
+    registerAcceptableSoftware(nomDeLogiciel::generator, TBoolIgnore);
+    registerAcceptableSoftware(nomDeLogiciel::test, TBoolIgnore);
 }
 
@@ -23,8 +27,4 @@
 }
 
-trivaluedBool elementSnapshot::is_accepted_by_software(nomDeLogiciel soft) const 
-{
-  return warning;
-}
 
 string* elementSnapshot::getParametersString() const 
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/elementSoleno.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/elementSoleno.cc	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/elementSoleno.cc	(revision 359)
@@ -5,10 +5,12 @@
 elementSoleno::elementSoleno() :  abstractElement() 
 {
-  cout << " passage constructeur elementSoleno " << endl;
-  setDefaultValues();
-  setDefaults();
-  elementName_ = nomdElements("soleno");
-  nbParam_ = elementName_.getElementNbParameters();
-  parametersString_ = new string[nbParam_+1];
+    cout << " passage constructeur elementSoleno " << endl;
+    setDefaultValues();
+    setDefaults();
+    elementName_ = nomdElements("soleno");
+    nbParam_ = elementName_.getElementNbParameters();
+    parametersString_ = new string[nbParam_+1];
+    registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk);
+    registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolOk);
 }
 
@@ -27,10 +29,4 @@
     varyB0_ = varyB0Def_;
   }
-
-trivaluedBool elementSoleno::is_accepted_by_software(nomDeLogiciel soft) const {
-  if ( soft == nomDeLogiciel::transport ) return ok;
-  else if ( soft == nomDeLogiciel::parmela ) return ok;
-  else return error;
-}
 
 
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/softwareGenerator.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/softwareGenerator.cc	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/softwareGenerator.cc	(revision 359)
@@ -5,4 +5,5 @@
 #include "mathematicalConstants.h"
 #include "PhysicalConstants.h"
+#include "dataManager.h"
 
 softwareGenerator::softwareGenerator() : abstractSoftware()
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/softwareParmela.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/softwareParmela.cc	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/softwareParmela.cc	(revision 359)
@@ -15,244 +15,247 @@
 bool softwareParmela::createInputFile(particleBeam* beamBefore,unsigned int numeroDeb,unsigned int numeroFin,string workingDir)
 {
-  unsigned int k;
-
-  if ( numeroDeb < 1 || numeroFin > dataManager_->getBeamLineSize() ) {
-    dataManager_->consoleMessage(" softwareParmela::createInputFile : numero of element out of limits " );
-    cerr << " numero of element out of limits " << endl;
-    return false;
-  }
-
-  string name = workingDir + inputFileName_;
-  ofstream outfile;
-  outfile.open(name.c_str(), ios::out);
-  if (!outfile) {
-    dataManager_->consoleMessage(" softwareParmela::createInputFile : error opening output stream " );
-    cerr << " softwareParmela::createInputFile : error opening output stream " << name << endl;
-    return false;
-  }
-
-  abstractElement* elPtr;
-  double initalKineticEnergy = 0.0;
-  elPtr = dataManager_->getElementPointerFromNumero(numeroDeb);
-  bool there_is_rfgun = ( elPtr->getNomdElement().getElementType() == RFgun ); 
-  
-  if ( !there_is_rfgun ) {
-    string nameOfInput = workingDir + "parin.input0";
-    if ( !beamToParmela(nameOfInput,beamBefore) ) return false;
-    initalKineticEnergy = beamBefore->referenceKineticEnergyMeV();
-    // les elements de parmela sont indexes de 1 Ã  max, s'il n'y a pas de rfgun 
-    offsetNumElem_ = numeroDeb -1;
-  } else {
-    elPtr->setPhaseStep( globParamPtr_->getIntegrationStep() );
-    initalKineticEnergy = elPtr->getInitialKineticEnergy();
-    // les elements de parmela sont indexes de 0 Ã  max, s'il y a un rfgun 
-    offsetNumElem_ = numeroDeb;
-  }
-
-  outfile << "TITLE" << endl;
-  outfile << " titre provisoire " << endl;
-  outfile << "RUN /n0=1 /ip=999 /freq=" << globParamPtr_->getFrequency() << "  /z0=0.0 /W0=" << initalKineticEnergy << "  /itype=1" << endl;
-  outfile << "OUTPUT 0" << endl;
-  unsigned int premier = numeroDeb ;
-  if ( there_is_rfgun ) {
-    outfile << dataManager_->getElementPointerFromNumero(numeroDeb)->parmelaOutputFlow() << endl;
-    premier++;
-  } else {
-    outfile << "INPUT 0 /NP=" << beamBefore->getNbParticles() << endl;
-  }
-  
-  // commentaire :  si l'element est un snapshot ne rien ecrire dans inputFileName_ (= parmin) un saut de ligne perturbe l'execution de parmela
-  for ( k = premier; k <= numeroFin; k++)
-    {
-      elPtr = dataManager_->getElementPointerFromNumero(k);
-      if(elPtr->getNomdElement().getElementType() == snapshot) continue;
-      outfile << elPtr->parmelaOutputFlow() << endl;
-    }
-  
-  outfile << "ZOUT" << endl;
-  outfile << "START /wt=0.0 /dwt=" << globParamPtr_->getIntegrationStep() << "  /nsteps=" << globParamPtr_->getNbSteps() << "  nsc=" << globParamPtr_->getScPeriod() << "  /nout=10" << endl;
-  outfile << "END" << endl;
-  outfile.close();
-  dataManager_->consoleMessage("fichier input termine pour PARMELA");
-  return true;
+    unsigned int k;
+    
+    if ( numeroDeb < 1 || numeroFin > dataManager_->getBeamLineSize() ) {
+        dataManager_->consoleMessage(" softwareParmela::createInputFile : numero of element out of limits " );
+        cerr << " numero of element out of limits " << endl;
+        return false;
+    }
+    
+    string name = workingDir + inputFileName_;
+    ofstream outfile;
+    outfile.open(name.c_str(), ios::out);
+    if (!outfile) {
+        dataManager_->consoleMessage(" softwareParmela::createInputFile : error opening output stream " );
+        cerr << " softwareParmela::createInputFile : error opening output stream " << name << endl;
+        return false;
+    }
+    
+    abstractElement* elPtr;
+    double initalKineticEnergy = 0.0;
+    elPtr = dataManager_->getElementPointerFromNumero(numeroDeb);
+    bool there_is_rfgun = ( elPtr->getNomdElement().getElementType() == RFgun );
+    
+    if ( !there_is_rfgun ) {
+        string nameOfInput = workingDir + "parin.input0";
+        if ( !beamToParmela(nameOfInput,beamBefore) ) return false;
+        initalKineticEnergy = beamBefore->referenceKineticEnergyMeV();
+        // les elements de parmela sont indexes de 1 Ã  max, s'il n'y a pas de rfgun
+        offsetNumElem_ = numeroDeb -1;
+    } else {
+        elPtr->setPhaseStep( globParamPtr_->getIntegrationStep() );
+        initalKineticEnergy = elPtr->getInitialKineticEnergy();
+        // les elements de parmela sont indexes de 0 Ã  max, s'il y a un rfgun
+        offsetNumElem_ = numeroDeb;
+    }
+    
+    outfile << "TITLE" << endl;
+    outfile << " titre provisoire " << endl;
+    outfile << "RUN /n0=1 /ip=999 /freq=" << globParamPtr_->getFrequency() << "  /z0=0.0 /W0=" << initalKineticEnergy << "  /itype=1" << endl;
+    outfile << "OUTPUT 0" << endl;
+    unsigned int premier = numeroDeb ;
+    if ( there_is_rfgun ) {
+        outfile << dataManager_->getElementPointerFromNumero(numeroDeb)->parmelaOutputFlow() << endl;
+        premier++;
+    } else {
+        outfile << "INPUT 0 /NP=" << beamBefore->getNbParticles() << endl;
+    }
+    
+    // commentaire :  si l'element est un snapshot ne rien ecrire dans inputFileName_ (= parmin) un saut de ligne perturbe l'execution de parmela
+    for ( k = premier; k <= numeroFin; k++)
+    {
+        elPtr = dataManager_->getElementPointerFromNumero(k);
+        if (elPtr) {
+            if(elPtr->getNomdElement().getElementType() == snapshot) continue;
+            outfile << elPtr->parmelaOutputFlow() << endl;
+        }
+    }
+    
+    outfile << "ZOUT" << endl;
+    outfile << "START /wt=0.0 /dwt=" << globParamPtr_->getIntegrationStep() << "  /nsteps=" << globParamPtr_->getNbSteps() << "  nsc=" << globParamPtr_->getScPeriod() << "  /nout=10" << endl;
+    outfile << "END" << endl;
+    outfile.close();
+    dataManager_->consoleMessage("fichier input termine pour PARMELA");
+    return true;
 }
 
 bool softwareParmela::execute(unsigned int numeroDeb,unsigned int numeroFin,string workingDir)
 {
-  bool ExecuteStatus = true;
-  
-  ostringstream sortie;
-  sortie << " EXECUTION DE PARMELA DE l'ELEMENT " << numeroDeb << " A L'ELEMENT " << numeroFin << endl;
-
-  string parmelaJob = workingDir + "parmela";
-  parmelaJob += string("   ");
-  parmelaJob += workingDir;
-  
-  string resultOfRun;
-  bool success = launchJob(parmelaJob,resultOfRun);
-  sortie << resultOfRun << endl;
-  if ( !success ) {
-    sortie << " launching of parmela failed " << endl;
-    ExecuteStatus = false;
-  } else {
-    sortie << " successful launching of parmela " << endl;
-    cout << " execution parmela MARCHE " << endl;
-    string::size_type nn = (resultOfRun).find("normal");
-    if ( nn == string::npos ) 
-      {
-	sortie << " abnormal exit of parmela " << endl;
-	ExecuteStatus = false;
-      }
-  }
-
-  dataManager_->consoleMessage(sortie.str());
-  return ExecuteStatus;
-}
-
-bool softwareParmela::buildBeamAfterElements(unsigned int numeroDeb,unsigned int numeroFin, vector<particleBeam>& beams, string workingDir) 
-{
-  bool result = true;
-  cout << "debug:: debut " << numeroDeb << ", fin " << numeroFin << endl;
-
-  // index du premier element de parmela
-  int id= numeroDeb-offsetNumElem_;
-
-  for(unsigned k = numeroDeb; k <= numeroFin; k++) 
-    {
-      abstractElement* elem = dataManager_->getElementPointerFromNumero(k);
-
-      // si l'element est un snapshot, recuperer la sortie precedente
-      if(elem->getNomdElement().getElementType() == snapshot) {
-	int avantDernier = beams.size() - 1;
-	string* param = elem->getParametersString();
-	string cliche = workingDir + param[2].c_str();
-	if( beamToParmela(cliche,&beams.at(avantDernier)) ) {
-	  cout<<"["<<k<<"] : ecrit sur fichier " << cliche << " le contenu de beam["<<avantDernier<<"]"<<endl;
-	}
-	continue;
-      }
-
-      // sinon c'est un element de parmela d'index id
-      beams.push_back(particleBeam());
-      cout << " creation diagn. no " << beams.size() << " par PARMELA " << endl;
-      vector<double> centroid;
-      bareParticle refPart;
-      vector<bareParticle> particles;
-      double freq= globParamPtr_->getFrequency();
-
-      if(!beamFromParmela(workingDir,id,freq,centroid,refPart,particles)) 
-	{
-	  if(elem->is_accepted_by_software(nomDeLogiciel::parmela) == warning) {
-	    int avantDernier = beams.size() -2;
-	    beams.back() = beams.at(avantDernier);
-	  } else {
-	    dataManager_->consoleMessage("softwareParmela::buildBeamAfterElements : reading parmdesz failed");
-	    result = false;
-	    break;
-	  }
-	} else {
-	beams.back().setWithParticles(centroid,refPart,particles); 
-      }
-
-      // l'element de parmela suivant
-      id++;
-    }
-
-  return result;
-}
-
-bool softwareParmela::beamFromParmela(string workingDir,unsigned numeroParmel, double referencefrequency, vector<double>& centroid, bareParticle& refPart,vector<bareParticle>& particles ) 
-{
-
-  string nomfilefais = workingDir + "parmdesz";
-  cout << " nom fichier desz : " << nomfilefais << endl;
-  FILE *filefais = fopen(nomfilefais.c_str(), "r");
-
-  if ( filefais == (FILE*)0 ) {
-    dataManager_->consoleMessage(" beamFromParmela() erreur a l'ouverture du fichier 'parmdesz'");
-    cerr << " beamFromParmela() erreur a l'ouverture du fichier" << nomfilefais  << endl; 
-    return false;
-  } else 
-    cout << " beamFromParmela() : ouverture du fichier " << nomfilefais << endl; 
-  
-  parmelaParticle partic;
-  std::vector<parmelaParticle> faisceau;
-  int testNombrePartRef =0;
-  double phaseRef = 0.0;
-
-  while( partic.readFromParmelaFile(filefais) > 0 ) 
-    {
-
-      if ( partic.ne == (int)numeroParmel ) {
-	if ( partic.np == 1 ) {
-	  // en principe on est sur la particule de reference
-	  if ( fabs(partic.xx) > EPSILON || fabs(partic.yy) > EPSILON || fabs(partic.xxp) > EPSILON  || fabs(partic.yyp) > EPSILON) {
-	    printf(" ATTENTION part. reference douteuse  \n");
-	    partic.imprim();
-	  }
-	  phaseRef = partic.phi;
-
-	  // le 'z' est 'absolu' (le long de la trajectoire)
-	  TRIDVECTOR  posRef(partic.xx,partic.yy,partic.z);
-	  TRIDVECTOR betagammaRef(partic.xxp*partic.begamz, partic.yyp*partic.begamz, partic.begamz);
-	  refPart = bareParticle(posRef, betagammaRef);
-	  testNombrePartRef++;
-	  if ( testNombrePartRef != 1 ) {
-	    dataManager_->consoleMessage(" beamFromParmela : nombre de part. de ref different de 1 :");
-	    cerr << " nombre de part. de ref different de 1 : " << testNombrePartRef << " !! " << endl;
-	    return false;
-	  }
-	} 
-	faisceau.push_back(partic); 
-      }
+    bool ExecuteStatus = true;
+    
+    ostringstream sortie;
+    sortie << " EXECUTION DE PARMELA DE l'ELEMENT " << numeroDeb << " A L'ELEMENT " << numeroFin << endl;
+    
+    string parmelaJob = workingDir + "parmela";
+    parmelaJob += string("   ");
+    parmelaJob += workingDir;
+    
+    string resultOfRun;
+    bool success = launchJob(parmelaJob,resultOfRun);
+    sortie << resultOfRun << endl;
+    if ( !success ) {
+        sortie << " launching of parmela failed " << endl;
+        ExecuteStatus = false;
+    } else {
+        sortie << " successful launching of parmela " << endl;
+        cout << " execution parmela MARCHE " << endl;
+        string::size_type nn = (resultOfRun).find("normal");
+        if ( nn == string::npos )
+        {
+            sortie << " abnormal exit of parmela " << endl;
+            ExecuteStatus = false;
+        }
+    }
+    
+    dataManager_->consoleMessage(sortie.str());
+    return ExecuteStatus;
+}
+
+bool softwareParmela::buildBeamAfterElements(unsigned int numeroDeb,unsigned int numeroFin, vector<particleBeam>& beams, string workingDir)
+{
+    bool result = true;
+    cout << "debug:: debut " << numeroDeb << ", fin " << numeroFin << endl;
+    
+    // index du premier element de parmela
+    int id= numeroDeb-offsetNumElem_;
+    
+    for(unsigned k = numeroDeb; k <= numeroFin; k++)
+    {
+        abstractElement* elem = dataManager_->getElementPointerFromNumero(k);
+        
+        // si l'element est un snapshot, recuperer la sortie precedente
+        if(elem->getNomdElement().getElementType() == snapshot) {
+            int avantDernier = beams.size() - 1;
+            string* param = elem->getParametersString();
+            string cliche = workingDir + param[2].c_str();
+            if( beamToParmela(cliche,&beams.at(avantDernier)) ) {
+                cout<<"["<<k<<"] : ecrit sur fichier " << cliche << " le contenu de beam["<<avantDernier<<"]"<<endl;
+            }
+            continue;
+        }
+        
+        // sinon c'est un element de parmela d'index id
+        beams.push_back(particleBeam());
+        cout << " creation diagn. no " << beams.size() << " par PARMELA " << endl;
+        vector<double> centroid;
+        bareParticle refPart;
+        vector<bareParticle> particles;
+        double freq= globParamPtr_->getFrequency();
+        
+        if(!beamFromParmela(workingDir,id,freq,centroid,refPart,particles))
+        {
+            if(elem->is_accepted_by_software(nomDeLogiciel::parmela) == TBoolIgnore) {
+                int avantDernier = beams.size() -2;
+                beams.back() = beams.at(avantDernier);
+            } else {
+                dataManager_->consoleMessage("softwareParmela::buildBeamAfterElements : reading parmdesz failed");
+                result = false;
+                break;
+            }
+            
+        } else {
+            beams.back().setWithParticles(centroid,refPart,particles);
+        }
+        
+        // l'element de parmela suivant
+        id++;
+    }
+    
+    return result;
+}
+
+bool softwareParmela::beamFromParmela(string workingDir,unsigned numeroParmel, double referencefrequency, vector<double>& centroid, bareParticle& refPart,vector<bareParticle>& particles )
+{
+    
+    string nomfilefais = workingDir + "parmdesz";
+    cout << " nom fichier desz : " << nomfilefais << endl;
+    FILE *filefais = fopen(nomfilefais.c_str(), "r");
+    
+    if ( filefais == (FILE*)0 ) {
+        dataManager_->consoleMessage(" beamFromParmela() erreur a l'ouverture du fichier 'parmdesz'");
+        cerr << " beamFromParmela() erreur a l'ouverture du fichier" << nomfilefais  << endl;
+        return false;
+    } else
+        cout << " beamFromParmela() : ouverture du fichier " << nomfilefais << endl;
+    
+    parmelaParticle partic;
+    std::vector<parmelaParticle> faisceau;
+    int testNombrePartRef =0;
+    double phaseRef = 0.0;
+    
+    while( partic.readFromParmelaFile(filefais) > 0 )
+    {
+        
+        if ( partic.ne == (int)numeroParmel ) {
+            if ( partic.np == 1 ) {
+                // en principe on est sur la particule de reference
+                if ( fabs(partic.xx) > EPSILON || fabs(partic.yy) > EPSILON || fabs(partic.xxp) > EPSILON  || fabs(partic.yyp) > EPSILON) {
+                    printf(" ATTENTION part. reference douteuse  \n");
+                    partic.imprim();
+                }
+                phaseRef = partic.phi;
+                
+                // le 'z' est 'absolu' (le long de la trajectoire)
+                TRIDVECTOR  posRef(partic.xx,partic.yy,partic.z);
+                TRIDVECTOR betagammaRef(partic.xxp*partic.begamz, partic.yyp*partic.begamz, partic.begamz);
+                refPart = bareParticle(posRef, betagammaRef);
+                testNombrePartRef++;
+                if ( testNombrePartRef != 1 ) {
+                    dataManager_->consoleMessage(" beamFromParmela : nombre de part. de ref different de 1 :");
+                    cerr << " nombre de part. de ref different de 1 : " << testNombrePartRef << " !! " << endl;
+                    return false;
+                }
+            }
+            faisceau.push_back(partic);
+        }
     } //while
-
-  if ( faisceau.size() == 0) 
-    {
-      string stringNum = mixedTools::intToString( (int)numeroParmel );
-      dataManager_->consoleMessage("beamFromParmela echec lecture  element numero relatif  parmela : " + stringNum);
-      cerr << " beamFromParmela echec lecture  element numero relatif  parmela " << numeroParmel << endl;
-      return false;
-    }
-  
-  // facteur  c/ 360. pour calculer (c dphi) / (360.freq) 
-  // avec freq en Mhz et dphi en degres et rÃ©sultat en cm: 
-  double FACTEUR =  83.3333;  // ameliorer la precision
-
-  // pour l'instant on choisit un centroid nul;
-  centroid.clear();
-  centroid = vector<double>(6,0.0);
-
-  particles.clear();
-  particles.resize(faisceau.size(), bareParticle());
-  double x,xp,y,yp;
-  double betagammaz;
-  double betaz;
-  double deltaz;
-  double dephas;
-  double g;
-  TRIDVECTOR  pos;
-  TRIDVECTOR betagamma;
-  // contrairement a ce qu'indique la notice PARMELA, dans parmdesz, les xp et yp 
-  // sont donnes en radians
-  for (unsigned k = 0; k < faisceau.size(); k++) {
-    x= faisceau.at(k).xx;
-    xp=faisceau.at(k).xxp;
-    y= faisceau.at(k).yy;
-    yp=faisceau.at(k).yyp;
-    // dephasage par rapport a la reference  
-    dephas = faisceau.at(k).phi - phaseRef; // degrÃ©s
-    g = faisceau.at(k).wz/EREST_MeV;
-    betagammaz = faisceau.at(k).begamz;
-    betaz = betagammaz/(g+1.0);
-    deltaz = FACTEUR * betaz * dephas / referencefrequency;
-    x += xp * deltaz;
-    y += yp * deltaz;
-    pos.setComponents(x,y,deltaz);
-    betagamma.setComponents(xp*betagammaz, yp*betagammaz, betagammaz);
-    particles.at(k) = bareParticle(pos,betagamma);
-  }
-  
-  return true;
+    
+    if ( faisceau.size() == 0)
+    {
+        string stringNum = mixedTools::intToString( (int)numeroParmel );
+        dataManager_->consoleMessage("beamFromParmela echec lecture  element numero relatif  parmela : " + stringNum);
+        cerr << " beamFromParmela echec lecture  element numero relatif  parmela " << numeroParmel << endl;
+        return false;
+    }
+    
+    // facteur  c/ 360. pour calculer (c dphi) / (360.freq)
+    // avec freq en Mhz et dphi en degres et rÃ©sultat en cm:
+    double FACTEUR =  83.3333;  // ameliorer la precision
+    
+    // pour l'instant on choisit un centroid nul;
+    centroid.clear();
+    centroid = vector<double>(6,0.0);
+    
+    particles.clear();
+    particles.resize(faisceau.size(), bareParticle());
+    double x,xp,y,yp;
+    double betagammaz;
+    double betaz;
+    double deltaz;
+    double dephas;
+    double g;
+    TRIDVECTOR  pos;
+    TRIDVECTOR betagamma;
+    // contrairement a ce qu'indique la notice PARMELA, dans parmdesz, les xp et yp
+    // sont donnes en radians
+    for (unsigned k = 0; k < faisceau.size(); k++) {
+        x= faisceau.at(k).xx;
+        xp=faisceau.at(k).xxp;
+        y= faisceau.at(k).yy;
+        yp=faisceau.at(k).yyp;
+        // dephasage par rapport a la reference
+        dephas = faisceau.at(k).phi - phaseRef; // degrÃ©s
+        g = faisceau.at(k).wz/EREST_MeV;
+        betagammaz = faisceau.at(k).begamz;
+        betaz = betagammaz/(g+1.0);
+        deltaz = FACTEUR * betaz * dephas / referencefrequency;
+        x += xp * deltaz;
+        y += yp * deltaz;
+        pos.setComponents(x,y,deltaz);
+        betagamma.setComponents(xp*betagammaz, yp*betagammaz, betagammaz);
+        particles.at(k) = bareParticle(pos,betagamma);
+    }
+    
+    return true;
 }
 
@@ -261,28 +264,28 @@
 bool softwareParmela::beamToParmela(string nameOfFile,particleBeam* beam)
 {
-  if ( !beam->particleRepresentationOk() ) {
-    dataManager_->consoleMessage("softwareParmela::beamToParmela : beam not in particles form : not yet programmed");
-    cout << " softwareParmela::beamToParmela : beam not in particles form : not yet programmed " << endl;
-    return false;
-  }
-
-  ofstream outfile;
-  outfile.open(nameOfFile.c_str(),ios::out);
-  if (!outfile) {
-    dataManager_->consoleMessage(" softwareParmela::beamToParmela : error opening output stream ");
-    cerr << " softwareParmela::beamToParmela : error opening output stream " << nameOfFile << endl;
-    return false;
-  }
-  
-  const vector<bareParticle>& partic = beam->getParticleVector();
-  double weight = 1.0;
-  double xx,yy,zz;
-  double begamx, begamy, begamz;
-  for (unsigned k = 0; k < partic.size(); k++) {
-    partic.at(k).getPosition().getComponents(xx,yy,zz);
-    partic.at(k).getBetaGamma().getComponents(begamx,begamy,begamz);
-    outfile << xx << " " << begamx << " " <<  yy << " " << begamy << " " << zz << " " << begamz  << " " << weight << endl;
-  }
-  outfile.close();
-  return true;
-}
+    if ( !beam->particleRepresentationOk() ) {
+        dataManager_->consoleMessage("softwareParmela::beamToParmela : beam not in particles form : not yet programmed");
+        cout << " softwareParmela::beamToParmela : beam not in particles form : not yet programmed " << endl;
+        return false;
+    }
+    
+    ofstream outfile;
+    outfile.open(nameOfFile.c_str(),ios::out);
+    if (!outfile) {
+        dataManager_->consoleMessage(" softwareParmela::beamToParmela : error opening output stream ");
+        cerr << " softwareParmela::beamToParmela : error opening output stream " << nameOfFile << endl;
+        return false;
+    }
+    
+    const vector<bareParticle>& partic = beam->getParticleVector();
+    double weight = 1.0;
+    double xx,yy,zz;
+    double begamx, begamy, begamz;
+    for (unsigned k = 0; k < partic.size(); k++) {
+        partic.at(k).getPosition().getComponents(xx,yy,zz);
+        partic.at(k).getBetaGamma().getComponents(begamx,begamy,begamz);
+        outfile << xx << " " << begamx << " " <<  yy << " " << begamy << " " << zz << " " << begamz  << " " << weight << endl;
+    }
+    outfile.close();
+    return true;
+}
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementLigneFaisceau.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementLigneFaisceau.h	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementLigneFaisceau.h	(revision 359)
@@ -60,5 +60,5 @@
         return GWt_abstractElement_;
     }
-    
+
 private:
     
@@ -74,4 +74,5 @@
     PspaApplication* pspa_;
     GWt_abstractElement* GWt_abstractElement_;
+    WContainerWidget* elementContainer_;
 };
 #endif
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_ligneFaisceau.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_ligneFaisceau.h	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_ligneFaisceau.h	(revision 359)
@@ -74,4 +74,8 @@
     void update();
     
+    /** update the status of the given index element
+     */
+    void update(int);
+
     private :
     void manageLineFaisceauLayout();
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/src/File.cpp
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/src/File.cpp	(revision 359)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/src/File.cpp	(revision 359)
@@ -0,0 +1,9 @@
+//
+//  File.cpp
+//  PSPA
+//
+//  Created by Garnier Laurent on 02/03/13.
+//  Copyright (c) 2013 Garnier Laurent. All rights reserved.
+//
+
+#include "File.h"
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/src/File.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/src/File.h	(revision 359)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/src/File.h	(revision 359)
@@ -0,0 +1,14 @@
+//
+//  File.h
+//  PSPA
+//
+//  Created by Garnier Laurent on 02/03/13.
+//  Copyright (c) 2013 Garnier Laurent. All rights reserved.
+//
+
+#ifndef __PSPA__File__
+#define __PSPA__File__
+
+#include <iostream>
+
+#endif /* defined(__PSPA__File__) */
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_abstractElement.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_abstractElement.cc	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_abstractElement.cc	(revision 359)
@@ -32,5 +32,4 @@
 {
     abstractElement_ = elem;
-    setStyleClass("beamLineIcon");
 }
 
@@ -83,6 +82,8 @@
 void GWt_abstractElement::updateLabelAndToolTipWidget()
 {
+    if (abstractElement_ != NULL) {
     elementLigneFaiseauContainer_->setElementLabel(abstractElement_->getLabel());
     setToolTip(print());
+    }
 }
 
@@ -111,5 +112,4 @@
     ligneFaisceau->removeElement(this);
 }
-
 
 WContainerWidget* GWt_abstractElement::getWidget() {
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementLigneFaisceau.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementLigneFaisceau.cc	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementLigneFaisceau.cc	(revision 359)
@@ -28,28 +28,28 @@
 
 GWt_elementLigneFaisceau::GWt_elementLigneFaisceau(PspaApplication* pspa)
-  : WContainerWidget(),
-    firstTimeInsertMessage_(NULL),
-    dropZoneLeft_(NULL),
-    dropZoneRight_(NULL),
-    GWt_abstractElement_(NULL),
-    elementLabel_(NULL),
-    pspa_(pspa)
-{
-  initialize_ligneFaisceau(inconnu);
+: WContainerWidget(),
+firstTimeInsertMessage_(NULL),
+dropZoneLeft_(NULL),
+dropZoneRight_(NULL),
+GWt_abstractElement_(NULL),
+elementLabel_(NULL),
+pspa_(pspa)
+{
+    initialize_ligneFaisceau(inconnu);
 }
 
 
 GWt_elementLigneFaisceau::GWt_elementLigneFaisceau(typedElement type, PspaApplication* pspa)
-  : WContainerWidget(),
-    firstTimeInsertMessage_(NULL),
-    dropZoneLeft_(NULL),
-    dropZoneRight_(NULL),
-    GWt_abstractElement_(NULL),
-    elementLabel_(NULL),
-    pspa_(pspa)
-{
-  // set the css name
-  setObjectName("elementLigneFaisceau"); 
-  initialize_ligneFaisceau(type);
+: WContainerWidget(),
+firstTimeInsertMessage_(NULL),
+dropZoneLeft_(NULL),
+dropZoneRight_(NULL),
+GWt_abstractElement_(NULL),
+elementLabel_(NULL),
+pspa_(pspa)
+{
+    // set the css name
+    setObjectName("elementLigneFaisceau");
+    initialize_ligneFaisceau(type);
 }
 
@@ -57,30 +57,17 @@
 {
     
-  cout<<"new GWt_elementLigneFaisceau : "<< this << endl;
-    
-  // set layout
-  //     +----------+--------+---------+
-  //     |   (--->) |  ELEM  | (-----) |
-  //     +----------+--------+---------+
-  //     |             NAME            |
-  //     +----------+--------+---------+
-  
-    
-  WGridLayout *gridLayout = new WGridLayout();
-    
-  gridLayout->setContentsMargins(0,0,0,0);
-  gridLayout->setHorizontalSpacing(0);
-  gridLayout->setVerticalSpacing(0);
-  
-  // add first line :  initialize arrow and link images
-  dropZoneLeft_ = new GWt_dropZoneLigneFaisceau(pspa_);
-  dropZoneRight_ = new GWt_dropZoneLigneFaisceau(pspa_);
-    
-  // change object name in order to manage css :
-  dropZoneLeft_->resize(10,30);
-  dropZoneRight_->resize(10,30);
-  
-  gridLayout->addWidget	(dropZoneLeft_,0,0);
-  gridLayout->addWidget	(dropZoneRight_,0,2);
+    cout<<"new GWt_elementLigneFaisceau : "<< this << endl;
+    
+    // set layout
+    //     +----------+--------+---------+
+    //     |   (--->) |  ELEM  | (-----) |
+    //     +----------+--------+---------+
+    
+    
+    WGridLayout *gridLayout = new WGridLayout();
+    
+    gridLayout->setContentsMargins(0,0,0,0);
+    gridLayout->setHorizontalSpacing(0);
+    gridLayout->setVerticalSpacing(0);
     
     // add first line :  initialize arrow and link images
@@ -95,4 +82,15 @@
     gridLayout->addWidget	(dropZoneRight_,0,2);
     
+    // add first line :  initialize arrow and link images
+    dropZoneLeft_ = new GWt_dropZoneLigneFaisceau(pspa_);
+    dropZoneRight_ = new GWt_dropZoneLigneFaisceau(pspa_);
+    
+    // change object name in order to manage css :
+    dropZoneLeft_->resize(10,30);
+    dropZoneRight_->resize(10,30);
+    
+    gridLayout->addWidget	(dropZoneLeft_,0,0);
+    gridLayout->addWidget	(dropZoneRight_,0,2);
+    
     // add the image if present
     
@@ -122,19 +120,54 @@
             GWt_abstractElement_ = NULL;
     }
+    
+    elementContainer_ = new WContainerWidget();
+    WVBoxLayout* vLayoutElementContainer = new WVBoxLayout();
+    
+    elementContainer_->setStyleClass("beamLineIcon");
+    elementContainer_->setLayout(vLayoutElementContainer);
+    
+    
+    
     if (GWt_abstractElement_ != NULL) {
-        gridLayout->addWidget	(GWt_abstractElement_,0,1);
+        vLayoutElementContainer->addWidget(GWt_abstractElement_);
         GWt_abstractElement_->setMaximumSize(80,80);
         GWt_abstractElement_->setMinimumSize(80,80);
     }
     
-    // add second line
-
     if (GWt_abstractElement_ == NULL) {
-      elementLabel_ = new WText();
+        elementLabel_ = new WText();
     } else {
-      elementLabel_ = new WText(GWt_abstractElement_->getAbstractElement()->getLabel());
-    }
-    
-    gridLayout->addWidget(elementLabel_,1,0,1,3,Wt::AlignCenter |Wt::AlignMiddle);
+        elementLabel_ = new WText(GWt_abstractElement_->getAbstractElement()->getLabel());
+    }
+    
+    vLayoutElementContainer->addWidget(elementLabel_,Wt::AlignCenter |Wt::AlignMiddle);
+    //    gridLayout->addWidget(elementLabel_,1,0,1,3,Wt::AlignCenter |Wt::AlignMiddle);
+    
+    // Add Actions
+    WContainerWidget* actions = new WContainerWidget();
+    WVBoxLayout* vLayoutActions = new WVBoxLayout();
+    actions->setLayout(vLayoutActions);
+    
+    WText* actionParameters = new WText("&nbsp;");
+    WText* actionSoftware = new WText("Software");
+    
+    // Set class for actions elements
+    actionParameters->setStyleClass("Button WhiteButton ContrastButton parameters");
+    actionParameters->setMaximumSize(32,32);
+    actionParameters->setMinimumSize(32,32);
+    
+    actionSoftware->setStyleClass("Button WhiteButton ContrastButton software");
+    actionParameters->setPositionScheme(Wt::Static);
+    
+    // Set the global action class
+    actions->setStyleClass("beamLineElementActions");
+    actions->setPositionScheme(Wt::Static);
+    actions->setOffsets(0);
+    
+    vLayoutActions->addWidget(actionParameters);
+    vLayoutActions->addWidget(actionSoftware);
+    vLayoutElementContainer->addWidget(actions);
+    
+    gridLayout->addWidget	(elementContainer_,0,1);
     
     gridLayout->setColumnStretch (0,1);
@@ -143,4 +176,5 @@
     // set layout
     setLayout(gridLayout);
+    
 }
 
@@ -151,5 +185,5 @@
 
 void GWt_elementLigneFaisceau::setBGColor(const WColor c) {
-    decorationStyle().setBackgroundColor (c);
+    elementContainer_->decorationStyle().setBackgroundColor (c);
 }
 
@@ -157,24 +191,24 @@
 void GWt_elementLigneFaisceau::removeDone(GWt_abstractElement* gw)
 {
-  if (messageDropZone_->result() == WDialog::Accepted) {
-    // FIXME
-    //    removeDropZone();
-  }
+    if (messageDropZone_->result() == WDialog::Accepted) {
+        // FIXME
+        //    removeDropZone();
+    }
 }
 
 
 void GWt_elementLigneFaisceau::addElement(GWt_abstractElement* elem)
-{    
-  clear();
-  GWt_abstractElement_ = elem;
-  addWidget(GWt_abstractElement_);
-  if (static_cast <WContainerWidget*> (parent())) {
-    WContainerWidget* wc = static_cast <WContainerWidget*> (parent());
-    WBoxLayout* layout = ((WBoxLayout*)(wc->layout()));
-    layout->setStretchFactor(this,0);
-  }
-  
-  
-  firstTimeInsertMessage_ = NULL;
+{
+    clear();
+    GWt_abstractElement_ = elem;
+    addWidget(GWt_abstractElement_);
+    if (static_cast <WContainerWidget*> (parent())) {
+        WContainerWidget* wc = static_cast <WContainerWidget*> (parent());
+        WBoxLayout* layout = ((WBoxLayout*)(wc->layout()));
+        layout->setStretchFactor(this,0);
+    }
+    
+    
+    firstTimeInsertMessage_ = NULL;
     dropZoneLeft_ = NULL;
 }
@@ -182,5 +216,5 @@
 
 std::string GWt_elementLigneFaisceau::getElementNumberInBeamLine(nomdElements elem){
-  string str = "";
+    string str = "";
     
     if (static_cast <WContainerWidget*> (parent())) {
@@ -223,6 +257,7 @@
 
 void GWt_elementLigneFaisceau::setElementLabel(std::string label) {
-  if (elementLabel_) {
-    elementLabel_->setText(label);
-  }
-}
+    if (elementLabel_) {
+        elementLabel_->setText(label.substr(0,10));
+        elementLabel_->setToolTip(label);
+    }
+}
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_ligneFaisceau.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_ligneFaisceau.cc	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_ligneFaisceau.cc	(revision 359)
@@ -138,6 +138,7 @@
       
       // update labels
-      elem->getGWt_AbstractElement()->updateLabelAndToolTipWidget();
-      
+      if (elem->getGWt_AbstractElement()) {  
+          elem->getGWt_AbstractElement()->updateLabelAndToolTipWidget();
+        }
       //  one element
       if ((a == 0) && (a == (ligneFaisceauLayout_->count()-1))) {
@@ -210,19 +211,25 @@
 
 abstractElement* GWt_LigneFaisceau::getAbstractElement(int i){
-  int index = 0;
-  
-  // first if 1
-  //    i--;
-  
-  for (int a=0; a< ligneFaisceauLayout_->count(); a++) {
-    if (GWt_elementLigneFaisceau* elem = dynamic_cast <GWt_elementLigneFaisceau*> (ligneFaisceauLayout_->itemAt(a)->widget ())) {
-      if (index == i) {
-	printf("GWt_LigneFaisceau::getAbstractElement %d %s\n",i,elem->getGWt_AbstractElement()->getAbstractElement()->getLabel().c_str());
-	return elem->getGWt_AbstractElement()->getAbstractElement();
-      }
-      index ++;
-    }
-  }
-  return NULL;
+    int index = 0;
+    if (i < 0) {
+        return NULL;
+    }
+    
+    // first if 1
+    //    i--;
+    for (int a=0; a< ligneFaisceauLayout_->count(); a++) {
+        if (ligneFaisceauLayout_->itemAt(a)) {
+            
+            if (GWt_elementLigneFaisceau* elem = dynamic_cast <GWt_elementLigneFaisceau*> (ligneFaisceauLayout_->itemAt(a)->widget ())) {
+                if (index == i) {
+                    if (elem->getGWt_AbstractElement()) {
+                        return elem->getGWt_AbstractElement()->getAbstractElement();
+                    }
+                }
+                index ++;
+            }
+        }
+    }
+    return NULL;
 }
 
@@ -238,4 +245,5 @@
 }
 
+
 vector <abstractElement*> GWt_LigneFaisceau::getAllAbstractElements()
 {
@@ -249,2 +257,18 @@
 }
 
+void GWt_LigneFaisceau::update(int i){
+    int index = 0;
+    
+    // first if 1
+    //    i--;
+    
+    for (int a=0; a< ligneFaisceauLayout_->count(); a++) {
+        if (GWt_elementLigneFaisceau* elem = dynamic_cast <GWt_elementLigneFaisceau*> (ligneFaisceauLayout_->itemAt(a)->widget ())) {
+            if (index == i) {
+                elem->setBGColor(WColor(elem->getGWt_AbstractElement()->getAbstractElement()->getAbstractSoftware()->getColor()));
+            }
+            index ++;
+        }
+    }
+}
+
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc	(revision 358)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc	(revision 359)
@@ -1,3 +1,2 @@
-//
 //  GWt_softwarePanel.cpp
 //  PSPA
@@ -260,57 +259,52 @@
   exec_go_->setDisabled(false);
 
+}
+
+
+bool GWt_softwarePanel::areDataCoherent()
+{
+    bool caMarche = true;
+    dtmanage_->initializeExecution();
+    string diagnostic;
+    
+    list<GWt_sectionToExecute*>::iterator itr;
+    for(itr = selectedSections_.begin(); itr != selectedSections_.end(); itr++)
+    {
+        string debString = (*itr)->debut->text().toUTF8();
+        string finString = (*itr)->fin->text().toUTF8();
         
-        // All ok, then put colors on beamLine
-        list<GWt_sectionToExecute*>::iterator itr2;
-        for(itr2 = selectedSections_.begin();itr2 != selectedSections_.end(); itr2++)
-        {
-            string debString = (*itr2)->debut->text().toUTF8();
-            string finString = (*itr2)->fin->text().toUTF8();
-            
-            
-            int debut = dtmanage_->getNumeroFromElementLabel(debString);
-            int fin = dtmanage_->getNumeroFromElementLabel(finString);
-/**
- for (int i=debut; i=<fin; i++) {
-                getBeamLine()->getAbstractElement(i)->setBGColor(
-                
+        int debut = dtmanage_->getNumeroFromElementLabel(debString);
+        int fin = dtmanage_->getNumeroFromElementLabel(finString);
+        nomDeLogiciel prog = nomDeLogiciel ( (*itr)->selection->currentIndex() );
+        dtmanage_->addSectionToExecute(debut,fin,prog);
+        
+        // check sections
+        for (int i=debut-1; i<fin; i++) {
+            if (pspa_->getBeamLine()) {
+                if (pspa_->getBeamLine()->getAbstractElement(i)) {
+                    if (!pspa_->getBeamLine()->getAbstractElement(i)->setSoftware(prog.getString())) {
+                        diagnostic += pspa_->getBeamLine()->getAbstractElement(i)->getLabel()+ "could not be associate with "+ prog.getString()+" ";
+                        caMarche = false;
+                    } else {
+                        pspa_->getBeamLine()->update(i);
+                    }
+                }
             }
-            nomDeLogiciel prog = nomDeLogiciel ( (*itr)->selection->currentIndex() );
-            dtmanage_->addSectionToExecute(debut,fin,prog);
+        }
+    }
+    
+//    trivaluedBool essai = dtmanage_->checkExecute(diagnostic);
+
+    if ( caMarche == false ) {
+        GWt_dialog calculDialog("PSPA check execute : ERROR", diagnostic , GWt_dialog::Error,true,true);
+        calculDialog.exec();
+/*
+ } else if ( essai == warning )  {
+        GWt_dialog calculDialog("PSPA check execute : warning ", diagnostic , GWt_dialog::Warning, false,true);
+        calculDialog.exec();
 */
-        }
-}
-
-
-bool GWt_softwarePanel::areDataCoherent()
-{
-  bool caMarche = true;
-  dtmanage_->initializeExecution();
-  
-  list<GWt_sectionToExecute*>::iterator itr;
-  for(itr = selectedSections_.begin(); itr != selectedSections_.end(); itr++)
-    {
-      string debString = (*itr)->debut->text().toUTF8();
-      string finString = (*itr)->fin->text().toUTF8();
-        
-      int debut = dtmanage_->getNumeroFromElementLabel(debString);
-      int fin = dtmanage_->getNumeroFromElementLabel(finString);
-      nomDeLogiciel prog = nomDeLogiciel ( (*itr)->selection->currentIndex() );
-      dtmanage_->addSectionToExecute(debut,fin,prog);
-    }
-  
-  string diagnostic;
-  trivaluedBool essai = dtmanage_->checkExecute(diagnostic);
-  if ( essai == error ) {
-    caMarche = false;
-    GWt_dialog calculDialog("PSPA check execute : ERROR", diagnostic , GWt_dialog::Error,true,true);
-    calculDialog.exec();
-  } else if ( essai == warning )  {
-    caMarche = true;
-    GWt_dialog calculDialog("PSPA check execute : warning ", diagnostic , GWt_dialog::Warning, false,true);
-    calculDialog.exec();
-  }
-  
-  return caMarche;
+    }
+    
+    return caMarche;
 }
 
