Changeset 3920 in Sophya


Ignore:
Timestamp:
Dec 3, 2010, 4:51:54 AM (15 years ago)
Author:
ansari
Message:

Correction bug ds MonitorProc et ajout controle remplissage DataTable des visibiltes par BRVisibilityCalculator , cmv+Reza 02/12/2010

Location:
trunk/AddOn/TAcq
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/AddOn/TAcq/acqparam_exemple.d

    r3918 r3920  
    111111#  Defaut : visicalc 1024  1 1
    112112visicalc 5000  2 1
     113## Activation de remplissage du DataTable des visibilites
     114## @visidtable
    113115## Choix des visibilites (Numero de paires de canaux) a calculer
    114116#  @visipairs FirstPair NbPairs [OddEvenOnly]
  • trunk/AddOn/TAcq/brparam.cc

    r3918 r3920  
    202202  nmaxProc=0;
    203203//  --- variables de controle pour le calcul des visibilites 
    204   fgdoVisiC = false;
     204  fgdoVisiC=false;
    205205  nmeanVisiC=1024;
    206206  nbcalgrpVisiC=1;
    207207  nthrVisiC=1;
     208  fgfdtVisiC=false;
    208209  firstpairVisiC=0; 
    209210  nbpairsVisiC=999999999;
     
    289290  nmeanVisiC=p.nmeanVisiC;         
    290291  nbcalgrpVisiC=p.nbcalgrpVisiC;     
    291   nthrVisiC=p.nthrVisiC;         
     292  nthrVisiC=p.nthrVisiC;     
     293  fgfdtVisiC=p.fgfdtVisiC;   
    292294  firstpairVisiC=p.firstpairVisiC;
    293295  nbpairsVisiC=p.nbpairsVisiC; 
     
    379381    nthrVisiC=conf.IParam("visicalc",2,1);
    380382  }
     383  if (conf.HasKey("visidtable"))  fgfdtVisiC=true;
    381384  if (conf.HasKey("visipairs")) {
    382385    firstpairVisiC=conf.IParam("visipairs",0,0);
     
    539542  else os << " No monotoring thread " << endl;
    540543  if (fgdoVisiC) {
    541     os << " Visibility calculation, nbCalGrp=" << nbcalgrpVisiC << " NThr/VisCal=" << nthrVisiC << endl;
     544    os << " Visibility calculation, nbCalGrp=" << nbcalgrpVisiC << " NThr/VisCal=" << nthrVisiC
     545       << ((fgfdtVisiC)?" Fill_VisiDTable":" ") << endl;
    542546    os << " ... VisiCalc FirstPair= " << firstpairVisiC << " NbPairs= " << nbpairsVisiC
    543547       << ((fgpimpVisiC)?" (Odd-Even visibilities+AutoCorrel only) ":"") << endl;
  • trunk/AddOn/TAcq/brparam.h

    r3918 r3920  
    208208  uint_4 nbcalgrpVisiC;     // Nb d'objets/threads dans BRVisCalcGroup
    209209  uint_4 nthrVisiC;         // Nb de threads pour l'execution parallele ds BRVisibilityCalculator
     210  bool fgfdtVisiC;          // true -> fill visibility data tables
    210211  uint_4 firstpairVisiC, nbpairsVisiC;  // Numero premiere visibilites, nombre de visibilites a calculer
    211212  bool fgpimpVisiC;    // true -> calcul visibilite pair-impair + autocorrel 
  • trunk/AddOn/TAcq/brviscalc.cc

    r3915 r3920  
    4545  visdt_.AddFloatColumn("vre");
    4646  visdt_.AddFloatColumn("vim");
     47  ActivateVisDTable();
    4748
    4849  if (nmean_ < 1)  nmean_=memgr_.NbPaquets();
     
    6566{
    6667  if (totnbpaq_<1)   return;
    67   cout << " ~BRVisibilityCalculator - Visibility Datatable : " << endl;
    68   cout << visdt_;
     68  if (fgvisdt_) {
     69    cout << " ~BRVisibilityCalculator - Visibility Datatable : " << endl;
     70    cout << visdt_;
    6971 
    70   string filename;
    71   filename = outpath_+"visdt.ppf";
    72   if (nbcalc_>1) {
    73     char sbuff[32];
    74     sprintf(sbuff,"visdt_%d.ppf",(int)calcid_);
    75     filename = outpath_+sbuff;
    76   }
    77   POutPersist po(filename);
    78   po << visdt_;
    79   if (calcid_ == 0) {
    80    
     72    string filename;
     73    filename = outpath_+"visdt.ppf";
     74    if (nbcalc_>1) {
     75      char sbuff[32];
     76      sprintf(sbuff,"visdt_%d.ppf",(int)calcid_);
     77      filename = outpath_+sbuff;
     78    }
     79    POutPersist po(filename);
     80    po << visdt_;
     81  }
     82  if (calcid_ == 0) {   
    8183    if (fgcktt_) {
    8284      cout << " BRVisibilityCalculator -  Check TimeTag done: TotNPaqProc= " << totnbpaq_ << endl;
     
    306308               << totnbpaq_ << " TotMegaFLOP=" << (uint_8)TotNbMegaFLOP() << " -> VisibMtx in " << flnm << endl;
    307309
    308           FillVisibTable(moyfc_, moytt_);
     310          if (fgvisdt_) FillVisibTable(moyfc_, moytt_);
    309311          numfile_++;
    310312        }
     
    393395      cout << numfile_ << "-BRVisCalc[" << calcid_ << "/" << nbcalc_ << "]::Process() NPaqProc="
    394396           << totnbpaq_ << " TotMegaFLOP=" << (uint_8)TotNbMegaFLOP() << " -> VisibMtx in " << flnm << endl;
    395       FillVisibTable(moyfc_, moytt_);
     397      if (fgvisdt_) FillVisibTable(moyfc_, moytt_);
    396398      numfile_++;
    397399    }
     
    612614}
    613615/* --Methode-- */
     616void BRVisCalcGroup::ActivateVisDTable(bool fgfdt)
     617{
     618  for(size_t i=0; i<viscalcp_.size(); i++)
     619    viscalcp_[i]->ActivateVisDTable(fgfdt);
     620}
     621/* --Methode-- */
    614622void BRVisCalcGroup::start()
    615623{
  • trunk/AddOn/TAcq/brviscalc.h

    r3915 r3920  
    5656  // Creation / sauvegarde d'une matrice de TimeTag / FrameCounter avec NCols=maxnpaq (nb de paquets/trigger) 
    5757  int ActivateTimeTagCheck(uint_8 maxnpaq);
     58  // Pour activer le remplissage du DataTable des visibilites
     59  inline void ActivateVisDTable(bool fgfdt=false)  { fgvisdt_=fgfdt;  return; }
    5860
    5961  // Methode d'execution standard du thread (on redefinit la methode de BRBaseProcessor)
     
    101103  //  FitsInOutFile dtfos_;
    102104  DataTable visdt_;
     105  bool fgvisdt_;   // true -> fill datatable
    103106  uint_4 numfile_;
    104107  uint_8 totnbpaq_;
     
    131134  inline int ActivateTimeTagCheck(uint_8 maxnpaq)
    132135  { return viscalcp_[0]->ActivateTimeTagCheck(maxnpaq); }
     136  void ActivateVisDTable(bool fgfdt=false);
    133137
    134138  void start();
  • trunk/AddOn/TAcq/mfacq.cc

    r3915 r3920  
    429429                        acpar.firstpairVisiC, acpar.nbpairsVisiC, acpar.fgpimpVisiC, acpar.nthrVisiC);
    430430  VCGThr.SelectFreqBinning(acpar.freqminVisiC, acpar.freqmaxVisiC, acpar.nbinfreqVisiC);
    431 
     431  VCGThr.ActivateVisDTable(acpar.fgfdtVisiC);
    432432
    433433  cout << "mfacq[3] Creating   EthernetReader thread object     " << endl;
  • trunk/AddOn/TAcq/racquproc.cc

    r3918 r3920  
    181181  Histo* phexp[2*MAXNBFIB];
    182182  TMatrix<r_4>* psatur[2*MAXNBFIB]; 
     183  TVector<uint_4>* pvsatfreq[2*MAXNBFIB];
    183184  for(int ifib=0; ifib<2*MAXNBFIB; ifib++) {
    184185    phist[ifib]=NULL; ph2[ifib]=NULL; phexp[ifib]=NULL; psatur[ifib]=NULL;
     
    190191      phexp[lc] = new Histo(-128.5,+128.5,257);
    191192      psatur[lc] = new TMatrix<r_4>(3,3);
     193      pvsatfreq[lc] = new TVector<uint_4>(spectre_.NCols());
    192194      *psatur[lc] = 0.;
    193195    }
     
    254256            else if (tbcp[j].imagI()==127) sii=1;
    255257            (*psatur[lc])(sir+1,sii+1)+=1.;
    256 
     258            if ((sir!=0)||(sii!=0))  (*pvsatfreq[lc])(j)+=1;
    257259            spectre_(lc,j) += Zmod2(tbcp[j]);
    258260          }
     
    271273            else if (tbcp[j].imagI()==127) sii=1;
    272274            (*psatur[lc])(sir+1,sii+1)+=1.;
     275            if ((sir!=0)||(sii!=0))  (*pvsatfreq[lc])(j)+=1;
    273276
    274277            spectre_(lc,j) += Zmod2(tbcp[j]);
     
    333336          sprintf(buftag,"saturV%d",(int)lc);
    334337          po << PPFNameTag(buftag) << (*psatur[lc]);
    335           cout << " Matrice Saturation Voie[" << lc << "] : " <<  (*psatur[lc]);
    336           if (nzm_[lc]>0)  {
    337             (*psatur[lc]) /= ((r_4)nzm_[lc]*0.01); 
    338             cout << " Matrice Saturation Pourcentage Voie[" << lc << "] : " <<  (*psatur[lc]);
    339           }
    340338          (*psatur[lc])=0.;
     339          sprintf(buftag,"satfreqV%d",(int)lc);
     340          po << PPFNameTag(buftag) << (*pvsatfreq[lc]);
     341          (*pvsatfreq[lc])=0;
    341342        }
    342343        nzm_[lc]=0;
     
    389390        sprintf(buftag,"saturV%d",(int)lc);
    390391        po << PPFNameTag(buftag) << (*psatur[lc]);
    391         cout << " Matrice Saturation Voie[" << lc << "] : " <<  (*psatur[lc]);
    392         if (nzm_[lc]>0)  {
    393           (*psatur[lc]) /= ((r_4)nzm_[lc]*0.01); 
    394           cout << " Matrice Saturation Pourcentage Voie[" << lc << "] : " <<  (*psatur[lc]);
    395         }
    396         (*psatur[lc])=0.;
     392        sprintf(buftag,"satfreqV%d",(int)lc);
     393        po << PPFNameTag(buftag) << (*pvsatfreq[lc]);
     394        delete psatur[lc];
     395        delete pvsatfreq[lc];
    397396      }
    398397      nzm_[lc]=0;
     
    413412         << " -> " << fracsame << " % )" << endl;
    414413  }
    415 
    416   for(sa_size_t lc=0; lc<2*memgr.NbFibres(); lc++) {
    417     if (phist[lc]) delete phist[lc];
    418     if (ph2[lc]) delete ph2[lc];
    419     if (phexp[lc]) delete phexp[lc];
    420     if (psatur[lc]) delete psatur[lc];
    421   }
    422 
    423414  return 0;
    424415}
Note: See TracChangeset for help on using the changeset viewer.