Changeset 481 in PSPA
- Timestamp:
- Jan 8, 2014, 6:05:38 PM (10 years ago)
- Location:
- Interface_Web/trunk/pspaWT
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/History
r480 r481 5 5 PSPA - Plateforme de simulation en physique des accélérateurs 6 6 ========================================================= 7 8 08 Janvier 2014 : Laurent Garnier 9 - abstractSoftware, dataManager, softwareParmela, softwareUsersprogram, softwareGenerator, 10 softwareTransport, GWt_ligneFaisceau, PspaApplication : 11 o Suppression de methodes deprecated 12 13 - GWt_console, GWt_softwarePanel, GWt_sector : 14 o Suppression de variables inutilisées 7 15 8 16 08 Janvier 2014 : Laurent Garnier -
Interface_Web/trunk/pspaWT/sources/controler/include/abstractSoftware.h
r479 r481 39 39 40 40 bool launchJob(string commandLine, string& resul); 41 bool ComputationLimitsOk_deprecated() const;42 41 43 42 void registerElement(nomdElements::typedElement nomdel,trivaluedBool b); -
Interface_Web/trunk/pspaWT/sources/controler/include/dataManager.h
r472 r481 28 28 virtual ~dataManager(); 29 29 void consoleMessage(string message); 30 int getBeamLineSize_deprecated();31 30 inline globalParameters* getGlobalParameters() {return &globParam_;} 32 31 … … 42 41 inline std::vector <sector*> getSectors() {return jobList_;}; 43 42 44 /**45 Get the label from the order number in the beam line46 @return return "" if not found47 */48 string getLabelFromElementNumero_deprecated(int numero);49 43 50 /**51 Get the numero from the label in the beam line52 @return return -1 if not found53 */54 int getNumeroFromElementLabel_deprecated(string);55 44 56 45 void initializeExecution(); -
Interface_Web/trunk/pspaWT/sources/controler/include/softwareParmela.h
r479 r481 10 10 11 11 12 13 // les elements de parmela sont indexes à partir du premier, il faut14 // donc prevoir un offset pour le raccord a pspa15 // unsigned offsetNumElem_;16 17 vector<int> relativeParmelaElementIndices__deprecated;18 19 20 12 bool beamFromParmela(string workingDir,unsigned numeroElement, double referencefrequency, vector<double>& centroid, bareParticle& refPart,vector<bareParticle>& particles ); 21 13 22 14 bool beamToParmela(string workingDir, particleBeam* partic ); 23 void setRelativeParmelaElementIndices_deprecated();24 15 25 16 -
Interface_Web/trunk/pspaWT/sources/controler/src/abstractSoftware.cc
r479 r481 18 18 } 19 19 20 21 bool abstractSoftware::ComputationLimitsOk_deprecated() const22 {23 /* if (numeroDeb_deprecated_ < 1 || numeroFin_deprecated__ < 1 || numeroDeb_deprecated_ > dataManager_->getBeamLineSize() || numeroFin_deprecated__ > dataManager_->getBeamLineSize() ) {24 consoleMessage(" abstractSoftware::initComputationLimit : num of element out of limits in software " + getName() );25 return false;26 } else {27 return true;28 }29 */30 return true;31 }32 20 33 21 void abstractSoftware::registerElement(nomdElements::typedElement nomdel,trivaluedBool b) -
Interface_Web/trunk/pspaWT/sources/controler/src/dataManager.cc
r480 r481 34 34 if (console) console->addConsoleMessage(message + "\n"); 35 35 pspa_->processEvents(); 36 }37 38 string dataManager::getLabelFromElementNumero_deprecated(int numero)39 {40 /*41 abstractElement* ptr = pspa_->getBeamLine_deprecated()->getAbstractElement(numero-1);42 if ( ptr == NULL ) return "";43 return ptr->getLabel();44 */45 return "";46 }47 48 int dataManager::getNumeroFromElementLabel_deprecated(string label)49 {50 /* int index = -1;51 for (int k = 0; k < getBeamLineSize() ; k++) {52 if (pspa_->getBeamLine_deprecated()->getAbstractElement(k) != NULL) {53 if ( pspa_->getBeamLine_deprecated()->getAbstractElement(k)->getLabel() == label )54 {55 index = (int)k + 1;56 return index;57 }58 }59 }60 return index;61 */62 return 0;63 36 } 64 37 … … 378 351 } 379 352 380 int dataManager::getBeamLineSize_deprecated() {381 // FIXME : Cette methode ne doit pas exister, mis a part pour savoir quelle est la taille de la beamLine382 unsigned int i = 0;383 for (unsigned k = 0; k < jobList_.size(); k++) {384 sector* sector = jobList_[k];385 for (unsigned l = 0; l < sector->getSectionsToExecute().size(); l++) {386 i += sector->getSectionsToExecute()[l]->getElements().size();387 }388 }389 return i;390 }391 353 392 354 -
Interface_Web/trunk/pspaWT/sources/controler/src/softwareGenerator.cc
r472 r481 92 92 93 93 bool result = true; 94 if ( !ComputationLimitsOk_deprecated() ) return false;95 94 96 95 if ( getSectionToExecute()->getElements().size() != 1 ) { -
Interface_Web/trunk/pspaWT/sources/controler/src/softwareParmela.cc
r479 r481 24 24 } 25 25 26 void softwareParmela::setRelativeParmelaElementIndices_deprecated() {27 return;28 // relativeParmelaElementIndices_.clear();29 // relativeParmelaElementIndices_.resize(numeroFin_deprecated_ - numeroDeb_deprecated_ + 1, -1);30 // cout << " setRelativeParmelaElementIndices() taille a priori : " << relativeParmelaElementIndices_.size() << endl;31 abstractElement* elPtr = getSectionToExecute()->getElements().front();32 33 bool there_is_rfgun = ( elPtr->getNomdElement().getElementType() == nomdElements::RFgun );34 unsigned offsetNumElem;35 // les elements de parmela sont indexes de 1 Ã max, s'il n'y a pas de rfgun36 if ( !there_is_rfgun ) {37 // offsetNumElem = numeroDeb_deprecated_ -1;38 // les elements de parmela sont indexes de 0 Ã max, s'il y a un rfgun39 } else {40 // offsetNumElem = numeroDeb_deprecated_;41 }42 43 // index du premier element de parmela44 // int id= numeroDeb_deprecated_ - offsetNumElem;45 unsigned k;46 unsigned curseur = 0;47 for ( k=0; k < getSectionToExecute()->getElements().size() ; k++ ) {48 abstractElement* elem = getSectionToExecute()->getElements()[k];49 // cout << " liste PARMELA no absolu " << k << " relatif provisoire " << relativeParmelaElementIndices_.at(curseur) << endl;50 // if ( elem->is_accepted_by_software(nameOfSoftware_) == TBoolOk ) {51 if ( doAcceptElement(elem->getNomdElement().getElementType() ) == TBoolOk ) {52 // relativeParmelaElementIndices_.at(curseur) = id;53 // cout << " mis a " << id << endl;54 // id++;55 }56 curseur++;57 }58 }59 26 60 27 … … 94 61 outfile << "OUTPUT 0" << endl; 95 62 if ( there_is_rfgun ) { 96 // outfile << dataManager_->getElementPointerFromNumero(numeroDeb_deprecated_)->parmelaOutputFlow();97 63 outfile << elementsData(elPtr->parametersToSoftware()); 98 64 } else { … … 152 118 bool result = true; 153 119 154 if ( !ComputationLimitsOk_deprecated() ) return false;155 120 unsigned curseur; 156 121 for ( unsigned int k=0; k < getSectionToExecute()->getElements().size() ; k++ ) { … … 161 126 } 162 127 163 curseur = k; // - numeroDeb_deprecated_;128 curseur = k; 164 129 165 130 if (!(doAcceptElement(getSectionToExecute()->getElements()[curseur]->getNomdElement().getElementType()) == TBoolOk)) { -
Interface_Web/trunk/pspaWT/sources/controler/src/softwareTransport.cc
r472 r481 141 141 142 142 bool result = true; 143 if ( !ComputationLimitsOk_deprecated() ) return false;144 143 145 144 for (unsigned k = 0; k < getSectionToExecute()->getElements().size(); k++) -
Interface_Web/trunk/pspaWT/sources/controler/src/softwareUsersprogram.cc
r472 r481 96 96 97 97 98 if ( !ComputationLimitsOk_deprecated() ) return false;99 98 100 99 // for (unsigned k = numeroDeb_; k <= numeroFin_; k++) -
Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_ligneFaisceau.h
r469 r481 76 76 void update(); 77 77 78 /** update the status of the given index element79 */80 void update_deprecated(int);81 78 82 79 /** Return the sector of this beamLine */ -
Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_pspaApplication.h
r479 r481 40 40 WLineEdit* saveNameEdit_; 41 41 WLineEdit* openNameEdit_; 42 GWt_ligneFaisceau* beamLine_deprecated_;43 42 44 43 GWt_globalParameters* globalParam_; … … 95 94 } 96 95 97 inline GWt_ligneFaisceau* getBeamLine_deprecated() {98 return beamLine_deprecated_;99 }100 101 96 inline GWt_abstractElementFactory* getAbstractElementFactory() { 102 97 return abstractElementFactory_; -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_console.cc
r479 r481 20 20 Wt::WContainerWidget *searchContainer = new Wt::WContainerWidget(); 21 21 22 Wt::WLabel *label =new Wt::WLabel("Search ", searchContainer);22 new Wt::WLabel("Search ", searchContainer); 23 23 searchLineEdit_ = new Wt::WLineEdit("", searchContainer); 24 24 searchLineEdit_->setToolTip("clic here to search a string in the output"); -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_ligneFaisceau.cc
r469 r481 312 312 return elems; 313 313 } 314 315 void GWt_ligneFaisceau::update_deprecated(int i){316 int index = 0;317 318 // first if 1319 // i--;320 321 for (int a=0; a< ligneFaisceauLayout_->count(); a++) {322 if (GWt_elementLigneFaisceau* elem = dynamic_cast <GWt_elementLigneFaisceau*> (ligneFaisceauLayout_->itemAt(a)->widget ())) {323 if (index == i) {324 // elem->update();325 }326 index ++;327 }328 }329 } -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc
r479 r481 145 145 // ********************* Ancien code : A supprimer *************** 146 146 // --------------------------------------------------------------- 147 beamLine_deprecated_ = NULL; 147 148 148 /* 149 149 WScrollArea* scroll = new WScrollArea(acceleratorContainerWidget_); -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_sector.cc
r480 r481 58 58 // Add refected 59 59 if (sectorControler_->getReflected()) { 60 WText* t =new WText(" reflected from "+sectorControler_->getDuplicatedFrom()->getName(),sectorContainer);60 new WText(" reflected from "+sectorControler_->getDuplicatedFrom()->getName(),sectorContainer); 61 61 } else if (sectorControler_->getDuplicatedFrom() != NULL) { 62 WText* t =new WText(" duplicated from "+sectorControler_->getDuplicatedFrom()->getName(),sectorContainer);62 new WText(" duplicated from "+sectorControler_->getDuplicatedFrom()->getName(),sectorContainer); 63 63 } 64 64 new WBreak(sectorContainer); -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc
r480 r481 89 89 90 90 WComboBox* softCombo = new WComboBox(); 91 sectionToExecute* sect = UIsector_->getSectorControler()->getSectionsToExecute()[a];92 91 93 92 fillComboWithSoftwares(softCombo,UIsector_->getSectorControler()->getSectionsToExecute()[a]->getSoftware()->getName());
Note: See TracChangeset
for help on using the changeset viewer.