Ignore:
Timestamp:
Dec 16, 2013, 5:16:54 PM (11 years ago)
Author:
garnier
Message:

grosse modification pour intégrer les sections

File:
1 edited

Legend:

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

    r442 r455  
    1212}
    1313
    14 softwareGenerator::softwareGenerator(string inputFileName, globalParameters* globals, dataManager* dt) : abstractSoftware(inputFileName, globals, dt)
     14softwareGenerator::softwareGenerator(string inputFileName, sectionToExecute* sect) : abstractSoftware(inputFileName, sect)
    1515{
    1616  cout << " softwareUsersprogram::softwareGenerator ENREGISTREMENT " << endl;
     
    1919}
    2020
    21 bool softwareGenerator::createInputFile(particleBeam* beamBefore, unsigned int numeroDeb, unsigned int numeroFin, string workingDir)
     21bool softwareGenerator::createInputFile(particleBeam* beamBefore, string workingDir)
    2222{
    23   if ( !initComputationLimits(numeroDeb,numeroFin) ) return false;
    24 
    25   if ( numeroDeb_ != numeroFin_ ) return false;
    26 
    27   abstractElement* elPtr;
    28   elPtr = dataManager_->getElementPointerFromNumero(numeroDeb_);
    29 
    30   if ( elPtr->getNomdElement().getElementType() != nomdElements::RFgun ) {
     23  abstractElement* firstElement = getSectionToExecute()->getElements().front();
     24 
     25  if ( firstElement->getNomdElement().getElementType() != nomdElements::RFgun ) {
    3126    dataManager_->consoleMessage(" softwareGenerator::createInputFile : the element must be rfgun " );
    3227    cerr << " softwareGenerator::createInputFile : the element must be rfgun" << endl;
     
    4742  outfile << " Add=FALSE, N_add=0" << endl;
    4843  outfile << " Species='electrons'" << endl;
    49   //  outfile << elPtr->generatorOutputFlow() << endl;
    50 
    51   outfile << elementsData(elPtr->parametersToSoftware()) << endl;
     44  //  outfile << firstElement->generatorOutputFlow() << endl;
     45
     46  outfile << elementsData(firstElement->parametersToSoftware()) << endl;
    5247
    5348  outfile << "/" << endl;
     
    6257 
    6358  ostringstream sortie;
    64   sortie << " EXECUTION DE GENERATOR DE l'ELEMENT " << numeroDeb_ << " A L'ELEMENT " << numeroFin_ << endl;
     59  sortie << " EXECUTION DE GENERATOR DE l'ELEMENT " << numeroDeb_deprecated_ << " A L'ELEMENT " << numeroFin_deprecated_ << endl;
    6560
    6661  string generatorJob = workingDir + "generator";
     
    9792
    9893  bool result = true;
    99   if ( !ComputationLimitsOk() ) return false;
    100 
    101   if ( numeroDeb_ != numeroFin_ ) {
     94  if ( !ComputationLimitsOk_deprecated() ) return false;
     95
     96  if ( numeroDeb_deprecated_ != numeroFin_deprecated_ ) {
    10297    dataManager_->consoleMessage(" softwareGenerator::buildBeamAfterElements : only one element (rfgun) must be calculated " );
    10398    return false;
Note: See TracChangeset for help on using the changeset viewer.