Changeset 3920 in Sophya
- Timestamp:
- Dec 3, 2010, 4:51:54 AM (15 years ago)
- Location:
- trunk/AddOn/TAcq
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AddOn/TAcq/acqparam_exemple.d
r3918 r3920 111 111 # Defaut : visicalc 1024 1 1 112 112 visicalc 5000 2 1 113 ## Activation de remplissage du DataTable des visibilites 114 ## @visidtable 113 115 ## Choix des visibilites (Numero de paires de canaux) a calculer 114 116 # @visipairs FirstPair NbPairs [OddEvenOnly] -
trunk/AddOn/TAcq/brparam.cc
r3918 r3920 202 202 nmaxProc=0; 203 203 // --- variables de controle pour le calcul des visibilites 204 fgdoVisiC =false;204 fgdoVisiC=false; 205 205 nmeanVisiC=1024; 206 206 nbcalgrpVisiC=1; 207 207 nthrVisiC=1; 208 fgfdtVisiC=false; 208 209 firstpairVisiC=0; 209 210 nbpairsVisiC=999999999; … … 289 290 nmeanVisiC=p.nmeanVisiC; 290 291 nbcalgrpVisiC=p.nbcalgrpVisiC; 291 nthrVisiC=p.nthrVisiC; 292 nthrVisiC=p.nthrVisiC; 293 fgfdtVisiC=p.fgfdtVisiC; 292 294 firstpairVisiC=p.firstpairVisiC; 293 295 nbpairsVisiC=p.nbpairsVisiC; … … 379 381 nthrVisiC=conf.IParam("visicalc",2,1); 380 382 } 383 if (conf.HasKey("visidtable")) fgfdtVisiC=true; 381 384 if (conf.HasKey("visipairs")) { 382 385 firstpairVisiC=conf.IParam("visipairs",0,0); … … 539 542 else os << " No monotoring thread " << endl; 540 543 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; 542 546 os << " ... VisiCalc FirstPair= " << firstpairVisiC << " NbPairs= " << nbpairsVisiC 543 547 << ((fgpimpVisiC)?" (Odd-Even visibilities+AutoCorrel only) ":"") << endl; -
trunk/AddOn/TAcq/brparam.h
r3918 r3920 208 208 uint_4 nbcalgrpVisiC; // Nb d'objets/threads dans BRVisCalcGroup 209 209 uint_4 nthrVisiC; // Nb de threads pour l'execution parallele ds BRVisibilityCalculator 210 bool fgfdtVisiC; // true -> fill visibility data tables 210 211 uint_4 firstpairVisiC, nbpairsVisiC; // Numero premiere visibilites, nombre de visibilites a calculer 211 212 bool fgpimpVisiC; // true -> calcul visibilite pair-impair + autocorrel -
trunk/AddOn/TAcq/brviscalc.cc
r3915 r3920 45 45 visdt_.AddFloatColumn("vre"); 46 46 visdt_.AddFloatColumn("vim"); 47 ActivateVisDTable(); 47 48 48 49 if (nmean_ < 1) nmean_=memgr_.NbPaquets(); … … 65 66 { 66 67 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_; 69 71 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) { 81 83 if (fgcktt_) { 82 84 cout << " BRVisibilityCalculator - Check TimeTag done: TotNPaqProc= " << totnbpaq_ << endl; … … 306 308 << totnbpaq_ << " TotMegaFLOP=" << (uint_8)TotNbMegaFLOP() << " -> VisibMtx in " << flnm << endl; 307 309 308 FillVisibTable(moyfc_, moytt_);310 if (fgvisdt_) FillVisibTable(moyfc_, moytt_); 309 311 numfile_++; 310 312 } … … 393 395 cout << numfile_ << "-BRVisCalc[" << calcid_ << "/" << nbcalc_ << "]::Process() NPaqProc=" 394 396 << totnbpaq_ << " TotMegaFLOP=" << (uint_8)TotNbMegaFLOP() << " -> VisibMtx in " << flnm << endl; 395 FillVisibTable(moyfc_, moytt_);397 if (fgvisdt_) FillVisibTable(moyfc_, moytt_); 396 398 numfile_++; 397 399 } … … 612 614 } 613 615 /* --Methode-- */ 616 void BRVisCalcGroup::ActivateVisDTable(bool fgfdt) 617 { 618 for(size_t i=0; i<viscalcp_.size(); i++) 619 viscalcp_[i]->ActivateVisDTable(fgfdt); 620 } 621 /* --Methode-- */ 614 622 void BRVisCalcGroup::start() 615 623 { -
trunk/AddOn/TAcq/brviscalc.h
r3915 r3920 56 56 // Creation / sauvegarde d'une matrice de TimeTag / FrameCounter avec NCols=maxnpaq (nb de paquets/trigger) 57 57 int ActivateTimeTagCheck(uint_8 maxnpaq); 58 // Pour activer le remplissage du DataTable des visibilites 59 inline void ActivateVisDTable(bool fgfdt=false) { fgvisdt_=fgfdt; return; } 58 60 59 61 // Methode d'execution standard du thread (on redefinit la methode de BRBaseProcessor) … … 101 103 // FitsInOutFile dtfos_; 102 104 DataTable visdt_; 105 bool fgvisdt_; // true -> fill datatable 103 106 uint_4 numfile_; 104 107 uint_8 totnbpaq_; … … 131 134 inline int ActivateTimeTagCheck(uint_8 maxnpaq) 132 135 { return viscalcp_[0]->ActivateTimeTagCheck(maxnpaq); } 136 void ActivateVisDTable(bool fgfdt=false); 133 137 134 138 void start(); -
trunk/AddOn/TAcq/mfacq.cc
r3915 r3920 429 429 acpar.firstpairVisiC, acpar.nbpairsVisiC, acpar.fgpimpVisiC, acpar.nthrVisiC); 430 430 VCGThr.SelectFreqBinning(acpar.freqminVisiC, acpar.freqmaxVisiC, acpar.nbinfreqVisiC); 431 431 VCGThr.ActivateVisDTable(acpar.fgfdtVisiC); 432 432 433 433 cout << "mfacq[3] Creating EthernetReader thread object " << endl; -
trunk/AddOn/TAcq/racquproc.cc
r3918 r3920 181 181 Histo* phexp[2*MAXNBFIB]; 182 182 TMatrix<r_4>* psatur[2*MAXNBFIB]; 183 TVector<uint_4>* pvsatfreq[2*MAXNBFIB]; 183 184 for(int ifib=0; ifib<2*MAXNBFIB; ifib++) { 184 185 phist[ifib]=NULL; ph2[ifib]=NULL; phexp[ifib]=NULL; psatur[ifib]=NULL; … … 190 191 phexp[lc] = new Histo(-128.5,+128.5,257); 191 192 psatur[lc] = new TMatrix<r_4>(3,3); 193 pvsatfreq[lc] = new TVector<uint_4>(spectre_.NCols()); 192 194 *psatur[lc] = 0.; 193 195 } … … 254 256 else if (tbcp[j].imagI()==127) sii=1; 255 257 (*psatur[lc])(sir+1,sii+1)+=1.; 256 258 if ((sir!=0)||(sii!=0)) (*pvsatfreq[lc])(j)+=1; 257 259 spectre_(lc,j) += Zmod2(tbcp[j]); 258 260 } … … 271 273 else if (tbcp[j].imagI()==127) sii=1; 272 274 (*psatur[lc])(sir+1,sii+1)+=1.; 275 if ((sir!=0)||(sii!=0)) (*pvsatfreq[lc])(j)+=1; 273 276 274 277 spectre_(lc,j) += Zmod2(tbcp[j]); … … 333 336 sprintf(buftag,"saturV%d",(int)lc); 334 337 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 }340 338 (*psatur[lc])=0.; 339 sprintf(buftag,"satfreqV%d",(int)lc); 340 po << PPFNameTag(buftag) << (*pvsatfreq[lc]); 341 (*pvsatfreq[lc])=0; 341 342 } 342 343 nzm_[lc]=0; … … 389 390 sprintf(buftag,"saturV%d",(int)lc); 390 391 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]; 397 396 } 398 397 nzm_[lc]=0; … … 413 412 << " -> " << fracsame << " % )" << endl; 414 413 } 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 423 414 return 0; 424 415 }
Note:
See TracChangeset
for help on using the changeset viewer.