Changeset 386 in PSPA for Interface_Web/trunk/pspaWT/sources/controler/src/softwareGenerator.cc
- Timestamp:
- Mar 12, 2013, 1:54:41 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/controler/src/softwareGenerator.cc
r359 r386 8 8 9 9 softwareGenerator::softwareGenerator() : abstractSoftware() 10 {;} 10 { 11 nameOfSoftware_ = nomDeLogiciel("generator"); 12 } 11 13 12 14 softwareGenerator::softwareGenerator(string inputFileName, globalParameters* globals, dataManager* dt) : abstractSoftware(inputFileName, globals, dt) 13 {;} 15 { 16 nameOfSoftware_ = nomDeLogiciel("generator"); 17 } 14 18 15 19 bool softwareGenerator::createInputFile(particleBeam* beamBefore, unsigned int numeroDeb, unsigned int numeroFin, string workingDir) 16 20 { 17 if ( numeroDeb != numeroFin ) return false; 21 if ( !initComputationLimits(numeroDeb,numeroFin) ) return false; 22 23 if ( numeroDeb_ != numeroFin_ ) return false; 18 24 19 25 abstractElement* elPtr; 20 elPtr = dataManager_->getElementPointerFromNumero(numeroDeb );26 elPtr = dataManager_->getElementPointerFromNumero(numeroDeb_); 21 27 22 28 if ( elPtr->getNomdElement().getElementType() != RFgun ) { … … 46 52 } 47 53 48 bool softwareGenerator::execute( unsigned int numeroDeb,unsigned int numeroFin,string workingDir) {54 bool softwareGenerator::execute(string workingDir) { 49 55 50 56 bool ExecuteStatus = true; 51 57 52 58 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; 54 60 55 61 string generatorJob = workingDir + "generator"; … … 83 89 } 84 90 85 bool softwareGenerator::buildBeamAfterElements( unsigned int numeroDeb,unsigned int numeroFin, vector<particleBeam>& beams,string workingDir) {91 bool softwareGenerator::buildBeamAfterElements( string workingDir) { 86 92 87 93 bool result = true; 88 if ( numeroDeb != numeroFin ) { 94 if ( !ComputationLimitsOk() ) return false; 95 96 if ( numeroDeb_ != numeroFin_ ) { 89 97 dataManager_->consoleMessage(" softwareGenerator::buildBeamAfterElements : only one element (rfgun) must be calculated " ); 90 98 return false; 91 99 } 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()); 94 104 vector<double> centroid; 95 105 bareParticle refPart; … … 97 107 vector<bareParticle> particlesPassives; // on ne fait rien de ces particules pour l'instant 98 108 if (beamFromGenerator(string("faisceau.ini"),workingDir, centroid, refPart,particles, particlesPassives )) { 99 beams.back().setWithParticles(centroid, refPart,particles);109 newDiag->setWithParticles(centroid, refPart,particles); 100 110 } else { 101 111 dataManager_->consoleMessage(" softwareGenerator::buildBeamAfterElements : error " );
Note: See TracChangeset
for help on using the changeset viewer.