Changeset 436 in PSPA for Interface_Web/trunk/pspaWT/sources/controler/src/dataManager.cc
- Timestamp:
- Nov 26, 2013, 5:36:11 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/controler/src/dataManager.cc
r431 r436 73 73 sectionToExecute* dataManager::addSectionToExecute(abstractElement* debut,int debutIndex, abstractElement* fin, int finIndex, nomDeLogiciel logiciel) 74 74 { 75 75 #if BAVARD > 0 76 76 cout << "***********************************" << endl; 77 77 cout << " dataManager::addSectionToExecute " << endl << endl; … … 160 160 bool dataManager::executeAll() 161 161 { 162 #if BAVARD > 0 162 163 cout << "***********************************" << endl; 163 164 cout << " dataManager::executeAll() " << endl << endl; 165 #endif 164 166 165 167 bool success = true; … … 181 183 unsigned fin; 182 184 for(unsigned k = 0; k < jobList_.size(); k++) { 183 185 186 #if BAVARD > 0 184 187 cout << " dataManager::executeAll je m'apprete a executer : " << (jobList_[k]->getSoftware()->getName()) << endl; 188 #endif 185 189 186 190 debut = jobList_[k]->getElementNumberInSection(); … … 215 219 if ( debut < firstComputedElemNumero_ ) firstComputedElemNumero_ = debut; 216 220 if ( fin > lastComputedElemNumero_ ) lastComputedElemNumero_ = fin; 217 218 //debug 221 222 #if BAVARD > 0 219 223 cout << "dataManager::executeAll #diagnosticBeam= " << diagnosticBeam_.size() << endl; 220 224 cout << "dataManager::executeAll #getBeamLineSize()= " << getBeamLineSize() << endl; … … 223 227 cout << "[" << j << "] " << elPtr->getNomdElement().getExpandedName() << endl; 224 228 } 229 #endif 230 225 231 } //k 226 232 227 cout << " dataManager::executeAll premier element : " << firstComputedElemNumero_ << " dernier : " << lastComputedElemNumero_ << endl; 233 cout << " dataManager::executeAll() : premier element = " << firstComputedElemNumero_ << " dernier = " << lastComputedElemNumero_ << endl; 234 228 235 return success; 229 236 } … … 232 239 { 233 240 ofstream outfile; 234 // 241 //string name = pspa_->getWorkingDir()+ folder + "/" + nameOfFile + ".save"; 235 242 cout << " dataManager::saveConfiguration : suppression du folder dans le nom de " << endl; 236 243 cout << " sauvegarde, en attendant que ce soit autre chose que le sessionId" << endl; … … 248 255 outfile << globParam_.FileOutputFlow(); 249 256 outfile << sectorParam_.FileOutputFlow(); 257 250 258 abstractElement* elPtr; 251 259 for(int k = 0; k < getBeamLineSize() ; k++) … … 268 276 lab->addAttribute("name","PSPA lab"); 269 277 270 // general global parameters 278 // general global parameters--docroot . --http-address 0.0.0.0 --http-port 8077 271 279 globParam_.InputRep(lab); 272 280 … … 275 283 //acc->addAttribute("name",fileName); 276 284 277 sectorParam_.InputRep(lab);285 //sectorParam_.InputRep(lab); 278 286 279 287 // sequence of elements … … 307 315 else cout << " successful opening input stream : " << name << endl; 308 316 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 324 318 325 319 pspa_->getBeamLine()->clear(); … … 327 321 string elementLabel; 328 322 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") ) { 331 327 sectorParam_.raz(); 332 328 sectorParam_.FileInput(infile); … … 343 339 }// while 344 340 345 341 #if BAVARD > 1 346 342 unsigned k; 347 343 for(k = 0; k < getBeamLineSize(); k++) {
Note: See TracChangeset
for help on using the changeset viewer.