Changeset 3778 in Sophya


Ignore:
Timestamp:
May 18, 2010, 9:19:43 PM (15 years ago)
Author:
ansari
Message:

Ajout numero d'identification a BRBaseProcesseur, Reza 18/05/2010

Location:
trunk/AddOn/TAcq
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/AddOn/TAcq/brbaseproc.cc

    r3774 r3778  
    3434  fgokallfibers_=true;
    3535  totprocnpaq_=0;
     36  setNameId("baseproc",0);
    3637}
    3738
     
    7475  int rc=0;
    7576  try {
    76     cout << " BRBaseProcessor::run() - Starting " << " NFibers=" << memgr_.NbFibres()
     77    cout << " BRBaseProcessor[" << bpid_ << "]::run() - Starting " << " NFibers=" << memgr_.NbFibres()
    7778         << " NChan=" << 2*memgr_.NbFibres() << endl;   
    7879
     
    8586      Byte* buffg = memgr_.GetMemZone(mid);
    8687      if (buffg == NULL) {
    87         cout << "BRBaseProcessor::run()/ERROR memgr.GetMemZone(" << mid << ") -> NULL" << endl;
     88        cout << "BRBaseProcessor[" << bpid_ << "]::run()/ERROR memgr.GetMemZone(" << mid << ") -> NULL" << endl;
    8889        setRC(7);      fgrun=false;             
    8990        break; 
     
    9293        fbuff_[fib] = memgr_.GetMemZone(mid,fib);
    9394        if (fbuff_[fib] == NULL) { // cela ne devrait pas arriver
    94           cout << "BRBaseProcessor::run()/ERROR memgr.GetMemZone(" << mid << "," << fib << ") -> NULL" << endl;
     95          cout << "BRBaseProcessor[" << bpid_ << "]::run()/ERROR memgr.GetMemZone(" << mid << "," << fib << ") -> NULL" << endl;
    9596          setRC(9);       fgrun=false;         
    9697          break;
     
    121122    } // Fin de boucle sur les zones a traiter
    122123    //------------------------------------
    123     cout << " --------- END BRBaseProcessor::run() , TotNbProcPaq=" << totprocnpaq_ << endl;
     124    cout << " ---- END BRBaseProcessor[" << bpid_ << "]::run() , TotNbProcPaq=" << totprocnpaq_ << endl;
    124125    /*
    125126    for(size_t fib=0; fib<(size_t)memgr_.NbFibres(); fib++)  vpchk_[fib].Print();
     
    128129  }
    129130  catch (std::exception& exc) {
    130     cout << " BRBaseProcessor::run()/catched std::exception " << exc.what() << endl;
     131    cout << " BRBaseProcessor[" << bpid_ << "]::run()/catched std::exception " << exc.what() << endl;
    131132    setRC(98); 
    132133    return;
    133134  }
    134135  catch(...) {
    135     cout << " BRBaseProcessor::run()/catched unknown ... exception " << endl;
     136    cout << " BRBaseProcessor[" << bpid_ << "]::run()/catched unknown ... exception " << endl;
    136137    setRC(99); 
    137138    return;
  • trunk/AddOn/TAcq/brbaseproc.h

    r3774 r3778  
    3232  inline void STOP() { stop_ = true; } 
    3333
     34  inline void setNameId(const char* nom, int id)
     35  { bpnom_=nom;   bpid_=id;  }
     36  inline void setNameId(string nom, int id)
     37  { bpnom_=nom;   bpid_=id;  }
     38
    3439protected:
    3540  // Methode devant etre redefinie pour effectuer le traitement - appele pour chaque trigger 
     
    5055
    5156  uint_8 totprocnpaq_;
     57
     58  string bpnom_;    // nom du processeur
     59  int bpid_;        // numero d'identificateur
    5260};
    5361
  • trunk/AddOn/TAcq/brproc.cc

    r3777 r3778  
    6969  fgallfibok=NULL;
    7070  fgcktt_=false;
     71  setNameId("viscalc", 0);
    7172}
    7273
     
    118119    MemZaction mmzas[4]={MemZA_ProcA,MemZA_ProcB,MemZA_ProcC,MemZA_ProcD};
    119120    SetMemZAction(mmzas[calcid_]);
     121    setNameId("viscalc_grp", calcid_);
    120122  }
    121123  return ;
     
    204206      Byte* buffg = memgr_.GetMemZone(mid);
    205207      if (buffg == NULL) {
    206         cout << "BRVisibilityCalculator::run()/ERROR memgr.GetMemZone(" << mid << ") -> NULL" << endl;
     208        cout << "BRVisibilityCalculator[" << calcid_ << "]::run()/ERROR memgr.GetMemZone(" << mid << ") -> NULL" << endl;
    207209        setRC(7);      fgrun=false;             
    208210        break; 
     
    211213        fbuff_[fib] = memgr_.GetMemZone(mid,fib);
    212214        if (fbuff_[fib] == NULL) { // cela ne devrait pas arriver
    213           cout << "BRVisibilityCalculator::run()/ERROR memgr.GetMemZone(" << mid << "," << fib << ") -> NULL" << endl;
     215          cout << "BRVisibilityCalculator[" << calcid_ << "]::run()/ERROR memgr.GetMemZone(" << mid << "," << fib << ") -> NULL" << endl;
    214216          setRC(9);       fgrun=false;         
    215217          break;
     
    234236          POutPersist po(flnm);
    235237          po << vismtx_;
    236           cout << numfile_ << "-BRVisibilityCalculator::run() NPaqProc="
     238          cout << numfile_ << "-BRVisibilityCalculator[" << calcid_ << "]::run() NPaqProc="
    237239               << totnbpaq_ << "  -> Visibility Matrix in " << flnm << endl;
    238240          FillVisibTable(moyfc_, moytt_);
     
    267269      // Execution parallele  pour calcul des visibilites par bandes de frequence
    268270      int rcpex=paralex_.execute();
    269       if (rcpex!=0)  cout << " BRVisibilityCalculator::run() / Error Rc[paralex_.execute()]=" << rcpex << endl;
     271      if (rcpex!=0)  cout << " BRVisibilityCalculator[" << calcid_ << "]::run() / Error Rc[paralex_.execute()]=" << rcpex << endl;
    270272
    271273      memgr_.FreeMemZone(mid, mmsta_);  // (MemZS_ProcA);
    272274    } // Fin de boucle sur les zones a traiter
    273275    //------------------------------------
    274     cout << " --------- END BRVisibilityCalculator::run() , TotNbProcPaq=" << totprocnpaq_ << endl;
     276    cout << " --------- END BRVisibilityCalculator[" << calcid_ << "]::run() , TotNbProcPaq=" << totprocnpaq_ << endl;
    275277    /*
    276278    for(size_t fib=0; fib<(size_t)memgr_.NbFibres(); fib++)  vpchk_[fib].Print();
     
    280282  }
    281283  catch (std::exception& exc) {
    282     cout << " BRVisibilityCalculator::run()/catched std::exception " << exc.what() << endl;
     284    cout << " BRVisibilityCalculator[" << calcid_ << "]::run()/catched std::exception " << exc.what() << endl;
    283285    setRC(98); 
    284286    return;
    285287  }
    286288  catch(...) {
    287     cout << " BRVisibilityCalculator::run()/catched unknown ... exception " << endl;
     289    cout << " BRVisibilityCalculator[" << calcid_ << "]::run()/catched unknown ... exception " << endl;
    288290    setRC(99); 
    289291    return;
Note: See TracChangeset for help on using the changeset viewer.