Changeset 481 in PSPA


Ignore:
Timestamp:
Jan 8, 2014, 6:05:38 PM (10 years ago)
Author:
garnier
Message:

Suppression de methodes deprecated et de quelques warning de compilation

Location:
Interface_Web/trunk/pspaWT
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/History

    r480 r481  
    55     PSPA - Plateforme de simulation en physique des accélérateurs
    66     =========================================================
     7
     808 Janvier 2014 : Laurent Garnier
     9- abstractSoftware, dataManager, softwareParmela, softwareUsersprogram, softwareGenerator,
     10softwareTransport, GWt_ligneFaisceau, PspaApplication :
     11  o Suppression de methodes deprecated
     12
     13- GWt_console, GWt_softwarePanel, GWt_sector :
     14  o Suppression de variables inutilisées
    715
    81608 Janvier 2014 : Laurent Garnier
  • Interface_Web/trunk/pspaWT/sources/controler/include/abstractSoftware.h

    r479 r481  
    3939
    4040  bool launchJob(string commandLine, string& resul);
    41   bool ComputationLimitsOk_deprecated() const;
    4241
    4342  void registerElement(nomdElements::typedElement nomdel,trivaluedBool b);
  • Interface_Web/trunk/pspaWT/sources/controler/include/dataManager.h

    r472 r481  
    2828  virtual ~dataManager();
    2929  void consoleMessage(string message);
    30   int getBeamLineSize_deprecated();
    3130  inline globalParameters* getGlobalParameters()  {return &globParam_;}
    3231   
     
    4241  inline std::vector <sector*> getSectors() {return jobList_;};
    4342 
    44   /**
    45      Get the label from the order number in the beam line
    46      @return return "" if not found
    47   */
    48   string getLabelFromElementNumero_deprecated(int numero);
    4943 
    50   /**
    51      Get the numero from the label in the beam line
    52      @return return -1 if not found
    53   */
    54   int getNumeroFromElementLabel_deprecated(string);
    5544 
    5645  void initializeExecution();
  • Interface_Web/trunk/pspaWT/sources/controler/include/softwareParmela.h

    r479 r481  
    1010
    1111
    12  
    13   //    les elements de parmela sont indexes à partir du premier, il faut
    14   // donc prevoir un offset pour le raccord a pspa
    15   //  unsigned offsetNumElem_;
    16 
    17     vector<int> relativeParmelaElementIndices__deprecated;
    18 
    19 
    2012  bool beamFromParmela(string workingDir,unsigned numeroElement, double referencefrequency, vector<double>& centroid, bareParticle& refPart,vector<bareParticle>& particles );
    2113
    2214  bool beamToParmela(string workingDir, particleBeam* partic );
    23   void setRelativeParmelaElementIndices_deprecated();
    2415
    2516
  • Interface_Web/trunk/pspaWT/sources/controler/src/abstractSoftware.cc

    r479 r481  
    1818}
    1919
    20 
    21 bool abstractSoftware::ComputationLimitsOk_deprecated() const
    22 {
    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 }
    3220
    3321void abstractSoftware::registerElement(nomdElements::typedElement nomdel,trivaluedBool b)
  • Interface_Web/trunk/pspaWT/sources/controler/src/dataManager.cc

    r480 r481  
    3434  if (console) console->addConsoleMessage(message + "\n");
    3535  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;
    6336}
    6437
     
    378351}
    379352
    380 int dataManager::getBeamLineSize_deprecated() {
    381 // FIXME : Cette methode ne doit pas exister, mis a part pour savoir quelle est la taille de la beamLine
    382   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 }
    391353
    392354
  • Interface_Web/trunk/pspaWT/sources/controler/src/softwareGenerator.cc

    r472 r481  
    9292
    9393  bool result = true;
    94   if ( !ComputationLimitsOk_deprecated() ) return false;
    9594
    9695  if ( getSectionToExecute()->getElements().size() != 1 ) {
  • Interface_Web/trunk/pspaWT/sources/controler/src/softwareParmela.cc

    r479 r481  
    2424}
    2525
    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 rfgun
    36   if ( !there_is_rfgun ) {
    37 //    offsetNumElem = numeroDeb_deprecated_ -1;
    38     // les elements de parmela sont indexes de 0 à max, s'il y a un rfgun
    39   } else {
    40 //    offsetNumElem = numeroDeb_deprecated_;
    41   }
    42 
    43   // index du premier element de parmela
    44 //  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 }
    5926
    6027
     
    9461  outfile << "OUTPUT 0" << endl;
    9562  if ( there_is_rfgun ) {
    96     //    outfile << dataManager_->getElementPointerFromNumero(numeroDeb_deprecated_)->parmelaOutputFlow();
    9763    outfile << elementsData(elPtr->parametersToSoftware());
    9864  } else {
     
    152118  bool result = true;
    153119
    154   if ( !ComputationLimitsOk_deprecated() ) return false;
    155120  unsigned curseur;
    156121  for ( unsigned int k=0; k < getSectionToExecute()->getElements().size() ; k++ ) {
     
    161126      }
    162127
    163     curseur = k;// - numeroDeb_deprecated_;
     128    curseur = k;
    164129
    165130    if (!(doAcceptElement(getSectionToExecute()->getElements()[curseur]->getNomdElement().getElementType()) == TBoolOk)) {
  • Interface_Web/trunk/pspaWT/sources/controler/src/softwareTransport.cc

    r472 r481  
    141141
    142142  bool result = true;
    143   if ( !ComputationLimitsOk_deprecated() ) return false;
    144143
    145144  for (unsigned k = 0; k < getSectionToExecute()->getElements().size(); k++)
  • Interface_Web/trunk/pspaWT/sources/controler/src/softwareUsersprogram.cc

    r472 r481  
    9696
    9797
    98   if ( !ComputationLimitsOk_deprecated() ) return false;
    9998 
    10099  //  for (unsigned k = numeroDeb_; k <= numeroFin_; k++)
  • Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_ligneFaisceau.h

    r469 r481  
    7676    void update();
    7777 
    78   /** update the status of the given index element
    79    */
    80   void update_deprecated(int);
    8178   
    8279  /** Return the sector of this beamLine */
  • Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_pspaApplication.h

    r479 r481  
    4040  WLineEdit* saveNameEdit_;
    4141  WLineEdit* openNameEdit_;
    42   GWt_ligneFaisceau* beamLine_deprecated_;
    4342   
    4443  GWt_globalParameters* globalParam_;
     
    9594  }
    9695
    97   inline GWt_ligneFaisceau* getBeamLine_deprecated() {
    98     return beamLine_deprecated_;
    99   }
    100 
    10196  inline GWt_abstractElementFactory* getAbstractElementFactory() {
    10297    return abstractElementFactory_;
  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_console.cc

    r479 r481  
    2020  Wt::WContainerWidget *searchContainer = new Wt::WContainerWidget();
    2121   
    22   Wt::WLabel *label = new Wt::WLabel("Search ", searchContainer);
     22  new Wt::WLabel("Search ", searchContainer);
    2323  searchLineEdit_ = new Wt::WLineEdit("", searchContainer);
    2424  searchLineEdit_->setToolTip("clic here to search a string in the output");
  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_ligneFaisceau.cc

    r469 r481  
    312312  return elems;
    313313}
    314 
    315 void GWt_ligneFaisceau::update_deprecated(int i){
    316     int index = 0;
    317  
    318     // first if 1
    319     //    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  
    145145  // ********************* Ancien code : A supprimer ***************
    146146  // ---------------------------------------------------------------
    147   beamLine_deprecated_ = NULL;
     147
    148148  /*
    149149   WScrollArea* scroll = new  WScrollArea(acceleratorContainerWidget_);
  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_sector.cc

    r480 r481  
    5858  // Add refected
    5959  if (sectorControler_->getReflected()) {
    60     WText* t = new WText(" reflected from "+sectorControler_->getDuplicatedFrom()->getName(),sectorContainer);
     60    new WText(" reflected from "+sectorControler_->getDuplicatedFrom()->getName(),sectorContainer);
    6161  } 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);
    6363  }
    6464  new WBreak(sectorContainer);
  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc

    r480 r481  
    8989     
    9090      WComboBox* softCombo = new WComboBox();
    91       sectionToExecute* sect = UIsector_->getSectorControler()->getSectionsToExecute()[a];
    9291     
    9392      fillComboWithSoftwares(softCombo,UIsector_->getSectorControler()->getSectionsToExecute()[a]->getSoftware()->getName());
Note: See TracChangeset for help on using the changeset viewer.