Ignore:
Timestamp:
Nov 26, 2013, 5:36:11 PM (11 years ago)
Author:
touze
Message:

ajout de secteurs

File:
1 edited

Legend:

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

    r431 r436  
    7373sectionToExecute* dataManager::addSectionToExecute(abstractElement* debut,int debutIndex, abstractElement* fin, int finIndex, nomDeLogiciel logiciel)
    7474{
    75   #if BAVARD > 0
     75#if BAVARD > 0
    7676  cout << "***********************************" << endl;
    7777  cout << " dataManager::addSectionToExecute " << endl << endl;
     
    160160bool dataManager::executeAll()
    161161{
     162#if BAVARD > 0
    162163  cout << "***********************************" << endl;
    163164  cout << " dataManager::executeAll() " << endl << endl;
     165#endif
    164166
    165167  bool success = true;
     
    181183  unsigned fin;
    182184  for(unsigned k = 0; k < jobList_.size(); k++) {
    183  
     185
     186#if BAVARD > 0 
    184187    cout << " dataManager::executeAll je m'apprete a executer : " << (jobList_[k]->getSoftware()->getName()) << endl;
     188#endif
    185189   
    186190    debut = jobList_[k]->getElementNumberInSection();
     
    215219    if ( debut < firstComputedElemNumero_ ) firstComputedElemNumero_ = debut;
    216220    if ( fin > lastComputedElemNumero_ ) lastComputedElemNumero_ = fin;
    217    
    218     //debug
     221
     222#if BAVARD > 0   
    219223    cout << "dataManager::executeAll #diagnosticBeam= " << diagnosticBeam_.size() << endl;
    220224    cout << "dataManager::executeAll #getBeamLineSize()= " << getBeamLineSize() << endl;
     
    223227      cout << "[" << j << "] " << elPtr->getNomdElement().getExpandedName() << endl;
    224228    }
     229#endif
     230
    225231  } //k
    226232 
    227   cout << " dataManager::executeAll premier element : " << firstComputedElemNumero_ << " dernier : " << lastComputedElemNumero_ << endl;
     233  cout << " dataManager::executeAll() : premier element = " << firstComputedElemNumero_ << " dernier = " << lastComputedElemNumero_ << endl;
     234
    228235  return success;
    229236}
     
    232239{
    233240  ofstream outfile;
    234   //    string name = pspa_->getWorkingDir()+ folder + "/" + nameOfFile + ".save";
     241  //string name = pspa_->getWorkingDir()+ folder + "/" + nameOfFile + ".save";
    235242  cout << " dataManager::saveConfiguration : suppression du folder dans le nom de " << endl;
    236243  cout << " sauvegarde, en attendant que ce soit autre chose que le sessionId" << endl;
     
    248255  outfile << globParam_.FileOutputFlow();
    249256  outfile << sectorParam_.FileOutputFlow();
     257
    250258  abstractElement* elPtr;
    251259  for(int k = 0; k < getBeamLineSize() ; k++)
     
    268276  lab->addAttribute("name","PSPA lab");
    269277 
    270   // general global parameters
     278  // general global parameters--docroot . --http-address 0.0.0.0 --http-port 8077
    271279  globParam_.InputRep(lab);
    272280 
     
    275283  //acc->addAttribute("name",fileName);
    276284
    277   sectorParam_.InputRep(lab);
     285  //sectorParam_.InputRep(lab);
    278286
    279287  // sequence of elements
     
    307315  else cout << " successful opening input stream : " << name << endl;
    308316 
    309   string globalTitle;
    310   if ( infile >> globalTitle ) {
    311     if ( globalTitle == string("globals") ) {
    312       globParam_.raz();
    313       globParam_.FileInput(infile);
    314     } else {
    315       //cout << " INFO::dataManager::restoreElements : global parameters seems to be missing" << endl;
    316       //return false;
    317     }
    318   } else {
    319     cerr << " ERROR::dataManager::restoreElements : reading globalParameters in save file" << endl;
    320     return false;
    321   }
    322 
    323   //NOTE:: je ne sais pas si les parametres "secteur" seront conservés, aussi pour ne pas trop changer les fichiers je lis les données aprÚs "globals" dans la boucle
     317  //NOTE:: je ne sais pas si les "secteurs" seront conservés, aussi pour ne pas trop changer les fichiers je lis les données aprÚs "globals" dans la boucle
    324318 
    325319  pspa_->getBeamLine()->clear();
     
    327321  string elementLabel;
    328322  while (infile >> elementLabel) {
    329 
    330     if (elementLabel == string("lattice") ) {
     323    if (elementLabel == string("globals") ) {
     324      globParam_.raz();
     325      globParam_.FileInput(infile);
     326    } else if (elementLabel == string("sectors") ) {
    331327      sectorParam_.raz();
    332328      sectorParam_.FileInput(infile);
     
    343339  }// while
    344340 
    345  #if BAVARD > 1
     341#if BAVARD > 1
    346342  unsigned k;
    347343  for(k = 0; k < getBeamLineSize(); k++) {
Note: See TracChangeset for help on using the changeset viewer.