Index: /Interface_Web/trunk/pspaWT/sources/controler/include/abstractElement.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/abstractElement.h	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/abstractElement.h	(revision 424)
@@ -15,76 +15,76 @@
 /* #include "softwareTransport.h" */
 
+#include "UAP/UAPNode.hpp"
+
 using namespace std;
 
 class abstractElement
 {
-    protected :
+
+ protected :
+  
+  int nbParam_;
+  string* parametersString_;
+  double phaseStepMax_;
     
-    int nbParam_;
-    string* parametersString_;
-    double phaseStepMax_;
+  double defaultLength_;
+  double defaultAperture_;
+  string defaultSpecificName_;
+  
+  string specificName_;
+  nomdElements elementName_;
+  
+  double lenghtElem_; // cm
+  double aperture_; // cm
+  
+  double stepmaxcm_;
+  //  bool curvedTrajectory_;
+  
+  void setDefaultValues();
+  void setDefaults();
+  
+ public :
+  
+  abstractElement();
+  abstractElement(string lab);
+  virtual ~abstractElement();
+  
+  void setParameters(double ll,double aper);
+  void setLabel(string lab);
+  string getLabel() const;
+  nomdElements getNomdElement() const;
+  
+  double getLenghtOfElement() const;
+  int getNbParams() const;
+  
+  virtual void setPhaseStep(double);
+  virtual double getInitialKineticEnergy() const;
     
-    double defaultLength_;
-    double defaultAperture_;
-    string defaultSpecificName_;
-    
-    string specificName_;
-    nomdElements elementName_;
-    
-    double lenghtElem_; // cm
-    double aperture_; // cm
-    
-    double stepmaxcm_;
-    //  bool curvedTrajectory_;
-    
-    void setDefaultValues();
-    void setDefaults();
-    
-    public :
-    
-    abstractElement();
-    abstractElement(string lab);
-    virtual ~abstractElement();
-    
-    void setParameters(double ll,double aper);
-    void setLabel(string lab);
-    string getLabel() const;
-    nomdElements getNomdElement() const;
-    
-    
-    double getLenghtOfElement() const;
-    int getNbParams() const;
+  virtual void setParametersString(string* param) = 0;
+  virtual string* getParametersString() const = 0;
+  virtual string FileOutputFlow() const = 0;
+  virtual vector< pair<string, vector<string> > > parametersToSoftware () const =0;
+  virtual void FileInput(ifstream& ifs) = 0;
+  virtual string print() = 0;
+  
+  virtual void InputRep(UAPNode* root) = 0;
 
-    
-    virtual void setPhaseStep(double);
-    virtual double getInitialKineticEnergy() const;
-    
-    virtual void setParametersString(string* param) = 0;
-    virtual string* getParametersString() const = 0;
-    virtual string FileOutputFlow() const = 0;
-    virtual vector< pair<string, vector<string> > > parametersToSoftware () const =0;
-    virtual void FileInput(ifstream& ifs) = 0;
-    virtual string print() = 0;
+  /* Return the abstractSofware associated with this element
+   */
+  inline abstractSoftware* getAbstractSoftware() {
+    return abstractSoftware_;
+  }
+  
+  /* Set the software to this element
+     @param abstractSoftware a pointer to the abstract software
+  */
+  inline void setSoftware(abstractSoftware* prog) { 
+    abstractSoftware_ = prog; 
+  }
+  
+ private :
 
-    /** Return the abstractSofware associated with this element
-     */
-    inline abstractSoftware* getAbstractSoftware() {
-        return abstractSoftware_;
-    }
-
-   
-    
-    /**
-     Set the software to this element
-     @param abstractSoftware a pointer to the abstract software
-     */
-    inline  void setSoftware(abstractSoftware* prog) { abstractSoftware_ = prog; }
-
-    
-
-    private :
-
-            abstractSoftware *abstractSoftware_;
-    
+  abstractSoftware *abstractSoftware_;
+  
 };
 #endif
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/dataManager.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/dataManager.h	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/dataManager.h	(revision 424)
@@ -47,5 +47,5 @@
   */
   int getNumeroFromElementLabel(string);
-    abstractElement*  getElementPointerFromNumero(int);
+  abstractElement*  getElementPointerFromNumero(int);
   
   void initializeExecution();
@@ -61,30 +61,30 @@
    @param filename
    */
-    void saveConfiguration(string folder, string filename);
+  void saveConfiguration(string folder, string filename);
+  bool restoreElements(string inputFileName);
+  
+  void writeToAMLFile(string fileName);
     
-    bool restoreElements(string inputFileName);
-    
-    
-    /** return the jobList size
-     */
-    inline int getJobListSize() const {
-        return jobList_.size();
+  /** return the jobList size
+   */
+  inline int getJobListSize() const {
+    return jobList_.size();
+  }
+  
+  // si newBeam = true, on cree un nouveau diag
+  // si newBeam = false, on utilise le dernier
+  inline particleBeam* updateCurrentDiagnostic(bool newBeam) {
+    if ( newBeam ) {
+      diagnosticBeam_.push_back(particleBeam());
     }
-
-    // si newBeam = true, on cree un nouveau diag
-    // si newBeam = false, on utilise le dernier
-    inline particleBeam* updateCurrentDiagnostic(bool newBeam) {
-      if ( newBeam ) {
-	diagnosticBeam_.push_back(particleBeam());
-      }
-      indexElementToIndexDiag_.push_back(diagnosticBeam_.size() -1);
-      return &diagnosticBeam_.back();
-    }
-
-    /** return a specific jobList index
-     return NULL if the index does not exist
-     */
-
-    /* inline sectionToExecute* getJobListAt(int a) { */
+    indexElementToIndexDiag_.push_back(diagnosticBeam_.size() -1);
+    return &diagnosticBeam_.back();
+  }
+  
+  /** return a specific jobList index
+      return NULL if the index does not exist
+  */
+  
+  /* inline sectionToExecute* getJobListAt(int a) { */
     /*     if (a < 0) return NULL; */
     /*     if (a >= getJobListSize()) return NULL; */
@@ -92,6 +92,6 @@
     /* } */
 
-
-
+  
+  
     /* inline const abstractSoftware* getSoftwareOfSection( int index) const { */
     /*     if (index < 0) return NULL; */
@@ -101,24 +101,24 @@
     
     /** Clear a specific jobList */
-    void clearSectionToExecute(int a);
+  void clearSectionToExecute(int a);
     
-private:
-    globalParameters globParam_;
-    particleBeam* currentBeam_;
+ private:
+
+  globalParameters globParam_;
+  particleBeam* currentBeam_;
   PspaApplication* pspa_;
   unsigned firstComputedElemNumero_;
   unsigned lastComputedElemNumero_;
-
-    vector<particleBeam> diagnosticBeam_;
-    vector<unsigned> indexElementToIndexDiag_;
-    // numeroElementToIndexDiag_[k] contient, pour l'element d'index k, l'indice ind tel que diagnosticBeam_[ind]
-    // soit le faisceau resultat, en l'etat qu'il doit avoir apres l'element k
-
-    vector<sectionToExecute*> jobList_;
-    
-    void removeFile(string nameOfFile);
-    void clearSectionToExecute();
-     abstractSoftware* createSoftwareConnexion(nomDeLogiciel logi);
-
-  };
+  
+  vector<particleBeam> diagnosticBeam_;
+  vector<unsigned> indexElementToIndexDiag_;
+  // numeroElementToIndexDiag_[k] contient, pour l'element d'index k, l'indice ind tel que diagnosticBeam_[ind]
+  // soit le faisceau resultat, en l'etat qu'il doit avoir apres l'element k
+  
+  vector<sectionToExecute*> jobList_;
+  
+  void removeFile(string nameOfFile);
+  void clearSectionToExecute();
+  abstractSoftware* createSoftwareConnexion(nomDeLogiciel logi);
+};
 #endif
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/elementBeam.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/elementBeam.h	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/elementBeam.h	(revision 424)
@@ -21,37 +21,24 @@
     
     void setDefaultValues();
-    
     void setDefaults();
     
-    public :
+ public :
     
     elementBeam();
-    
     ~elementBeam();
     
     
     virtual void setParametersString(string* param);
-    
     virtual string* getParametersString() const;
-
     virtual vector< pair<string, vector<string> > > parametersToSoftware () const;
-
-    
     //    virtual  string parmelaOutputFlow() const;
-    
-    
     //    virtual string transportOutputFlow() const;
     
-    
-    virtual string FileOutputFlow() const;
-    
+    virtual string FileOutputFlow() const;    
+    virtual void FileInput(ifstream& ifs);
+    virtual void InputRep(UAPNode* root);
 
-
-    virtual void FileInput(ifstream& ifs);
-
-    /** return a string with all parameters and value
-     */
+    /** return a string with all parameters and value */
     string print();
-    
 };
 #endif
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/elementBend.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/elementBend.h	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/elementBend.h	(revision 424)
@@ -8,59 +8,44 @@
 //#include "PhysicalConstants.h"
 
-
 using namespace std;
 
 // aimant dipolaire,  DANS LE PLAN XZ (le champ est dans la direction Y)
 
-
 class elementBend : public abstractElement
 {
     
-    double angleDeg_; // deg.
-    double radius_; // m
-    double beta1_; // deg.
-    double beta2_; // deg.
-    double momentum_; // MeV/c
+  double angleDeg_; // deg.
+  double radius_; // m
+  double beta1_; // deg.
+  double beta2_; // deg.
+  double momentum_; // MeV/c
+  
+  double angleDegDef_; // deg.
+  double radiusDef_; // m
+  double beta1Def_; // deg.
+  double beta2Def_; // deg.
+  double momentumDef_; // MeV/c
     
-    double angleDegDef_; // deg.
-    double radiusDef_; // m
-    double beta1Def_; // deg.
-    double beta2Def_; // deg.
-    double momentumDef_; // MeV/c
+  void setDefaultValues();
+  void setDefaults();
+   
+ public:
     
-    
-    
-    void setDefaultValues();
-    void setDefaults();
-    
-    
-public:
-    
-    elementBend();
-    
-    ~elementBend() {;}
-    
-    double getLenghtOfElement() const;
-        
-    virtual void setParametersString(string* param);
-    
-    virtual string* getParametersString() const;
-    
-    //    virtual  string parmelaOutputFlow() const;
-    
-    //   virtual string transportOutputFlow() const;
-    
-    virtual  string FileOutputFlow() const;
-
-    virtual vector< pair<string, vector<string> > > parametersToSoftware () const;
-    
-    virtual void FileInput(ifstream& ifs);
-    
-    /** return a string with all parameters and value
-     */
-    string print();
-    
+  elementBend();
+  ~elementBend() {;}
+  
+  double getLenghtOfElement() const;
+  virtual void setParametersString(string* param);
+  virtual string* getParametersString() const;
+  virtual vector< pair<string, vector<string> > > parametersToSoftware () const;
+  //   virtual  string parmelaOutputFlow() const;
+  //   virtual string transportOutputFlow() const;
+  
+  virtual string FileOutputFlow() const;
+  virtual void FileInput(ifstream& ifs);
+  virtual void InputRep(UAPNode* root);
+  
+  /** return a string with all parameters and value */
+  string print();
 };
-
-
 #endif
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/elementCell.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/elementCell.h	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/elementCell.h	(revision 424)
@@ -13,62 +13,39 @@
 class elementCell : public abstractElement
 {
+  //  int nbParam_;
+  // string* parametersString_;
+  double initialPhaseDef_;
+  double acceleratingFieldDef_;  
+  string acceleratingShapeFileDef_;
+  string focusingMagFileDef_;
+  double offsetMagDef_;
+  double scaleFactorDef_;
+  double initialPhase_;
+  double acceleratingField_;
+  string acceleratingShapeFile_;
+  string focusingMagFile_;
+  double offsetMag_;
+  double scaleFactor_;
+ 
+  void setDefaultValues();  
+  void setDefaults();
     
-    //  int nbParam_;
-    // string* parametersString_;
+ public :
+  
+  elementCell();
+  ~elementCell() { ;}
     
-    
-    double initialPhaseDef_;
-    double acceleratingFieldDef_;
-    
-    string acceleratingShapeFileDef_;
-    string focusingMagFileDef_;
-    double offsetMagDef_;
-    double scaleFactorDef_;
-    
-    double initialPhase_;
-    double acceleratingField_;
-    
-    string acceleratingShapeFile_;
-    string focusingMagFile_;
-    double offsetMag_;
-    double scaleFactor_;
-    
-    
-    void setDefaultValues();
-    
-    void setDefaults();
-    
-    public :
-    
-    elementCell();
-    
-    
-    ~elementCell() { ;}
-    
-    virtual string* getParametersString() const;
-    
-    virtual void setParametersString(string* param);
-    
-    //   virtual  string parmelaOutputFlow() const;
-    
-    /* virtual string transportOutputFlow() const */
-    /* { */
-    /*     ostringstream sortie; */
-    /*     cout << " CELL sortie transport non programmee " << endl; */
-    /*     return sortie.str(); */
-    /* } */
-    
-    
-    virtual string FileOutputFlow() const;
-
-    virtual vector< pair<string, vector<string> > > parametersToSoftware () const;
-
-    virtual void FileInput(ifstream& ifs);
-    
-    /** return a string with all parameters and value
-     */
-    string print();
-    
+  virtual string* getParametersString() const;  
+  virtual void setParametersString(string* param);
+  virtual vector< pair<string, vector<string> > > parametersToSoftware () const;
+  // virtual  string parmelaOutputFlow() const;
+  // virtual string transportOutputFlow() const */
+  
+  virtual string FileOutputFlow() const;
+  virtual void FileInput(ifstream& ifs);
+  virtual void InputRep(UAPNode* root);
+  
+  /** return a string with all parameters and value */
+  string print();
 };
-
 #endif
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/elementDrift.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/elementDrift.h	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/elementDrift.h	(revision 424)
@@ -1,6 +1,6 @@
 #ifndef DRIFTDEFINITION_SEEN
 #define DRIFTDEFINITION_SEEN
+
 #include <string>
-
 #include "abstractElement.h"
 
@@ -9,39 +9,25 @@
 class elementDrift : public abstractElement
 {
+  
+  void setDefaultValues();
+  void setDefaults();
     
-    void setDefaultValues();
+ public:
     
-    void setDefaults();
+  elementDrift();
+  ~elementDrift() {;}
     
-public:
-    
-    elementDrift();
-    
-    
-    ~elementDrift() {;}
-    
-    
-    virtual string* getParametersString() const;
-    
-    virtual void setParametersString(string* param);
-    
-    //    virtual  string parmelaOutputFlow() const;
-    
-    //    virtual string transportOutputFlow() const;
-    
+  virtual string* getParametersString() const;
+  virtual void setParametersString(string* param);
+  virtual vector< pair<string, vector<string> > > parametersToSoftware () const;
+  //    virtual  string parmelaOutputFlow() const;  
+  //    virtual string transportOutputFlow() const;
     
     virtual string FileOutputFlow() const;
+    virtual void FileInput(ifstream& ifs);
+    virtual void InputRep(UAPNode* root);
 
-    virtual vector< pair<string, vector<string> > > parametersToSoftware () const;
-
-    virtual void FileInput(ifstream& ifs);
-    
-    /** return a string with all parameters and value
-     */
+    /** return a string with all parameters and value */
     string print();
-    
 };
-
-
-
 #endif
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/elementFit.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/elementFit.h	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/elementFit.h	(revision 424)
@@ -8,44 +8,32 @@
 using namespace std;
 
-
 class elementFit : public abstractElement
 {
+  // unites transport ( cm ; mrad)
+  string variableName_;
+  double variableValue_, tolerance_;  
+  string variableNameDef_;
+  double variableValueDef_, toleranceDef_;
+  
+  void setDefaultValues();
+  void setDefaults();  
     
+ public:
     
-    // unites transport ( cm ; mrad)
-    string variableName_;
-    double variableValue_, tolerance_;
+  elementFit();
+  ~elementFit() {;}
     
-    string variableNameDef_;
-    double variableValueDef_, toleranceDef_;
+  virtual void setParametersString(string* param);
+  virtual string* getParametersString() const;
+  virtual vector< pair<string, vector<string> > > parametersToSoftware () const;
+  //  virtual  string parmelaOutputFlow() const;
+  //  virtual string transportOutputFlow() const;
     
-    void setDefaultValues();
-    void setDefaults();
-    
-    
-public:
-    
-    elementFit();
-    ~elementFit() {;}
-    
-    
-    virtual void setParametersString(string* param);
-    
-    virtual string* getParametersString() const;
-    
-    //    virtual  string parmelaOutputFlow() const;
-    
-    //  virtual string transportOutputFlow() const;
-    
-    virtual  string FileOutputFlow() const;
-    
-    virtual vector< pair<string, vector<string> > > parametersToSoftware () const;
+  virtual  string FileOutputFlow() const;
+  virtual void FileInput(ifstream& ifs);
+  virtual void InputRep(UAPNode* root);
 
-    virtual void FileInput(ifstream& ifs);
-    
-    /** return a string with all parameters and value
-     */
-    string print();
-    
+  /** return a string with all parameters and value */
+  string print();
 };
 #endif
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/elementRfgun.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/elementRfgun.h	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/elementRfgun.h	(revision 424)
@@ -13,69 +13,48 @@
 {
     
-    //  int nbParam_;
-    //  string* parametersString_;
+  //  int nbParam_;
+  //  string* parametersString_;
+  double defaultPhaseStep_;
+  int defaultNmacrop_;
+  double defaultSigma_t_;
+  double defaultSigma_r_;
+  double defaultEmit_x_; 
+  double defaultEmit_y_; 
+  double defaultE_cin_;
+  double defaultSigma_E_;
+  double defaultTotalCharge_;
+  double phaseStep_; // a recuperer dans les parametres globaux (methode setPhaseStep)
+  int nmacrop_;
+  double sigma_t_; // picoseconds
+  double sigma_r_; // cm
+  double emit_x_; // pi.mm.mrad
+  double emit_y_; // pi.mm.mrad
+  double E_cin_;   // MeV
+  double sigma_E_; // MeV
+  double totalCharge_;  // nC
+  
+  void setDefaultValues();
+  void setDefaults();
     
-    double defaultPhaseStep_;
-    int defaultNmacrop_;
-    double defaultSigma_t_;
-    double defaultSigma_r_;
-    double defaultEmit_x_; 
-    double defaultEmit_y_; 
-    double defaultE_cin_;
-    double defaultSigma_E_;
-    double defaultTotalCharge_;
+ public:
     
-    double phaseStep_; // a recuperer dans les parametres globaux (methode setPhaseStep)
-    int nmacrop_;
-    double sigma_t_; // picoseconds
-    double sigma_r_; // cm
-    double emit_x_; // pi.mm.mrad
-    double emit_y_; // pi.mm.mrad
-    double E_cin_;   // MeV
-    double sigma_E_; // MeV
-    double totalCharge_;  // nC
-    
-    void setDefaultValues();
-    
-    void setDefaults();
-    
-public:
-    
-    elementRfgun();
-    
-    ~elementRfgun() {;}
-    
-    virtual void setPhaseStep(double ph) { phaseStep_ = ph;}
-    
-    
-    virtual string* getParametersString() const;
-    
-    virtual void setParametersString(string* param);
-    
-    virtual inline double getInitialKineticEnergy() const {return E_cin_;}
-    
-    //    virtual string parmelaOutputFlow() const;
-    
-    /* virtual string transportOutputFlow() const */
-    /* { */
-    /*     ostringstream sortie; */
-    /*     cout << " CELL sortie transport non programmee " << endl; */
-    /*     return sortie.str(); */
-    /* } */
-    
-    //   virtual string generatorOutputFlow() const;
+  elementRfgun();
+  ~elementRfgun() {;}
+  
+  virtual void setPhaseStep(double ph) { phaseStep_ = ph;}
+  virtual string* getParametersString() const;
+  virtual void setParametersString(string* param);  
+  virtual inline double getInitialKineticEnergy() const {return E_cin_;}
+  virtual vector< pair<string, vector<string> > > parametersToSoftware () const;
+  // virtual string parmelaOutputFlow() const;
+  // virtual string transportOutputFlow() const
+  // virtual string generatorOutputFlow() const;
 
-    virtual string FileOutputFlow() const;
-        virtual vector< pair<string, vector<string> > > parametersToSoftware () const;
+  virtual string FileOutputFlow() const;   
+  virtual void FileInput(ifstream& ifs);
+  virtual void InputRep(UAPNode* root);
 
-    virtual void FileInput(ifstream& ifs);
-    
-    /** return a string with all parameters and value
-     */
-    string print();
-    
-    
+  /** return a string with all parameters and value */
+  string print();
 };
-
-
 #endif
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/elementSnapshot.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/elementSnapshot.h	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/elementSnapshot.h	(revision 424)
@@ -10,11 +10,10 @@
 {
   int incr_;
-
   string snapshotFile_;
   void setDefaultValues();
   void setDefaults();
-    
+  
  public :
-
+  
   elementSnapshot() {;}
   elementSnapshot(int);
@@ -23,11 +22,11 @@
   virtual string* getParametersString() const;
   virtual void setParametersString(string* param);
-  //  virtual  string parmelaOutputFlow() const;
+  virtual vector< pair<string, vector<string> > > parametersToSoftware () const;
+  // virtual  string parmelaOutputFlow() const;
   // virtual string transportOutputFlow() const;  
    
   virtual string FileOutputFlow() const;  
-  virtual vector< pair<string, vector<string> > > parametersToSoftware () const;
-
   virtual void FileInput(ifstream& ifs);
+  virtual void InputRep(UAPNode* root);
   string print();  
 };
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/elementSoleno.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/elementSoleno.h	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/elementSoleno.h	(revision 424)
@@ -6,48 +6,34 @@
 #include "abstractElement.h"
 
-//#include "mathematicalTools.h"
-//#include "PhysicalConstants.h"
+using namespace std;
 
-using namespace std;
 class elementSoleno : public abstractElement
 {
+  
+  double B0_;   // en kilogauss
+  double B0Def_;// en kilogauss  
+  bool varyB0_;
+  bool varyB0Def_;
+  
+  void setDefaultValues();
+  void setDefaults();
+ 
+ public :
     
-    double B0_;   // en kilogauss
-    double B0Def_;   // en kilogauss
+  elementSoleno();
+  ~elementSoleno() {;}
+  
+  virtual void setParametersString(string* param);  
+  virtual string* getParametersString() const;
+  virtual vector< pair<string, vector<string> > > parametersToSoftware () const;
+  // virtual  string parmelaOutputFlow() const;
+  // virtual string transportOutputFlow() const;
     
-    bool varyB0_;
-    bool varyB0Def_;
-    
-    
-    
-    void setDefaultValues();
-    void setDefaults();
-    
-    
-    
-    public :
-    
-    elementSoleno();
-    
-    ~elementSoleno() {;}
-    
-    virtual void setParametersString(string* param);
-    
-    virtual string* getParametersString() const;
-    
-    //    virtual  string parmelaOutputFlow() const;
-    
-    //   virtual string transportOutputFlow() const;
-    
-    virtual  string FileOutputFlow() const;
-    
-  virtual vector< pair<string, vector<string> > > parametersToSoftware () const;
+  virtual  string FileOutputFlow() const;
+  virtual void FileInput(ifstream& ifs);
+  virtual void InputRep(UAPNode* root);
 
-    virtual void FileInput(ifstream& ifs);
-    
-    /** return a string with all parameters and value
-     */
-    string print();
-    
+  /** return a string with all parameters and value */
+  string print();
 };
 #endif
Index: /Interface_Web/trunk/pspaWT/sources/controler/include/globalParameters.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/include/globalParameters.h	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/include/globalParameters.h	(revision 424)
@@ -5,4 +5,6 @@
 #include <string>
 #include <fstream>
+
+#include "UAP/UAPNode.hpp"
 
 using namespace std;
@@ -56,4 +58,6 @@
   string FileOutputFlow() const;
   void FileInput(ifstream& ifs);
+
+  void InputRep(UAPNode* root);
 };
 #endif
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/dataManager.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/dataManager.cc	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/dataManager.cc	(revision 424)
@@ -5,5 +5,5 @@
 #include "softwareTransport.h"
 #include "GWt_pspaApplication.h"
-#include "GWt_console.h"Ã
+#include "GWt_console.h"
 #include "softwareGenerator.h"
 #include "softwareTest.h"
@@ -12,4 +12,7 @@
 #include <stdio.h>
 #include <fstream>
+
+#include "UAP/UAPUtilities.hpp"
+#include "AML/AMLReader.hpp"
 
 dataManager::dataManager(PspaApplication* pspa) :
@@ -102,12 +105,12 @@
 void dataManager::clearSectionToExecute(int a) {
   cout << " dataManager::clearSectionToExecute efaacement section d'index : " << a << endl;
-  if (a<0) return;
-  if (a>= jobList_.size()) return;
-
-  // lors de la creation de la section on a fait un 'new' d'un softwareXXXX
-  // on fait ici le 'delete'
+  if (a < 0) return;
+  if (a >= (int)jobList_.size()) return;
+
+  // lors de la creation de la section on a fait un 'new' d'un 
+  // softwareXXXX : on fait ici le 'delete'
 
   const abstractSoftware* soft = jobList_.at(a)->getSoftware();
-    if ( soft != NULL ) delete soft;
+  if ( soft != NULL ) delete soft;
   jobList_.erase (jobList_.begin()+a);
 }
@@ -151,27 +154,26 @@
   abstractSoftware* softw = NULL;
   string workingDir = pspa_->getWorkingDir();
-  int debut;
-  int fin;
+ 
   // on verifie la consecution des sections
   int lastel = 0;
-  for(unsigned k = 0; k < jobList_.size(); k++)
-    {
-      if ( jobList_[k]->getElementNumberInSection() != lastel +1 ) {
-        consoleMessage("dataManager::executeAll ERROR : sections should be consecutive ");
-	return false;
-      } else {
-	lastel = jobList_[k]->getLastElementNumberInSection();
-      }
-    }
-
-  for(unsigned k = 0; k < jobList_.size(); k++)
-    {
-      cout << " dataManager::executeAll je m'apprete a executer : " << (jobList_[k]->getSoftware()->getName()) << endl;
+  for(unsigned k = 0; k < jobList_.size(); k++) {
+    if ( jobList_[k]->getElementNumberInSection() != lastel +1 ) {
+      consoleMessage("dataManager::executeAll ERROR : sections should be consecutive ");
+      return false;
+    } else {
+      lastel = jobList_[k]->getLastElementNumberInSection();
+    }
+  }
+
+  unsigned debut;
+  unsigned fin;
+  for(unsigned k = 0; k < jobList_.size(); k++) {
+    cout << " dataManager::executeAll je m'apprete a executer : " << (jobList_[k]->getSoftware()->getName()) << endl;
       
-      debut = jobList_[k]->getElementNumberInSection();
-      fin = jobList_[k]->getLastElementNumberInSection();
-      softw = jobList_[k]->getSoftware();
-      
-      if (softw == NULL) {
+    debut = jobList_[k]->getElementNumberInSection();
+    fin = jobList_[k]->getLastElementNumberInSection();
+    softw = jobList_[k]->getSoftware();
+    
+    if (softw == NULL) {
         success = false;
         consoleMessage("dataManager::executeAll : unknown software");
@@ -196,5 +198,4 @@
       if ( !success ) break;
       
-      
       if ( debut < firstComputedElemNumero_ ) firstComputedElemNumero_ = debut;
       if ( fin > lastComputedElemNumero_ ) lastComputedElemNumero_ = fin;
@@ -203,12 +204,11 @@
       cout << "dataManager::executeAll #diagnosticBeam= " << diagnosticBeam_.size() << endl;
       cout << "dataManager::executeAll #getBeamLineSize()= " << getBeamLineSize() << endl;
-      for (int j = debut; j <= fin; j++) {
+      for (unsigned j = debut; j <= fin; j++) {
 	abstractElement* elPtr= getElementPointerFromNumero(j);
 	cout << "[" << j << "] " << elPtr->getNomdElement().getExpandedName() << endl;
       }
-    } //k
+  } //k
   
   cout << " dataManager::executeAll premier element : " << firstComputedElemNumero_ << " dernier : " << lastComputedElemNumero_ << endl;
-  
   return success;
 }
@@ -233,10 +233,44 @@
     outfile << globParam_.FileOutputFlow();
     abstractElement* elPtr;
-    for(unsigned k = 0; k < getBeamLineSize() ; k++)
+    for(int k = 0; k < getBeamLineSize() ; k++)
     {
-        elPtr = pspa_->getBeamLine()->getAbstractElement(k);
-        outfile << elPtr->FileOutputFlow();
+      elPtr = pspa_->getBeamLine()->getAbstractElement(k);
+      outfile << elPtr->FileOutputFlow();
     }
     outfile.close();
+}
+
+// ecriture sur fichier AML
+void dataManager::writeToAMLFile(string fileName)
+{
+  UAPNode* uap_root = NULL;
+  uap_root = new UAPNode("UAP_root");
+  UAPNode* rep = uap_root->addChild("AML_representation");
+
+  // root node in the hierarchy
+  UAPNode* lab = rep->addChild("laboratory");
+  lab->addAttribute("name","PSPA lab");
+
+  // general global parameters
+  globParam_.InputRep(lab);
+
+  // accelerator or section of accelerator
+  //UAPNode* acc = lab->addChild("machine");
+  //acc->addAttribute("name",fileName);
+
+  // sequence of elements
+  UAPNode* sect = lab->addChild("sector");
+  sect->addAttribute("name","a_sect");
+
+  abstractElement* elPtr;
+  for(int k = 0; k < getBeamLineSize() ; k++) {
+    elPtr = pspa_->getBeamLine()->getAbstractElement(k);
+    elPtr->InputRep(sect);
+  }
+  
+  cout << "!Create the AML file ---------------------------" << endl;
+  AMLReader reader;
+  string aml_file = pspa_->getWorkingDir() + "/" + fileName + ".aml";
+  reader.AMLRepToAMLFile (uap_root, aml_file);
 }
 
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/elementBeam.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/elementBeam.cc	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/elementBeam.cc	(revision 424)
@@ -3,82 +3,81 @@
 #include "mixedTools.h"
 
-elementBeam::elementBeam() :  abstractElement() {
-    setDefaultValues();
-    setDefaults();
-    elementName_ = nomdElements("beam");
-    nbParam_ = elementName_.getElementNbParameters();
-    parametersString_ = new string[nbParam_+1];
-    //  transportOk_ = true;
-    //    registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk);
+elementBeam::elementBeam() :  abstractElement() 
+{
+  setDefaultValues();
+  setDefaults();
+  elementName_ = nomdElements("beam");
+  nbParam_ = elementName_.getElementNbParameters();
+  parametersString_ = new string[nbParam_+1];
+  // transportOk_ = true;
+  // registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk);
 }
 
 elementBeam::~elementBeam() {;}
 
-void elementBeam::setDefaultValues() {
-    defaultSpecificName_ = "beam";
-    xDef_ = 0.0;
-    xpDef_ = 0.0;
-    yDef_ = 0.0;
-    ypDef_ = 0.0;
-    dlDef_ = 0.0;
-    delDef_ = 0.0;
-    p0Def_ = 0.0;
+void elementBeam::setDefaultValues() 
+{
+  defaultSpecificName_ = "beam";
+  xDef_ = 0.0;
+  xpDef_ = 0.0;
+  yDef_ = 0.0;
+  ypDef_ = 0.0;
+  dlDef_ = 0.0;
+  delDef_ = 0.0;
+  p0Def_ = 0.0;
 }
 
-void elementBeam::setDefaults() {
-    specificName_ = defaultSpecificName_;
-    x_ = xDef_;
-    xp_ = xpDef_;
-    y_ = yDef_;
-    yp_ = ypDef_;
-    dl_ = dlDef_;
-    del_ = delDef_;
-    p0_ = p0Def_;
+void elementBeam::setDefaults() 
+{
+  specificName_ = defaultSpecificName_;
+  x_ = xDef_;
+  xp_ = xpDef_;
+  y_ = yDef_;
+  yp_ = ypDef_;
+  dl_ = dlDef_;
+  del_ = delDef_;
+  p0_ = p0Def_;
 }
 
-
-string* elementBeam::getParametersString() const {
-    int compteur = -1;
-    parametersString_[++compteur] = mixedTools::intToString(nbParam_);
-    parametersString_[++compteur] = specificName_;
-    parametersString_[++compteur] = mixedTools::doubleToString(x_);
-    parametersString_[++compteur] = mixedTools::doubleToString(xp_);
-    parametersString_[++compteur] = mixedTools::doubleToString(y_);
-    parametersString_[++compteur] = mixedTools::doubleToString(yp_);
-    parametersString_[++compteur] = mixedTools::doubleToString(dl_);
-    parametersString_[++compteur] = mixedTools::doubleToString(del_);
-    parametersString_[++compteur] = mixedTools::doubleToString(p0_);
-    if ( compteur != nbParam_ ) {
-        cerr << " elementBeam::getParametersString() : ERROR nr pf parameters doesnt match " << endl;
-        return NULL;
-    }
-    return parametersString_;
+string* elementBeam::getParametersString() const 
+{
+  int compteur = -1;
+  parametersString_[++compteur] = mixedTools::intToString(nbParam_);
+  parametersString_[++compteur] = specificName_;
+  parametersString_[++compteur] = mixedTools::doubleToString(x_);
+  parametersString_[++compteur] = mixedTools::doubleToString(xp_);
+  parametersString_[++compteur] = mixedTools::doubleToString(y_);
+  parametersString_[++compteur] = mixedTools::doubleToString(yp_);
+  parametersString_[++compteur] = mixedTools::doubleToString(dl_);
+  parametersString_[++compteur] = mixedTools::doubleToString(del_);
+  parametersString_[++compteur] = mixedTools::doubleToString(p0_);
+  if ( compteur != nbParam_ ) {
+    cerr << " elementBeam::getParametersString() : ERROR nr pf parameters doesnt match " << endl;
+    return NULL;
+  }
+  return parametersString_;
 }
 
-
-
-
-void elementBeam::setParametersString(string* param) {
-    if ( param == NULL )
-    {
-        cerr << "  elementBeam::setParametersString parameters empty parameter set";
-        return;
-    }
-    int compteur = -1;
-    int nbparam = atoi(param[++compteur].c_str());
-    if ( nbparam != nbParam_ )
-    {
-        cerr << "  elementBeam::setParametersString parameters do not match for a BEAM";
-        return;
-    }
+void elementBeam::setParametersString(string* param)
+{
+  if ( param == NULL ) {
+    cerr << "  elementBeam::setParametersString parameters empty parameter set";
+    return;
+  }
+  int compteur = -1;
+  int nbparam = atoi(param[++compteur].c_str());
+  if ( nbparam != nbParam_ ) {
+    cerr << "  elementBeam::setParametersString parameters do not match for a BEAM";
+    return;
+  }
     
-    specificName_ = param[++compteur];
-    x_ = atof(param[++compteur].c_str());
-    xp_ = atof(param[++compteur].c_str());
-    y_ = atof(param[++compteur].c_str());
-    yp_ = atof(param[++compteur].c_str());
-    dl_ = atof(param[++compteur].c_str());
-    del_ = atof(param[++compteur].c_str());
-    p0_ = atof(param[++compteur].c_str());
+  specificName_ = param[++compteur];
+  x_ = atof(param[++compteur].c_str());
+  xp_ = atof(param[++compteur].c_str());
+  y_ = atof(param[++compteur].c_str());
+  yp_ = atof(param[++compteur].c_str());
+  dl_ = atof(param[++compteur].c_str());
+  del_ = atof(param[++compteur].c_str());
+  p0_ = atof(param[++compteur].c_str());
 }
 
@@ -98,16 +97,18 @@
 // }
 
-string elementBeam::FileOutputFlow() const {
-    ostringstream sortie;
-    // sortie << elementName_.getElementType() << endl;
-    sortie << elementName_.getGenericLabel() << endl;
-    sortie  << specificName_ << endl;
-    sortie << x_ << "  " << xp_ << " " <<  y_  << " " <<  yp_  << endl;
-    sortie << dl_ << "  " << del_ << " " <<  p0_  << endl;
-    cout << " elementBeam::FileOutputFlow, p0 = " << p0_ << endl;
-    return sortie.str();
+string elementBeam::FileOutputFlow() const 
+{
+  ostringstream sortie;
+  // sortie << elementName_.getElementType() << endl;
+  sortie << elementName_.getGenericLabel() << endl;
+  sortie  << specificName_ << endl;
+  sortie << x_ << "  " << xp_ << " " <<  y_  << " " <<  yp_  << endl;
+  sortie << dl_ << "  " << del_ << " " <<  p0_  << endl;
+  cout << " elementBeam::FileOutputFlow, p0 = " << p0_ << endl;
+  return sortie.str();
 }
 
-vector< pair<string, vector<string> > > elementBeam::parametersToSoftware () const {
+vector< pair<string, vector<string> > > elementBeam::parametersToSoftware () const 
+{
   vector< pair<string, vector<string> > >  sortie;
   sortie.push_back( pair<string, vector<string> >("labelsGenericSpecific",  vector<string>() ) );
@@ -127,33 +128,63 @@
 }
 
-
-void elementBeam::elementBeam::FileInput(ifstream& ifs) {
-    ifs >> specificName_;
-    ifs >> x_ >> xp_ >>  y_ >> yp_;
-    ifs >> dl_ >> del_ >> p0_;
-    cout << " elementBeam::FileFileInput, p0 = " << p0_ << endl;
-    lenghtElem_ = getLenghtOfElement();
-    cout << " elementBeam::FileInput calcule longueur = " << lenghtElem_ << endl;
+void elementBeam::elementBeam::FileInput(ifstream& ifs) 
+{
+  ifs >> specificName_;
+  ifs >> x_ >> xp_ >>  y_ >> yp_;
+  ifs >> dl_ >> del_ >> p0_;
+  cout << " elementBeam::FileFileInput, p0 = " << p0_ << endl;
+  lenghtElem_ = getLenghtOfElement();
+  cout << " elementBeam::FileInput calcule longueur = " << lenghtElem_ << endl;
 }
 
+string elementBeam::print() 
+{
+  string txt = "";
+  txt += specificName_;
+  txt += "\n 1/2 horizontal beam extend rms (cm) : ";
+  txt += mixedTools::doubleToString(x_);
+  txt += "\n 1/2 horizontal beam divergence rms (mrad) : ";
+  txt += mixedTools::doubleToString(xp_);
+  txt += "\n1/2 vertical beam extend rms (cm) : ";
+  txt += mixedTools::doubleToString(y_);
+  txt += "\n1/2 horizontal beam divergence rms (mrad) : ";
+  txt += mixedTools::doubleToString(yp_);
+  txt += "\n1/2 longitudinal beam extend rms (cm) : ";
+  txt += mixedTools::doubleToString(dl_);
+  txt += "\n1/2 momentum spread rms (mrad) : ";
+  txt += mixedTools::doubleToString(del_);
+  txt += "\nmomentum of the central trajectory (GeV/c) : ";
+  txt += mixedTools::doubleToString(p0_);  
+  return txt;
+}
 
-string elementBeam::print() {
-    string txt = "";
-    txt += specificName_;
-    txt += "\n 1/2 horizontal beam extend rms (cm) : ";
-    txt += mixedTools::doubleToString(x_);
-    txt += "\n 1/2 horizontal beam divergence rms (mrad) : ";
-    txt += mixedTools::doubleToString(xp_);
-    txt += "\n1/2 vertical beam extend rms (cm) : ";
-    txt += mixedTools::doubleToString(y_);
-    txt += "\n1/2 horizontal beam divergence rms (mrad) : ";
-    txt += mixedTools::doubleToString(yp_);
-    txt += "\n1/2 longitudinal beam extend rms (cm) : ";
-    txt += mixedTools::doubleToString(dl_);
-    txt += "\n1/2 momentum spread rms (mrad) : ";
-    txt += mixedTools::doubleToString(del_);
-    txt += "\nmomentum of the central trajectory (GeV/c) : ";
-    txt += mixedTools::doubleToString(p0_);
-    
-    return txt;
+void elementBeam::InputRep(UAPNode* root)
+{
+  UAPNode* ele = root->addChild("element");
+  ele->addAttribute("name",specificName_);
+  
+  UAPNode* node = ele->addChild("beam");
+
+  // je fixe le type de particule, plus tard on pourra donner le choix
+  node->addChild("particle")->addAttribute("type","ELECTRON");
+
+  // matrice 6X6
+  UAPNode* snode = node->addChild("sigma_matrix");
+  string txt = "";
+  txt = mixedTools::doubleToString(x_);
+  snode->addChild("11")->addAttribute("design",txt);
+  txt = mixedTools::doubleToString(xp_);
+  snode->addChild("22")->addAttribute("design",txt);
+  txt = mixedTools::doubleToString(y_);
+  snode->addChild("33")->addAttribute("design",txt);
+  txt = mixedTools::doubleToString(yp_);
+  snode->addChild("44")->addAttribute("design",txt);
+  txt = mixedTools::doubleToString(dl_);
+  snode->addChild("55")->addAttribute("design",txt);
+  txt = mixedTools::doubleToString(del_);
+  snode->addChild("66")->addAttribute("design",txt);
+
+  // momentum of the central trajectory (GeV/c)
+  txt = mixedTools::doubleToString(p0_);
+  node->addChild("pc")->addAttribute("design",txt);
 }
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/elementBend.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/elementBend.cc	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/elementBend.cc	(revision 424)
@@ -11,78 +11,76 @@
   nbParam_ = elementName_.getElementNbParameters();
   parametersString_ = new string[nbParam_+1];
-    // registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk);
-    // registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolOk);
-}
-
-  void elementBend::setDefaultValues()
-  {
-    defaultSpecificName_ = "bend";
-    angleDegDef_ = 0.0;
-    radiusDef_ = 1.0;
-    beta1Def_ = 0.0;
-    beta2Def_ = 0.0;
-    momentumDef_ = 0.0;
+  // registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk);
+  // registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolOk);
+}
+
+void elementBend::setDefaultValues()
+{
+  defaultSpecificName_ = "bend";
+  angleDegDef_ = 0.0;
+  radiusDef_ = 1.0;
+  beta1Def_ = 0.0;
+  beta2Def_ = 0.0;
+  momentumDef_ = 0.0;
+}
+
+void elementBend::setDefaults()
+{
+  specificName_ = defaultSpecificName_;
+  angleDeg_ = angleDegDef_;
+  radius_ = radiusDef_;
+  beta1_ = beta1Def_;
+  beta2_ = beta2Def_;
+  momentum_ = momentumDef_;
+}
+
+string* elementBend::getParametersString() const 
+{
+  int compteur = -1;
+  parametersString_[++compteur] = mixedTools::intToString(nbParam_);
+  parametersString_[++compteur] = specificName_;
+  parametersString_[++compteur] = mixedTools::doubleToString( angleDeg_);
+  parametersString_[++compteur] = mixedTools::doubleToString(radius_);
+  parametersString_[++compteur] = mixedTools::doubleToString(momentum_);
+  parametersString_[++compteur] = mixedTools::doubleToString(aperture_);
+  parametersString_[++compteur] = mixedTools::doubleToString(beta1_);
+  parametersString_[++compteur] = mixedTools::doubleToString(beta2_);
+  if ( compteur != nbParam_ ) {
+    cerr << " elementBend::getParametersString() : ERROR nr pf parameters dosnt match " << endl;
+    return NULL;
   }
-
-  void elementBend::setDefaults()
-  {
-    specificName_ = defaultSpecificName_;
-    angleDeg_ = angleDegDef_;
-    radius_ = radiusDef_;
-    beta1_ = beta1Def_;
-    beta2_ = beta2Def_;
-    momentum_ = momentumDef_;
+  return parametersString_;
+}
+
+double elementBend::getLenghtOfElement() const 
+{
+  return 1.0e2 * radius_ * angleDeg_ * DEG_TO_RADIANS; 
+}
+
+
+void  elementBend::setParametersString(string* param)
+{
+  if ( param == NULL ) {
+    cerr << "  elementBend::setParametersString parameters empty parameter set";
+    return;
   }
-
- string* elementBend::getParametersString() const 
- {
-   int compteur = -1;
-   parametersString_[++compteur] = mixedTools::intToString(nbParam_);
-   parametersString_[++compteur] = specificName_;
-   parametersString_[++compteur] = mixedTools::doubleToString( angleDeg_);
-   parametersString_[++compteur] = mixedTools::doubleToString(radius_);
-   parametersString_[++compteur] = mixedTools::doubleToString(momentum_);
-   parametersString_[++compteur] = mixedTools::doubleToString(aperture_);
-   parametersString_[++compteur] = mixedTools::doubleToString(beta1_);
-   parametersString_[++compteur] = mixedTools::doubleToString(beta2_);
-   if ( compteur != nbParam_ ) {
-     cerr << " elementBend::getParametersString() : ERROR nr pf parameters dosnt match " << endl;
-     return NULL;
-   }
-   return parametersString_;
- }
-
- double elementBend::getLenghtOfElement() const 
-{
- return 1.0e2 * radius_ * angleDeg_ * DEG_TO_RADIANS; 
-}
-
-
- void  elementBend::setParametersString(string* param)
- {
-  	if ( param == NULL )
-	{
-	  cerr << "  elementBend::setParametersString parameters empty parameter set";
-	  return;
-	}
-
-   int compteur = -1;
-   int nbparam = atoi(param[++compteur].c_str());
-    if ( nbparam != nbParam_ ) 
-	{
-	  cerr << "  elementBend::setParametersString parameters do not match for a BEND" << endl;
-	  return;
-	}
-    specificName_ = param[++compteur];
-    angleDeg_ =  atof(param[++compteur].c_str());
-    radius_ = atof(param[++compteur].c_str());
-    momentum_ = atof(param[++compteur].c_str());
-    aperture_  = atof(param[++compteur].c_str());
-    beta1_ = atof(param[++compteur].c_str());
-    beta2_ = atof(param[++compteur].c_str());
-    // calcul de la longueur : rayon en m ; longueur en cm
-    lenghtElem_ = getLenghtOfElement();
-    cout << " elementBend::setParametersString calcule longueur = " << lenghtElem_ << endl;
- }
+  
+  int compteur = -1;
+  int nbparam = atoi(param[++compteur].c_str());
+  if ( nbparam != nbParam_ ) {
+    cerr << "  elementBend::setParametersString parameters do not match for a BEND" << endl;
+    return;
+  }
+  specificName_ = param[++compteur];
+  angleDeg_ =  atof(param[++compteur].c_str());
+  radius_ = atof(param[++compteur].c_str());
+  momentum_ = atof(param[++compteur].c_str());
+  aperture_  = atof(param[++compteur].c_str());
+  beta1_ = atof(param[++compteur].c_str());
+  beta2_ = atof(param[++compteur].c_str());
+  // calcul de la longueur : rayon en m ; longueur en cm
+  lenghtElem_ = getLenghtOfElement();
+  cout << " elementBend::setParametersString calcule longueur = " << lenghtElem_ << endl;
+}
 
 // string elementBend::parmelaOutputFlow() const
@@ -109,15 +107,16 @@
 
 string elementBend::FileOutputFlow() const
-  {
-    ostringstream sortie;
-    //    sortie << elementName_.getElementType() << endl;
-    sortie << elementName_.getGenericLabel() << endl;
-    sortie  << specificName_ << endl;
-    sortie << angleDeg_ << "  " << radius_ << " " <<  aperture_  << endl;
-    sortie << beta1_ << "  " << beta2_ << " " << momentum_ << endl;
-    return sortie.str();
-  }
-
-vector< pair<string, vector<string> > > elementBend::parametersToSoftware () const{
+{
+  ostringstream sortie;
+  //    sortie << elementName_.getElementType() << endl;
+  sortie << elementName_.getGenericLabel() << endl;
+  sortie  << specificName_ << endl;
+  sortie << angleDeg_ << "  " << radius_ << " " <<  aperture_  << endl;
+  sortie << beta1_ << "  " << beta2_ << " " << momentum_ << endl;
+  return sortie.str();
+}
+
+vector< pair<string, vector<string> > > elementBend::parametersToSoftware () const
+{
   vector< pair<string, vector<string> > >  sortie;
   sortie.push_back( pair<string, vector<string> >("labelsGenericSpecific",  vector<string>() ) );
@@ -148,24 +147,55 @@
 }
 
-
-string elementBend::print() {
-    string txt = "";
-
-    txt += specificName_;
-    txt += "\nangle (deg.) : ";
-    txt += mixedTools::doubleToString(angleDeg_);
-    txt += "\nradius (m) : ";
-    txt += mixedTools::doubleToString(radius_);
-    txt += "\nmomentum (MeV/c) : ";
-    txt += mixedTools::doubleToString(momentum_);
-    txt += "\nlength (cm) : ";
-    txt += mixedTools::doubleToString(lenghtElem_);
-    txt += "\naperture (cm) : ";
-    txt += mixedTools::doubleToString(aperture_);
-    txt += "\npole face rotations (deg.) entrance : ";
-    txt += mixedTools::doubleToString(beta1_);
-    txt += "\nexit : ";
-    txt += mixedTools::doubleToString(beta2_);
-    
-    return txt;
-}
+string elementBend::print() 
+{
+  string txt = "";
+  txt += specificName_;
+  txt += "\nangle (deg.) : ";
+  txt += mixedTools::doubleToString(angleDeg_);
+  txt += "\nradius (m) : ";
+  txt += mixedTools::doubleToString(radius_);
+  txt += "\nmomentum (MeV/c) : ";
+  txt += mixedTools::doubleToString(momentum_);
+  txt += "\nlength (cm) : ";
+  txt += mixedTools::doubleToString(lenghtElem_);
+  txt += "\naperture (cm) : ";
+  txt += mixedTools::doubleToString(aperture_);
+  txt += "\npole face rotations (deg.) entrance : ";
+  txt += mixedTools::doubleToString(beta1_);
+  txt += "\nexit : ";
+  txt += mixedTools::doubleToString(beta2_);
+  return txt;
+}
+
+void elementBend::InputRep(UAPNode* root)
+{
+  UAPNode* ele = root->addChild("element");
+  ele->addAttribute("name",specificName_);
+
+  string txt = "";
+  txt = mixedTools::doubleToString(lenghtElem_);
+  ele->addChild("length")->addAttribute("design",txt);
+
+  // pour Parmela /aper : radius of aperture at exit (gap)
+  UAPNode* node = ele->addChild("aperture");
+  node->addAttribute("at","EXIT");
+  node->addAttribute("shape","CIRCLE");
+  txt = mixedTools::doubleToString(aperture_);
+  node->addChild("xy_limit")->addAttribute("design",txt);
+
+  // ??? encore pour Parmela /wt : ref energy
+  txt = mixedTools::doubleToString(momentum_);
+  ele->addChild("momentum")->addAttribute("design",txt);
+
+  node = ele->addChild("bend");
+
+  // bending field g= 1/r = angle/length : on en dÃ©duit angle= g*length
+  double g = 1.0/radius_;
+  txt = mixedTools::doubleToString(g);
+  node->addChild("g")->addAttribute("design",txt);
+
+  txt = mixedTools::doubleToString(beta1_);
+  node->addChild("e1")->addAttribute("design",txt);
+  txt = mixedTools::doubleToString(beta2_);
+  node->addChild("e2")->addAttribute("design",txt);  
+}
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/elementCell.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/elementCell.cc	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/elementCell.cc	(revision 424)
@@ -8,84 +8,80 @@
 
 elementCell::elementCell()  : abstractElement() 
-    {
-      setDefaultValues();
-      setDefaults();
-      elementName_ = nomdElements("cell");
-      nbParam_ = elementName_.getElementNbParameters();
-      parametersString_ = new string[nbParam_+1];
-      //        registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolOk);
-    }
+{
+  setDefaultValues();
+  setDefaults();
+  elementName_ = nomdElements("cell");
+  nbParam_ = elementName_.getElementNbParameters();
+  parametersString_ = new string[nbParam_+1];
+  //        registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolOk);
+}
 
 void elementCell::setDefaultValues()
 {
-    defaultSpecificName_ = "cell";
-    initialPhaseDef_ = 0.0;
-    acceleratingFieldDef_ = 1.0;
-    acceleratingShapeFileDef_ = "xxxxxxx";
-    focusingMagFileDef_ = "xxxxxx";
-    offsetMagDef_ = 0.0;
-    scaleFactorDef_ = 1.0;
+  defaultSpecificName_ = "cell";
+  initialPhaseDef_ = 0.0;
+  acceleratingFieldDef_ = 1.0;
+  acceleratingShapeFileDef_ = "xxxxxxx";
+  focusingMagFileDef_ = "xxxxxx";
+  offsetMagDef_ = 0.0;
+  scaleFactorDef_ = 1.0;
 }
 
 void elementCell::setDefaults()
 {
-    specificName_ = defaultSpecificName_;
-    initialPhase_ = initialPhaseDef_;
-    acceleratingField_ = acceleratingFieldDef_;
-    acceleratingShapeFile_ = acceleratingShapeFileDef_;
-    focusingMagFile_ = focusingMagFileDef_;
-    offsetMag_ = offsetMagDef_;
-    scaleFactor_ = scaleFactorDef_;
-  }
-
-
-  string* elementCell::getParametersString() const 
-  {
-   int compteur = -1;
-    parametersString_[++compteur] = mixedTools::intToString(nbParam_);
+  specificName_ = defaultSpecificName_;
+  initialPhase_ = initialPhaseDef_;
+  acceleratingField_ = acceleratingFieldDef_;
+  acceleratingShapeFile_ = acceleratingShapeFileDef_;
+  focusingMagFile_ = focusingMagFileDef_;
+  offsetMag_ = offsetMagDef_;
+  scaleFactor_ = scaleFactorDef_;
+}
+
+string* elementCell::getParametersString() const 
+{
+  int compteur = -1;
+  parametersString_[++compteur] = mixedTools::intToString(nbParam_);
   parametersString_[++compteur] = specificName_;
-    parametersString_[++compteur] = mixedTools::doubleToString(lenghtElem_);
-    parametersString_[++compteur] = mixedTools::doubleToString(aperture_);
-    parametersString_[++compteur] = mixedTools::doubleToString(initialPhase_);
-    parametersString_[++compteur] = mixedTools::doubleToString( phaseStepMax_);
-    parametersString_[++compteur] = mixedTools::doubleToString(acceleratingField_);
-    parametersString_[++compteur] = acceleratingShapeFile_;
-    parametersString_[++compteur] = focusingMagFile_;
-    parametersString_[++compteur] = mixedTools::doubleToString(offsetMag_);
-    parametersString_[++compteur] = mixedTools::doubleToString(scaleFactor_);
-   if ( compteur != nbParam_ ) {
-     cerr << " elementCell::getParametersString() : ERROR nr pf parameters dosnt match " << endl;
-     return NULL;
-   }
-    return parametersString_;
-  }
-
+  parametersString_[++compteur] = mixedTools::doubleToString(lenghtElem_);
+  parametersString_[++compteur] = mixedTools::doubleToString(aperture_);
+  parametersString_[++compteur] = mixedTools::doubleToString(initialPhase_);
+  parametersString_[++compteur] = mixedTools::doubleToString( phaseStepMax_);
+  parametersString_[++compteur] = mixedTools::doubleToString(acceleratingField_);
+  parametersString_[++compteur] = acceleratingShapeFile_;
+  parametersString_[++compteur] = focusingMagFile_;
+  parametersString_[++compteur] = mixedTools::doubleToString(offsetMag_);
+  parametersString_[++compteur] = mixedTools::doubleToString(scaleFactor_);
+  if ( compteur != nbParam_ ) {
+    cerr << " elementCell::getParametersString() : ERROR nr pf parameters dosnt match " << endl;
+    return NULL;
+  }
+  return parametersString_;
+}
 
 void elementCell::setParametersString(string* param)
-  {
-    if ( param == NULL )
-      {
-	cerr << "  elementCell::setParametersString parameters empty parameter set";
-	return;
-      }
-   int compteur = -1;
-    int nbparam = atoi(param[++compteur].c_str());
-    if ( nbparam != nbParam_ ) 
-      {
-	cerr << "  elementCell::setParametersString parameters do not match for a CELL";
-	return;
-      }
-
-    specificName_ = param[++compteur];
-    lenghtElem_ = atof(param[++compteur].c_str());
-    aperture_ = atof(param[++compteur].c_str());
-    initialPhase_ = atof(param[++compteur].c_str());
-    phaseStepMax_ = atof(param[++compteur].c_str());
-    acceleratingField_ = atof(param[++compteur].c_str());
-    acceleratingShapeFile_ = param[++compteur];
-    focusingMagFile_ = param[++compteur];
-    offsetMag_ = atof(param[++compteur].c_str());
-    scaleFactor_ = atof(param[++compteur].c_str());
-  }
+{
+  if ( param == NULL ) {
+    cerr << "  elementCell::setParametersString parameters empty parameter set";
+    return;
+  }
+  int compteur = -1;
+  int nbparam = atoi(param[++compteur].c_str());
+  if ( nbparam != nbParam_ ) {
+    cerr << "  elementCell::setParametersString parameters do not match for a CELL";
+    return;
+  }
+  
+  specificName_ = param[++compteur];
+  lenghtElem_ = atof(param[++compteur].c_str());
+  aperture_ = atof(param[++compteur].c_str());
+  initialPhase_ = atof(param[++compteur].c_str());
+  phaseStepMax_ = atof(param[++compteur].c_str());
+  acceleratingField_ = atof(param[++compteur].c_str());
+  acceleratingShapeFile_ = param[++compteur];
+  focusingMagFile_ = param[++compteur];
+  offsetMag_ = atof(param[++compteur].c_str());
+  scaleFactor_ = atof(param[++compteur].c_str());
+}
 
 // string elementCell::parmelaOutputFlow() const
@@ -107,20 +103,20 @@
 
 string elementCell::FileOutputFlow() const
-  {
-    ostringstream sortie;
-    //    sortie << elementName_.getElementType()  << endl;
-    sortie << elementName_.getGenericLabel() << endl;
-    sortie  << specificName_ << endl;
-    sortie << lenghtElem_ << " " << aperture_ << endl;
-    sortie << initialPhase_ << "  " << acceleratingField_ << endl;
-    sortie << phaseStepMax_ << endl;
-    sortie << acceleratingShapeFile_ << endl;
-    sortie << focusingMagFile_ << endl;
-    sortie << offsetMag_ << " " << scaleFactor_ << endl;
-    return sortie.str();
-  }
-
-
-vector< pair<string, vector<string> > > elementCell::parametersToSoftware () const {
+{
+  ostringstream sortie;
+  //    sortie << elementName_.getElementType()  << endl;
+  sortie << elementName_.getGenericLabel() << endl;
+  sortie  << specificName_ << endl;
+  sortie << lenghtElem_ << " " << aperture_ << endl;
+  sortie << initialPhase_ << "  " << acceleratingField_ << endl;
+  sortie << phaseStepMax_ << endl;
+  sortie << acceleratingShapeFile_ << endl;
+  sortie << focusingMagFile_ << endl;
+  sortie << offsetMag_ << " " << scaleFactor_ << endl;
+  return sortie.str();
+}
+
+vector< pair<string, vector<string> > > elementCell::parametersToSoftware () const 
+{
   vector< pair<string, vector<string> > >  sortie;
   sortie.push_back( pair<string, vector<string> >("labelsGenericSpecific",  vector<string>() ) );
@@ -140,8 +136,7 @@
   sortie.back().second.push_back(mixedTools::doubleToString( offsetMag_));
   sortie.back().second.push_back(mixedTools::doubleToString( scaleFactor_));
-
+  
   return sortie;
 }
-
 
 void elementCell::FileInput(ifstream& ifs)
@@ -156,28 +151,67 @@
 }
 
-
-string elementCell::print() {
-    string txt = "";
-
-
-    txt += specificName_;
-    txt += "\nlength (cm) : ";
-    txt += mixedTools::doubleToString(lenghtElem_);
-    txt += "\naperture (cm) : ";
-    txt += mixedTools::doubleToString(aperture_);
-    txt += "\ninitial phase (deg.) : ";
-    txt += mixedTools::doubleToString(initialPhase_);
-    txt += "\nmax phase step (deg.) : ";
-    txt += mixedTools::doubleToString(phaseStepMax_);
-    txt += "\nmax accelerating field (MV/m) : ";
-    txt += mixedTools::doubleToString(acceleratingField_);
-    txt += "\nname of file for field shape : ";
-    txt += acceleratingShapeFile_;
-    txt += "\nname of file for focusing mag. field : ";
-    txt += focusingMagFile_;
-    txt += "\n z-offset for mag. field : ";
-    txt += mixedTools::doubleToString(offsetMag_);
-    txt += "\n scaling factor for mag. field : ";
-    txt += mixedTools::doubleToString(scaleFactor_);
-    return txt;
-}
+string elementCell::print() 
+{
+  string txt = "";
+  txt += specificName_;
+  txt += "\nlength (cm) : ";
+  txt += mixedTools::doubleToString(lenghtElem_);
+  txt += "\naperture (cm) : ";
+  txt += mixedTools::doubleToString(aperture_);
+  txt += "\ninitial phase (deg.) : ";
+  txt += mixedTools::doubleToString(initialPhase_);
+  txt += "\nmax phase step (deg.) : ";
+  txt += mixedTools::doubleToString(phaseStepMax_);
+  txt += "\nmax accelerating field (MV/m) : ";
+  txt += mixedTools::doubleToString(acceleratingField_);
+  txt += "\nname of file for field shape : ";
+  txt += acceleratingShapeFile_;
+  txt += "\nname of file for focusing mag. field : ";
+  txt += focusingMagFile_;
+  txt += "\n z-offset for mag. field : ";
+  txt += mixedTools::doubleToString(offsetMag_);
+  txt += "\n scaling factor for mag. field : ";
+  txt += mixedTools::doubleToString(scaleFactor_);
+  return txt;
+}
+
+void elementCell::InputRep(UAPNode* root)
+{
+  UAPNode* ele = root->addChild("element");
+  ele->addAttribute("name",specificName_);
+
+  UAPNode* node = ele->addChild("methods");
+  node->addChild("tracking")->addAttribute("value","parmela");
+
+  string txt = "";
+  txt = mixedTools::doubleToString(lenghtElem_);
+  ele->addChild("length")->addAttribute("design",txt);
+
+  node = ele->addChild("aperture");
+  node->addAttribute("at","ENTRANCE");
+  node->addAttribute("shape","CIRCLE");
+  txt = mixedTools::doubleToString(aperture_);
+  node->addChild("xy_limit")->addAttribute("design",txt);
+
+  node = ele->addChild("linac_cavity");
+  txt = mixedTools::doubleToString(initialPhase_);
+  node->addChild("phase0")->addAttribute("design",txt);
+  txt = mixedTools::doubleToString(acceleratingField_);
+  node->addChild("gradient")->addAttribute("design",txt);
+
+  // donnÃ©es propres Ã  Parmela
+  ele->addChild("comment")->addAttribute("text","data specific to Parmela");
+  txt = mixedTools::doubleToString(phaseStepMax_);
+  ele->addChild("phaseStepMax")->addAttribute("value",txt);
+  txt = acceleratingShapeFile_;
+  ele->addChild("acceleratingShapeField")->addAttribute("name",txt);
+
+  if ( focusingMagFile_ != "") {
+    txt = focusingMagFile_;
+    ele->addChild("focusingMagneticField")->addAttribute("name",txt);
+    txt = mixedTools::doubleToString(offsetMag_);
+    ele->addChild("z_offset")->addAttribute("value",txt);
+    txt = mixedTools::doubleToString(scaleFactor_);
+    ele->addChild("scaling_factor")->addAttribute("value",txt);
+  }
+}
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/elementDrift.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/elementDrift.cc	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/elementDrift.cc	(revision 424)
@@ -13,52 +13,47 @@
   nbParam_ = elementName_.getElementNbParameters();
   parametersString_ = new string[nbParam_+1];
-    // registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk);
-    // registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolOk);
-    // registerAcceptableSoftware(nomDeLogiciel::test, TBoolOk);
-
+  // registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk);
+  // registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolOk);
+  // registerAcceptableSoftware(nomDeLogiciel::test, TBoolOk);
 }
 
-  void elementDrift::setDefaultValues()
-  {
-    defaultSpecificName_ = "drift";
+void elementDrift::setDefaultValues() {
+  defaultSpecificName_ = "drift";
+}
+
+void elementDrift::setDefaults() {
+  specificName_ = defaultSpecificName_;
+}
+
+string* elementDrift::getParametersString() const 
+{
+  int compteur = -1;
+  parametersString_[++compteur] = mixedTools::intToString(nbParam_);
+  parametersString_[++compteur] = specificName_;
+  parametersString_[++compteur] = mixedTools::doubleToString(lenghtElem_);
+  parametersString_[++compteur] = mixedTools::doubleToString(aperture_);
+  if ( compteur != nbParam_ ) {
+    cerr << " elementDrift::getParametersString() : ERROR nr pf parameters dosnt match " << endl;
+    return NULL;
   }
-  void elementDrift::setDefaults()
-  {
-    specificName_ = defaultSpecificName_;
+  return parametersString_;
+}
+
+void  elementDrift::setParametersString(string* param)
+{
+  if ( param == NULL ) {
+    cerr << "  elementDrift::setParametersString parameters empty parameter set";
+    return;
   }
-
-
- string* elementDrift::getParametersString() const 
- {
-   int compteur = -1;
-   parametersString_[++compteur] = mixedTools::intToString(nbParam_);
-  parametersString_[++compteur] = specificName_;
-   parametersString_[++compteur] = mixedTools::doubleToString(lenghtElem_);
-   parametersString_[++compteur] = mixedTools::doubleToString(aperture_);
-   if ( compteur != nbParam_ ) {
-     cerr << " elementDrift::getParametersString() : ERROR nr pf parameters dosnt match " << endl;
-     return NULL;
-   }
-   return parametersString_;
- }
-
- void  elementDrift::setParametersString(string* param)
- {
-   if ( param == NULL )
-     {
-       cerr << "  elementDrift::setParametersString parameters empty parameter set";
-       return;
-     }
-   int compteur = -1;
-   int nbparam = atoi(param[++compteur].c_str());
-   if ( nbparam != nbParam_ ) 
-     {
-       cerr << "  elementDrift::setParametersString parameters do not match for a DRIFT";
-       return;
-     }
+  int compteur = -1;
+  int nbparam = atoi(param[++compteur].c_str());
+  if ( nbparam != nbParam_ ) {
+    cerr << "  elementDrift::setParametersString parameters do not match for a DRIFT";
+    return;
+  }
   specificName_ = param[++compteur];
-   lenghtElem_ = atof(param[++compteur].c_str());
-   aperture_  = atof(param[++compteur].c_str());
- }
+  lenghtElem_ = atof(param[++compteur].c_str());
+  aperture_  = atof(param[++compteur].c_str());
+}
 
 // string elementDrift::parmelaOutputFlow() const
@@ -68,5 +63,4 @@
 //   return sortie.str();
 // }
-
 
 // string elementDrift::transportOutputFlow() const
@@ -89,5 +83,6 @@
 }
 
-vector< pair<string, vector<string> > > elementDrift::parametersToSoftware () const {
+vector< pair<string, vector<string> > > elementDrift::parametersToSoftware () const 
+{
   vector< pair<string, vector<string> > >  sortie;
   sortie.push_back( pair<string, vector<string> >("labelsGenericSpecific",  vector<string>() ) );
@@ -100,6 +95,4 @@
 }
 
-
-
 void elementDrift::FileInput(ifstream& ifs)
 {
@@ -108,14 +101,28 @@
 }
 
+string elementDrift::print() 
+{
+  string txt = "";
+  txt += specificName_;
+  txt += "\nlength (cm) : ";
+  txt += mixedTools::doubleToString(lenghtElem_);
+  txt += "\naperture (cm) : ";
+  txt += mixedTools::doubleToString(aperture_);  
+  return txt;
+}
 
-string elementDrift::print() {
-    string txt = "";
+void elementDrift::InputRep(UAPNode* root)
+{
+  UAPNode* ele = root->addChild("element");
+  ele->addAttribute("name",specificName_);
 
-    txt += specificName_;
-    txt += "\nlength (cm) : ";
-    txt += mixedTools::doubleToString(lenghtElem_);
-    txt += "\naperture (cm) : ";
-    txt += mixedTools::doubleToString(aperture_);
-    
-    return txt;
+  string txt = "";
+  txt = mixedTools::doubleToString(lenghtElem_);
+  ele->addChild("length")->addAttribute("design",txt);
+
+  UAPNode* node = ele->addChild("aperture");
+  node->addAttribute("at","EXIT");
+  node->addAttribute("shape","CIRCLE");
+  txt = mixedTools::doubleToString(aperture_);
+  node->addChild("xy_limit")->addAttribute("design",txt);
 }
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/elementFit.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/elementFit.cc	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/elementFit.cc	(revision 424)
@@ -4,69 +4,64 @@
 elementFit::elementFit() : abstractElement()
 {
-    setDefaultValues();
-    setDefaults();
-    elementName_ = nomdElements("fit");
-    nbParam_ = elementName_.getElementNbParameters();
-    parametersString_ = new string[nbParam_+1];
-    // transportOk_ = true;
-    // parmelaIgnored_ = true;
-    // registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk);
-    // registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolIgnore);
+  setDefaultValues();
+  setDefaults();
+  elementName_ = nomdElements("fit");
+  nbParam_ = elementName_.getElementNbParameters();
+  parametersString_ = new string[nbParam_+1];
+  // transportOk_ = true;
+  // parmelaIgnored_ = true;
+  // registerAcceptableSoftware(nomDeLogiciel::transport, TBoolOk);
+  // registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolIgnore);
 }
 
 void elementFit::setDefaultValues()
 {
-    defaultSpecificName_ = "fit";
-    variableNameDef_ = "";
-    variableValueDef_ = 0.0;
-    toleranceDef_ = 0.0;
+  defaultSpecificName_ = "fit";
+  variableNameDef_ = "";
+  variableValueDef_ = 0.0;
+  toleranceDef_ = 0.0;
 }
 
 void elementFit::setDefaults()
 {
-    specificName_ = defaultSpecificName_;
-    variableName_ = variableNameDef_;
-    variableValue_ = variableValueDef_;
-    tolerance_ = toleranceDef_;
+  specificName_ = defaultSpecificName_;
+  variableName_ = variableNameDef_;
+  variableValue_ = variableValueDef_;
+  tolerance_ = toleranceDef_;
 }
-
-
 
 string* elementFit::getParametersString() const
 {
-    int compteur = -1;
-    parametersString_[++compteur] = mixedTools::intToString(nbParam_);
-    parametersString_[++compteur] = specificName_;
-    parametersString_[++compteur] = variableName_;
-    parametersString_[++compteur] = mixedTools::doubleToString(variableValue_ );
-    parametersString_[++compteur] = mixedTools::doubleToString(tolerance_);
-    if ( compteur != nbParam_ ) {
-        cerr << " elementFit::getParametersString() : ERROR nr pf parameters dosnt match " << endl;
-        return NULL;
-    }
-    return parametersString_;
+  int compteur = -1;
+  parametersString_[++compteur] = mixedTools::intToString(nbParam_);
+  parametersString_[++compteur] = specificName_;
+  parametersString_[++compteur] = variableName_;
+  parametersString_[++compteur] = mixedTools::doubleToString(variableValue_ );
+  parametersString_[++compteur] = mixedTools::doubleToString(tolerance_);
+  if ( compteur != nbParam_ ) {
+    cerr << " elementFit::getParametersString() : ERROR nr pf parameters dosnt match " << endl;
+    return NULL;
+  }
+  return parametersString_;
 }
 
 void elementFit::setParametersString(string* param)
 {
-    if ( param == NULL )
-    {
-        cerr << "  elementFit::setParametersString parameters empty parameter set";
-        return;
-    }
-    int compteur = -1;
-    int nbparam = atoi(param[++compteur].c_str());
-    if ( nbparam != nbParam_ )
-    {
-        cerr << "  elementFit::setParametersString parameters do not match for a BEND" << endl;
-        return;
-    }
-    
-    specificName_ = param[++compteur];
-    variableName_ = param[++compteur];
-    variableValue_ = atof(param[++compteur].c_str());
-    tolerance_ = atof(param[++compteur].c_str());
+  if ( param == NULL ) {
+    cerr << "  elementFit::setParametersString parameters empty parameter set";
+    return;
+  }
+  int compteur = -1;
+  int nbparam = atoi(param[++compteur].c_str());
+  if ( nbparam != nbParam_ ) {
+    cerr << "  elementFit::setParametersString parameters do not match for a BEND" << endl;
+    return;
+  }
+  
+  specificName_ = param[++compteur];
+  variableName_ = param[++compteur];
+  variableValue_ = atof(param[++compteur].c_str());
+  tolerance_ = atof(param[++compteur].c_str());
 }
-
 
 // string elementFit::parmelaOutputFlow() const
@@ -88,13 +83,14 @@
 string elementFit::FileOutputFlow() const
 {
-    ostringstream sortie;
-    //    sortie << elementName_.getElementType() << endl;
-    sortie << elementName_.getGenericLabel() << endl;
-    sortie  << specificName_ << endl;
-    sortie  <<    variableName_ << " " << variableValue_ << " " << tolerance_ << endl;
-    return sortie.str();
+  ostringstream sortie;
+  //    sortie << elementName_.getElementType() << endl;
+  sortie << elementName_.getGenericLabel() << endl;
+  sortie  << specificName_ << endl;
+  sortie  <<    variableName_ << " " << variableValue_ << " " << tolerance_ << endl;
+  return sortie.str();
 }
 
-vector< pair<string, vector<string> > > elementFit::parametersToSoftware () const {
+vector< pair<string, vector<string> > > elementFit::parametersToSoftware () const 
+{
   vector< pair<string, vector<string> > >  sortie;
   sortie.push_back( pair<string, vector<string> >("labelsGenericSpecific",  vector<string>() ) );
@@ -108,16 +104,28 @@
 }
 
-
 void elementFit::FileInput(ifstream& ifs)
 {
-    ifs >> specificName_;
-    ifs  >>  variableName_ >>  variableValue_   >> tolerance_;
+  ifs >> specificName_;
+  ifs  >>  variableName_ >>  variableValue_   >> tolerance_;
 }
 
+string elementFit::print() 
+{
+  string txt = "";
+  txt += specificName_;
+  return txt;
+}
 
-string elementFit::print() {
-    string txt = "";
- 
-    txt += specificName_;
-    return txt;
+void elementFit::InputRep(UAPNode* root)
+{
+  UAPNode* ele = root->addChild("element");
+  ele->addAttribute("name",specificName_);
+
+  UAPNode* node = ele->addChild("fit");
+  string txt = variableName_;
+  node->addAttribute("attribute",txt);
+  txt = mixedTools::doubleToString(variableValue_);
+  node->addAttribute("design",txt);
+  txt = mixedTools::doubleToString(tolerance_);
+  node->addAttribute("err",txt);
 }
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/elementRfgun.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/elementRfgun.cc	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/elementRfgun.cc	(revision 424)
@@ -1,4 +1,3 @@
 #include "elementRfgun.h"
-
 
 #include "mathematicalTools.h"
@@ -9,87 +8,83 @@
 elementRfgun::elementRfgun() : abstractElement() 
 {
-    setDefaultValues();
-    setDefaults();
-    elementName_ = nomdElements("rfgun");
-    nbParam_ = elementName_.getElementNbParameters();
-    parametersString_ = new string[nbParam_+1];
-    //      parmelaOk_ = true;
-    // registerAcceptableSoftware(nomDeLogiciel::parmela, TBoolOk);
-    // registerAcceptableSoftware(nomDeLogiciel::generator, TBoolOk);
+  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()
 {
-    defaultSpecificName_ = "rfgun";
-    defaultPhaseStep_ = 1.0;
-    defaultNmacrop_ = 0;
-    defaultSigma_t_ = 0.0;
-    defaultSigma_r_ = 0.0;
-    defaultEmit_x_ = 0.0; 
-    defaultEmit_y_ = 0.0; 
-    defaultE_cin_ = 0.0;
-    defaultSigma_E_ = 0.0;
-    //    defaultNb_true_particles_ = 1.0;
-    defaultTotalCharge_ = 0.0;
+  defaultSpecificName_ = "rfgun";
+  defaultPhaseStep_ = 1.0;
+  defaultNmacrop_ = 0;
+  defaultSigma_t_ = 0.0;
+  defaultSigma_r_ = 0.0;
+  defaultEmit_x_ = 0.0; 
+  defaultEmit_y_ = 0.0; 
+  defaultE_cin_ = 0.0;
+  defaultSigma_E_ = 0.0;
+  //    defaultNb_true_particles_ = 1.0;
+  defaultTotalCharge_ = 0.0;
+}
+
+void elementRfgun::setDefaults()
+{
+  specificName_ = defaultSpecificName_;
+  phaseStep_ = defaultPhaseStep_;
+  nmacrop_ = defaultNmacrop_;
+  sigma_t_ = defaultSigma_t_;
+  sigma_r_ = defaultSigma_r_ ;
+  emit_x_ = defaultEmit_x_;
+  emit_y_ = defaultEmit_y_;
+  E_cin_ = defaultE_cin_;
+  sigma_E_ = defaultSigma_E_;
+  //    nb_true_particles_ = defaultNb_true_particles_ ;
+  totalCharge_ = defaultTotalCharge_;
+}
+
+string* elementRfgun::getParametersString() const
+{
+  int compteur = -1;
+  parametersString_[++compteur] = mixedTools::intToString(nbParam_);
+  parametersString_[++compteur] = specificName_;
+  parametersString_[++compteur] = mixedTools::intToString(nmacrop_);
+  parametersString_[++compteur] = mixedTools::doubleToString(sigma_t_);
+  parametersString_[++compteur] = mixedTools::doubleToString(sigma_r_);
+  parametersString_[++compteur] = mixedTools::doubleToString(emit_x_);
+  parametersString_[++compteur] = mixedTools::doubleToString(emit_y_);
+  parametersString_[++compteur] = mixedTools::doubleToString(E_cin_);
+  parametersString_[++compteur] = mixedTools::doubleToString(sigma_E_);
+  parametersString_[++compteur] = mixedTools::doubleToString(totalCharge_);
+  return parametersString_;
+}
+
+void elementRfgun::setParametersString(string* param)
+{
+  if ( param == NULL ) {
+    cerr << "  elementRfgun::setParametersString parameters empty parameter set";
+    return;
   }
-
-  void elementRfgun::setDefaults()
-  {
-    specificName_ = defaultSpecificName_;
-    phaseStep_ = defaultPhaseStep_;
-    nmacrop_ = defaultNmacrop_;
-    sigma_t_ = defaultSigma_t_;
-    sigma_r_ = defaultSigma_r_ ;
-    emit_x_ = defaultEmit_x_;
-    emit_y_ = defaultEmit_y_;
-    E_cin_ = defaultE_cin_;
-    sigma_E_ = defaultSigma_E_;
-    //    nb_true_particles_ = defaultNb_true_particles_ ;
-    totalCharge_ = defaultTotalCharge_;
+  int compteur = -1;
+  int nbparam = atoi(param[++compteur].c_str());
+  if ( nbparam != nbParam_ ) {
+    cerr << "  elementRfgun::setParametersString parameters do not match for a DRIFT";
+    return;
   }
-
-
-string* elementRfgun::getParametersString() const
-  {
-   int compteur = -1;
-    parametersString_[++compteur] = mixedTools::intToString(nbParam_);
-  parametersString_[++compteur] = specificName_;
-    parametersString_[++compteur] = mixedTools::intToString(nmacrop_);
-    parametersString_[++compteur] = mixedTools::doubleToString(sigma_t_);
-    parametersString_[++compteur] = mixedTools::doubleToString(sigma_r_);
-    parametersString_[++compteur] = mixedTools::doubleToString(emit_x_);
-    parametersString_[++compteur] = mixedTools::doubleToString(emit_y_);
-    parametersString_[++compteur] = mixedTools::doubleToString(E_cin_);
-    parametersString_[++compteur] = mixedTools::doubleToString(sigma_E_);
-    parametersString_[++compteur] = mixedTools::doubleToString(totalCharge_);
-    return parametersString_;
-  }
-
-  void elementRfgun::setParametersString(string* param)
-  {
-    if ( param == NULL )
-      {
-	cerr << "  elementRfgun::setParametersString parameters empty parameter set";
-	return;
-      }
-   int compteur = -1;
-    int nbparam = atoi(param[++compteur].c_str());
-    if ( nbparam != nbParam_ ) 
-      {
-	cerr << "  elementRfgun::setParametersString parameters do not match for a DRIFT";
-	return;
-      }
-
-    specificName_ = param[++compteur];
-    nmacrop_ = atoi(param[++compteur].c_str());
-    sigma_t_ = atof(param[++compteur].c_str());
-    sigma_r_ = atof(param[++compteur].c_str());
-    emit_x_ = atof(param[++compteur].c_str());
-    emit_y_ = atof(param[++compteur].c_str());
-    E_cin_ = atof(param[++compteur].c_str());
-    sigma_E_ = atof(param[++compteur].c_str());
-    totalCharge_ = atof(param[++compteur].c_str());
-
-  }
+  
+  specificName_ = param[++compteur];
+  nmacrop_ = atoi(param[++compteur].c_str());
+  sigma_t_ = atof(param[++compteur].c_str());
+  sigma_r_ = atof(param[++compteur].c_str());
+  emit_x_ = atof(param[++compteur].c_str());
+  emit_y_ = atof(param[++compteur].c_str());
+  E_cin_ = atof(param[++compteur].c_str());
+  sigma_E_ = atof(param[++compteur].c_str());
+  totalCharge_ = atof(param[++compteur].c_str());  
+}
 
 // string elementRfgun::parmelaOutputFlow() const
@@ -131,21 +126,20 @@
 // }
 
-
-
 string elementRfgun::FileOutputFlow() const
-  {
-    ostringstream sortie;
-    // on prend les troncatures tmax et rmax Ã  3 sigmas 
-    //    sortie << elementName_.getElementType() << endl;
-    sortie << elementName_.getGenericLabel() << endl;
-    sortie  << specificName_ << endl;
-    sortie <<  nmacrop_ << "  " << sigma_t_ << "  " << sigma_r_ << endl;
-    sortie << emit_x_ << "  " << emit_y_ << endl; 
-    sortie << E_cin_ << " " << sigma_E_ << endl;
-    sortie << phaseStep_ << "  "  << totalCharge_ << endl; 
-    return sortie.str();
-  }
-
-vector< pair<string, vector<string> > > elementRfgun::parametersToSoftware () const {
+{
+  ostringstream sortie;
+  // on prend les troncatures tmax et rmax Ã  3 sigmas 
+  //    sortie << elementName_.getElementType() << endl;
+  sortie << elementName_.getGenericLabel() << endl;
+  sortie  << specificName_ << endl;
+  sortie <<  nmacrop_ << "  " << sigma_t_ << "  " << sigma_r_ << endl;
+  sortie << emit_x_ << "  " << emit_y_ << endl; 
+  sortie << E_cin_ << " " << sigma_E_ << endl;
+  sortie << phaseStep_ << "  "  << totalCharge_ << endl; 
+  return sortie.str();
+}
+
+vector< pair<string, vector<string> > > elementRfgun::parametersToSoftware () const 
+{
   vector< pair<string, vector<string> > >  sortie;
   sortie.push_back( pair<string, vector<string> >("labelsGenericSpecific",  vector<string>() ) );
@@ -179,26 +173,61 @@
 }
 
-
-string elementRfgun::print() {
-    string txt = "";
-    
-    txt += specificName_;
-    txt += "\ntotal charge : ";
-    txt += mixedTools::doubleToString(totalCharge_);
-    txt += "\nsigma_t (ps) : ";
-    txt += mixedTools::doubleToString(sigma_t_);
-    txt += "\nsigma_r (cm) : ";
-    txt += mixedTools::doubleToString(sigma_r_);
-    txt += "\nemittance x (pi.mm.mrad) : ";
-    txt += mixedTools::doubleToString(emit_x_);
-    txt += "\nemittance y (pi.mm.mrad) : ";
-    txt += mixedTools::doubleToString(emit_y_);
-    txt += "\ninitial kinetic energy (MeV) : ";
-    txt += mixedTools::doubleToString(E_cin_);
-    txt += "\nsigma_Ecin (MeV) : ";
-    txt += mixedTools::doubleToString(sigma_E_);
-    txt += "\ntrue number of part. in beam : ";
-    txt += mixedTools::boolToString(nmacrop_);
-    
-    return txt;
-}
+string elementRfgun::print() 
+{
+  string txt = "";
+  txt += specificName_;
+  txt += "\ntotal charge : ";
+  txt += mixedTools::doubleToString(totalCharge_);
+  txt += "\nsigma_t (ps) : ";
+  txt += mixedTools::doubleToString(sigma_t_);
+  txt += "\nsigma_r (cm) : ";
+  txt += mixedTools::doubleToString(sigma_r_);
+  txt += "\nemittance x (pi.mm.mrad) : ";
+  txt += mixedTools::doubleToString(emit_x_);
+  txt += "\nemittance y (pi.mm.mrad) : ";
+  txt += mixedTools::doubleToString(emit_y_);
+  txt += "\ninitial kinetic energy (MeV) : ";
+  txt += mixedTools::doubleToString(E_cin_);
+  txt += "\nsigma_Ecin (MeV) : ";
+  txt += mixedTools::doubleToString(sigma_E_);
+  txt += "\ntrue number of part. in beam : ";
+  txt += mixedTools::boolToString(nmacrop_);
+  return txt;
+}
+
+void elementRfgun::InputRep(UAPNode* root)
+{
+  UAPNode* ele = root->addChild("element");
+  ele->addAttribute("name",specificName_);
+
+  UAPNode* node = ele->addChild("comment");
+  node->addAttribute("type","RFgun");
+  node->addAttribute("text","to simulate emission from a photocathode");
+
+  node = ele->addChild("beam");
+  node->addChild("particle")->addAttribute("type","ELECTRON");
+  string txt = "";
+  txt = mixedTools::intToString(nmacrop_);
+  node->addChild("n_particles")->addAttribute("design",txt);
+  txt = mixedTools::doubleToString(sigma_t_);
+  node->addChild("sig_t")->addAttribute("design",txt);
+  txt = mixedTools::doubleToString(emit_x_);
+  node->addChild("emittance_a")->addAttribute("design",txt);
+  txt = mixedTools::doubleToString(emit_y_);
+  node->addChild("emittance_b")->addAttribute("design",txt);
+  txt = mixedTools::doubleToString(E_cin_);
+  txt = mixedTools::doubleToString(E_cin_);
+  node->addChild("total_energy")->addAttribute("design",txt);
+  txt = mixedTools::doubleToString(sigma_E_);
+  node->addChild("sig_e")->addAttribute("design",txt);
+  txt = mixedTools::doubleToString(totalCharge_);
+  node->addChild("particle_charge")->addAttribute("design",txt);
+
+  // gaussian radial profile
+  txt = mixedTools::doubleToString(sigma_r_);
+  ele->addChild("sigma_r")->addAttribute("value",txt);
+  // integration step size (specific to Parmela)
+  txt = mixedTools::doubleToString(phaseStep_);
+  ele->addChild("phaseStep")->addAttribute("value",txt);
+}
+
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/elementSnapshot.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/elementSnapshot.cc	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/elementSnapshot.cc	(revision 424)
@@ -116,2 +116,8 @@
   return txt;
 }
+
+void elementSnapshot::InputRep(UAPNode* root)
+{
+  UAPNode* node= root->addChild("snapshot");
+  node->addAttribute("name",specificName_);
+}
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/elementSoleno.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/elementSoleno.cc	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/elementSoleno.cc	(revision 424)
@@ -5,67 +5,62 @@
 elementSoleno::elementSoleno() :  abstractElement() 
 {
-    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);
+  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);
 }
 
+void elementSoleno::setDefaultValues()
+{
+  defaultSpecificName_ = "solnd";
+  B0Def_ = 0.0;
+  varyB0Def_ = false;
+}
 
-  void elementSoleno::setDefaultValues()
-  {
-    defaultSpecificName_ = "solnd";
-    B0Def_ = 0.0;
-    varyB0Def_ = false;
+void elementSoleno::setDefaults()
+{
+  specificName_ = defaultSpecificName_;
+  B0_ = B0Def_;
+  varyB0_ = varyB0Def_;
+}
+
+string* elementSoleno::getParametersString() const 
+{
+  cout << " passage elementSoleno::getParametersString() B0_= " << B0_ << endl;
+  int compteur = -1;
+  parametersString_[++compteur] = mixedTools::intToString(nbParam_);
+  parametersString_[++compteur] = specificName_;
+  parametersString_[++compteur] = mixedTools::doubleToString(lenghtElem_);
+  parametersString_[++compteur] = mixedTools::doubleToString(aperture_);
+  parametersString_[++compteur] = mixedTools::doubleToString(B0_);
+  parametersString_[++compteur] = mixedTools::intToString(varyB0_);
+  if ( compteur != nbParam_ ) {
+    cerr << " elementSoleno::getParametersString() : ERROR nr pf parameters dosnt match " << endl;
+    return NULL;
   }
-
-  void elementSoleno::setDefaults()
-  {
-    specificName_ = defaultSpecificName_;
-    B0_ = B0Def_;
-    varyB0_ = varyB0Def_;
-  }
-
-
- string* elementSoleno::getParametersString() const 
- {
-   cout << " passage elementSoleno::getParametersString() B0_= " << B0_ << endl;
-   int compteur = -1;
-   parametersString_[++compteur] = mixedTools::intToString(nbParam_);
-   parametersString_[++compteur] = specificName_;
-   parametersString_[++compteur] = mixedTools::doubleToString(lenghtElem_);
-   parametersString_[++compteur] = mixedTools::doubleToString(aperture_);
-   parametersString_[++compteur] = mixedTools::doubleToString(B0_);
-   parametersString_[++compteur] = mixedTools::intToString(varyB0_);
-   if ( compteur != nbParam_ ) {
-     cerr << " elementSoleno::getParametersString() : ERROR nr pf parameters dosnt match " << endl;
-     return NULL;
-   }
-   return parametersString_;
- }
-
+  return parametersString_;
+}
 
  void  elementSoleno::setParametersString(string* param)
  {
-  	if ( param == NULL )
-	{
-	  cerr << "  elementSoleno::setParametersString parameters empty parameter set";
-	  return;
-	}
+   if ( param == NULL ) {
+     cerr << "  elementSoleno::setParametersString parameters empty parameter set";
+     return;
+   }
    int compteur = -1;
    int nbparam = atoi(param[++compteur].c_str());
-    if ( nbparam != nbParam_ ) 
-	{
-	  cerr << "  elementSoleno::setParametersString parameters do not match for a SOLENOID";
-	  return;
-	}
-  specificName_ = param[++compteur];
-    lenghtElem_ = atof(param[++compteur].c_str());
-    aperture_  = atof(param[++compteur].c_str());
-    B0_ = atof(param[++compteur].c_str());
-    varyB0_ = atoi(param[++compteur].c_str());
+   if ( nbparam != nbParam_ ) {
+     cerr << "  elementSoleno::setParametersString parameters do not match for a SOLENOID";
+     return;
+   }
+   specificName_ = param[++compteur];
+   lenghtElem_ = atof(param[++compteur].c_str());
+   aperture_  = atof(param[++compteur].c_str());
+   B0_ = atof(param[++compteur].c_str());
+   varyB0_ = atoi(param[++compteur].c_str());
  }
 
@@ -90,12 +85,12 @@
 
 string elementSoleno::FileOutputFlow() const
-  {
-    ostringstream sortie;
-    //    sortie << elementName_.getElementType() << endl;
-    sortie << elementName_.getGenericLabel() << endl;
-    sortie  << specificName_ << endl;
-    sortie << lenghtElem_ << "  " << aperture_<< " "  << B0_ << " " << varyB0_ << endl;
-    return sortie.str();
-  }
+{
+  ostringstream sortie;
+  //    sortie << elementName_.getElementType() << endl;
+  sortie << elementName_.getGenericLabel() << endl;
+  sortie  << specificName_ << endl;
+  sortie << lenghtElem_ << "  " << aperture_<< " "  << B0_ << " " << varyB0_ << endl;
+  return sortie.str();
+}
 
 
@@ -115,5 +110,4 @@
 }
 
-
 void elementSoleno::FileInput(ifstream& ifs)
 {
@@ -122,18 +116,44 @@
 }
 
+string elementSoleno::print() 
+{
+  string txt = "";
+  txt += specificName_;
+  txt += "\nlength (cm) : ";
+  txt += mixedTools::doubleToString(lenghtElem_);
+  txt += "\naperture (cm) : ";
+  txt += mixedTools::doubleToString(aperture_);
+  txt += "\nfield (kG) : ";
+  txt += mixedTools::doubleToString(B0_);
+  txt += "\n : may vary ? ";
+  txt += mixedTools::boolToString(varyB0_);  
+  return txt;
+}
 
-string elementSoleno::print() {
-    string txt = "";
+void elementSoleno::InputRep(UAPNode* root)
+{
+  UAPNode* ele = root->addChild("element");
+  ele->addAttribute("name",specificName_);
 
-    txt += specificName_;
-    txt += "\nlength (cm) : ";
-    txt += mixedTools::doubleToString(lenghtElem_);
-    txt += "\naperture (cm) : ";
-    txt += mixedTools::doubleToString(aperture_);
-    txt += "\nfield (kG) : ";
-    txt += mixedTools::doubleToString(B0_);
-    txt += "\n : may vary ? ";
-    txt += mixedTools::boolToString(varyB0_);
-    
-    return txt;
+  string txt = "";
+  txt = mixedTools::doubleToString(lenghtElem_);
+  ele->addChild("length")->addAttribute("design",txt);
+
+  // pour Parmela /aper : radius of aperture at exit (gap)
+  UAPNode* node = ele->addChild("aperture");
+  node->addAttribute("at","EXIT");
+  node->addAttribute("shape","CIRCLE");
+  txt = mixedTools::doubleToString(aperture_);
+  node->addChild("xy_limit")->addAttribute("design",txt);
+
+  node = ele->addChild("solenoid");
+  txt = mixedTools::doubleToString(B0_);
+  node->addChild("ksol")->addAttribute("design",txt);
+
+  // faire varier ou pas l'induction pour l'ajuster
+  if ( varyB0_ ) {
+    node->addChild("vary")->addAttribute("is_on","true");
+  } else {
+    node->addChild("vary")->addAttribute("is_on","false");
+  }
 }
Index: /Interface_Web/trunk/pspaWT/sources/controler/src/globalParameters.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/controler/src/globalParameters.cc	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/controler/src/globalParameters.cc	(revision 424)
@@ -54,2 +54,18 @@
   ifs >> frequency_ >> integrationStep_ >> nstepsMax_ >> nsc_;
 }
+
+void globalParameters::InputRep(UAPNode* root)
+{
+  UAPNode* node = root->addChild("global");
+  string txt = "";
+  txt = mixedTools::doubleToString(frequency_);
+  node->addChild("ref_freq")->addAttribute("design",txt);
+
+  node->addChild("comment")->addAttribute("text","data specific to Parmela");
+  txt = mixedTools::doubleToString(integrationStep_);
+  node->addChild("integrationStep")->addAttribute("value",txt);
+  txt = mixedTools::intToString(nstepsMax_);
+  node->addChild("nSteps")->addAttribute("value",txt);
+  txt = mixedTools::intToString(nsc_);
+  node->addChild("nsc")->addAttribute("value",txt);
+}
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc	(revision 423)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc	(revision 424)
@@ -76,5 +76,5 @@
   useStyleSheet("htdocs/pspa.css");
   dtmanage_ = new dataManager(this);
-  //    dtmanage_->setWorkingDir(workingDir_);
+  // dtmanage_->setWorkingDir(workingDir_);
   
   /*
@@ -390,6 +390,10 @@
     GWt_globalParameters* bibi = static_cast<GWt_globalParameters*>(globalParam_);
     bibi->updateGlobals();
+
     //  dtmanage_->saveConfiguration(nameOfCase_);
     dtmanage_->saveConfiguration(sessionId(),nameOfCase_);
+
+    // en test: j'ajoute la sauvegarde sur .aml
+    dtmanage_->writeToAMLFile(nameOfCase_);
 }
 
@@ -934,4 +938,5 @@
 
 #ifdef HAS_IMAGEMAGIC
+
   // no background
   chart->setBackground(WBrush(Wt::NoBrush));
@@ -951,4 +956,5 @@
 */
   
+
   Wt::WPdfImage pdfImage("1000", "600");
   {
@@ -956,4 +962,5 @@
     chart->paint(p1);
   }
+
   name = workingDir_ + "/chart-"+sessionId ()+".pdf";
   std::ofstream f1(name.c_str(), std::ios::out | std::ios::binary);
