Ignore:
Timestamp:
Feb 5, 2013, 2:23:23 PM (11 years ago)
Author:
lemeur
Message:

suppression designation elements par index + fin generator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc

    r311 r312  
    446446    choixElementDessin_->clear();
    447447    int nombre = dtmanage_->getBeamLineSize();
     448    cout << " PspaApplication::faireDessin() nb elements : " << nombre << endl;
     449
    448450    for ( int numero =1; numero <= nombre; numero++)
    449451    {
     
    553555        double x= partic.at(i).getPosition().getComponent(0);
    554556        double begamz = partic.at(i).getBetaGamma().getComponent(2);
    555         double xp = partic.at(i).getBetaGamma().getComponent(0)/begamz;
     557        double xp;
     558        if ( begamz != 0.0) {
     559          xp = partic.at(i).getBetaGamma().getComponent(0)/begamz;
     560        } else {
     561          xp = 0.0;
     562        }
    556563        //    cout << "x = " << x << " xp= " << xp << endl;
    557564        model->setData(i, 0, x);
Note: See TracChangeset for help on using the changeset viewer.