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

amélioration fiabilité graphique

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/sources/controler/src/softwareGenerator.cc

    r359 r386  
    88
    99softwareGenerator::softwareGenerator() : abstractSoftware()
    10 {;}
     10{
     11  nameOfSoftware_ = nomDeLogiciel("generator");
     12}
    1113
    1214softwareGenerator::softwareGenerator(string inputFileName, globalParameters* globals, dataManager* dt) : abstractSoftware(inputFileName, globals, dt)
    13 {;}
     15{
     16  nameOfSoftware_ = nomDeLogiciel("generator");
     17}
    1418
    1519bool softwareGenerator::createInputFile(particleBeam* beamBefore, unsigned int numeroDeb, unsigned int numeroFin, string workingDir)
    1620{
    17   if ( numeroDeb != numeroFin ) return false;
     21  if ( !initComputationLimits(numeroDeb,numeroFin) ) return false;
     22
     23  if ( numeroDeb_ != numeroFin_ ) return false;
    1824
    1925  abstractElement* elPtr;
    20   elPtr = dataManager_->getElementPointerFromNumero(numeroDeb);
     26  elPtr = dataManager_->getElementPointerFromNumero(numeroDeb_);
    2127
    2228  if ( elPtr->getNomdElement().getElementType() != RFgun ) {
     
    4652}
    4753
    48 bool softwareGenerator::execute(unsigned int numeroDeb,unsigned int numeroFin,string workingDir) {
     54bool softwareGenerator::execute(string workingDir) {
    4955 
    5056  bool ExecuteStatus = true;
    5157 
    5258  ostringstream sortie;
    53   sortie << " EXECUTION DE GENERATOR DE l'ELEMENT " << numeroDeb << " A L'ELEMENT " << numeroFin << endl;
     59  sortie << " EXECUTION DE GENERATOR DE l'ELEMENT " << numeroDeb_ << " A L'ELEMENT " << numeroFin_ << endl;
    5460
    5561  string generatorJob = workingDir + "generator";
     
    8389}
    8490
    85 bool  softwareGenerator::buildBeamAfterElements(unsigned int numeroDeb,unsigned int numeroFin, vector<particleBeam>& beams, string workingDir) {
     91bool  softwareGenerator::buildBeamAfterElements( string workingDir) {
    8692
    8793  bool result = true;
    88   if ( numeroDeb != numeroFin ) {
     94  if ( !ComputationLimitsOk() ) return false;
     95
     96  if ( numeroDeb_ != numeroFin_ ) {
    8997    dataManager_->consoleMessage(" softwareGenerator::buildBeamAfterElements : only one element (rfgun) must be calculated " );
    9098    return false;
    9199  }
    92 
    93   beams.push_back(particleBeam());
     100  // on initialise une nouvelle sortie diagnostic
     101  particleBeam* newDiag = dataManager_->updateCurrentDiagnostic(true);
     102
     103  //  beams.push_back(particleBeam());
    94104  vector<double> centroid;
    95105  bareParticle refPart;
     
    97107  vector<bareParticle> particlesPassives; // on ne fait rien de ces particules pour l'instant
    98108  if (beamFromGenerator(string("faisceau.ini"),workingDir, centroid, refPart,particles, particlesPassives )) {
    99     beams.back().setWithParticles(centroid, refPart,particles);
     109    newDiag->setWithParticles(centroid, refPart,particles);
    100110  } else {
    101111    dataManager_->consoleMessage(" softwareGenerator::buildBeamAfterElements : error  " );
Note: See TracChangeset for help on using the changeset viewer.