Ignore:
Timestamp:
Mar 12, 2013, 1:54:41 PM (11 years ago)
Author:
lemeur
Message:

amélioration fiabilité graphique

Location:
Interface_Web/trunk/pspaWT/sources/controler/include
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/sources/controler/include/abstractSoftware.h

    r375 r386  
    44#include "globalParameters.h"
    55#include "particleBeam.h"
    6 
     6#include "nomDeLogiciel.h"
    77#include <iostream>
    88#include <string>
     
    1717 protected :
    1818
     19  unsigned numeroDeb_, numeroFin_;
    1920  globalParameters* globParamPtr_;
    2021  dataManager* dataManager_;
    2122  string inputFileName_;
    22 
     23  nomDeLogiciel nameOfSoftware_;
    2324  abstractSoftware();
    2425
    2526  bool launchJob(string commandLine, string& resul);
    26 
     27  bool initComputationLimits(unsigned int numeroDeb,unsigned int numeroFin);
     28  bool ComputationLimitsOk() const;
    2729 public :
    2830
     
    3032  ~abstractSoftware() {;}
    3133
     34  inline nomDeLogiciel getNomDeLogiciel() const {
     35    return nameOfSoftware_;
     36  }
     37
    3238  virtual bool createInputFile(particleBeam* beamBefore,unsigned int numeroDeb, unsigned int numeroFin, string workingDir) = 0;
    3339
    3440
    35   virtual bool  execute(unsigned int numeroDeb,unsigned int numeroFin,string workingDir) = 0;
     41  virtual bool  execute(string workingDir) = 0;
    3642
    37  virtual bool buildBeamAfterElements(unsigned int numeroDeb,unsigned int numeroFin, vector<particleBeam>& beams, string workingDir) = 0;
     43 virtual bool buildBeamAfterElements(string workingDir) = 0;
    3844
    3945    /** Color of the background of this sofware
     
    4450    /** Name of this software
    4551     */
    46     virtual string getName() = 0;
     52    inline string getName() const {
     53      return nameOfSoftware_.getString();
     54    }
    4755
    4856};
  • Interface_Web/trunk/pspaWT/sources/controler/include/beam2Moments.h

    r257 r386  
    3636
    3737 // void readFromTransportOutput(ifstream& inp);
    38  void readFromTransportOutput(stringstream& inp);
     38 bool readFromTransportOutput(stringstream& inp);
    3939 string writeToTransportInput(double P0) const;
    4040
  • Interface_Web/trunk/pspaWT/sources/controler/include/dataManager.h

    r381 r386  
    2929   
    3030  particleBeam* getDiagnosticBeam(unsigned index);
    31    
     31  particleBeam* getDiagnosticBeam(string elementLabel);
     32
    3233  void addSectionToExecute(int debut, int fin, nomDeLogiciel prog);
    3334
     
    6465    bool restoreElements(string inputFileName);
    6566   
    66    
     67
     68    // si newBeam = true, on cree un nouveau diag
     69    // si newBeam = false, on utilise le dernier
     70    inline particleBeam* updateCurrentDiagnostic(bool newBeam) {
     71      if ( newBeam ) {
     72        diagnosticBeam_.push_back(particleBeam());
     73      }
     74      indexElementToIndexDiag_.push_back(diagnosticBeam_.size() -1);
     75      return &diagnosticBeam_.back();
     76    }
    6777
    6878   
     
    7383  unsigned firstComputedElemNumero_;
    7484  unsigned lastComputedElemNumero_;
     85
    7586    vector<particleBeam> diagnosticBeam_;
    76    
     87    vector<unsigned> indexElementToIndexDiag_;
     88    // numeroElementToIndexDiag_[k] contient, pour l'element d'index k, l'indice ind tel que diagnosticBeam_[ind]
     89    // soit le faisceau resultat, en l'etat qu'il doit avoir apres l'element k
     90
    7791    vector<sectionToExecute*> jobList_;
    7892   
  • Interface_Web/trunk/pspaWT/sources/controler/include/softwareGenerator.h

    r375 r386  
    2727
    2828
    29   virtual bool  execute(unsigned int numeroDeb,unsigned int numeroFin,string workingDir);
     29  virtual bool  execute(string workingDir);
    3030
    3131
    32   virtual bool buildBeamAfterElements(unsigned int numeroDeb,unsigned int numeroFin, vector<particleBeam>& beams, string workingDir);
     32  virtual bool buildBeamAfterElements(string workingDir);
    3333
    3434    inline string getColor() {
     
    3636    }
    3737
    38     inline string getName() {
    39         return "generator";
    40     }
     38    /* inline string getName() const { */
     39    /*     return "generator"; */
     40    /* } */
    4141};
    4242
  • Interface_Web/trunk/pspaWT/sources/controler/include/softwareParmela.h

    r381 r386  
    99 protected :
    1010
     11
     12 
    1113  //    les elements de parmela sont indexes à partir du premier, il faut
    1214  // donc prevoir un offset pour le raccord a pspa
    13   unsigned offsetNumElem_;
    14   //  vector<unsigned> relativeParmelaElementNumbers_;
     15  //  unsigned offsetNumElem_;
     16
     17    vector<int> relativeParmelaElementIndices_;
    1518
    1619  bool beamFromParmela(string workingDir,unsigned numeroElement, double referencefrequency, vector<double>& centroid, bareParticle& refPart,vector<bareParticle>& particles );
    1720
    1821  bool beamToParmela(string workingDir, particleBeam* partic );
    19 
     22  void setRelativeParmelaElementIndices();
    2023 public :
    2124    softwareParmela();
     
    2831  virtual bool createInputFile(particleBeam* beamBefore, unsigned int numeroDeb, unsigned int numeroFin, string workingDir);
    2932
    30   virtual bool  execute(unsigned int numeroDeb,unsigned int numeroFin,string workingDir);
     33  virtual bool  execute(string workingDir);
    3134
    3235
    33 virtual bool buildBeamAfterElements(unsigned int numeroDeb,unsigned int numeroFin, vector<particleBeam>& beams, string workingDir);
     36virtual bool buildBeamAfterElements(string workingDir);
    3437
    3538    inline string getColor() {
     
    3740    }
    3841
    39     inline string getName() {
    40         return "parmela";
    41     }
     42    /* inline string getName() const { */
     43    /*     return "parmela"; */
     44    /* } */
    4245
    4346};
  • Interface_Web/trunk/pspaWT/sources/controler/include/softwareTest.h

    r375 r386  
    2626
    2727
    28   virtual bool  execute(unsigned int numeroDeb,unsigned int numeroFin,string workingDir);
     28  virtual bool  execute(string workingDir);
    2929
    3030
    31   virtual bool buildBeamAfterElements(unsigned int numeroDeb,unsigned int numeroFin, vector<particleBeam>& beams, string workingDir);
     31  virtual bool buildBeamAfterElements(string workingDir);
    3232
    3333  inline string getColor() {
     
    3535  }
    3636   
    37   inline string getName() {
    38         return "test";
    39     }
     37  /* inline string getName() const { */
     38  /*       return "test"; */
     39  /*   } */
    4040
    4141};
  • Interface_Web/trunk/pspaWT/sources/controler/include/softwareTransport.h

    r375 r386  
    1818  virtual bool createInputFile( particleBeam* beamBefore,unsigned int numeroDeb, unsigned int numeroFin, string workingDir);
    1919
    20   virtual bool  execute(unsigned int numeroDeb,unsigned int numeroFin,string workingDir);
     20  virtual bool  execute(string workingDir);
    2121
    2222
    23 virtual bool buildBeamAfterElements(unsigned int numeroDeb,unsigned int numeroFin, vector<particleBeam>& beams, string workingDir);
     23virtual bool buildBeamAfterElements(string workingDir);
    2424
    2525    inline string getColor() {
     
    2727    }
    2828   
    29     inline string getName() {
    30         return "transport";
    31     }
     29    /* inline string getName() const { */
     30    /*     return "transport"; */
     31    /* } */
    3232
    3333};
Note: See TracChangeset for help on using the changeset viewer.