Changeset 3647 in Sophya for trunk/AddOn/TAcq/brproc.cc
- Timestamp:
- Jun 12, 2009, 4:49:47 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AddOn/TAcq/brproc.cc
r3646 r3647 10 10 #include "tvector.h" 11 11 #include "ntuple.h" 12 #include "datatable.h" 12 13 #include "fioarr.h" 13 14 #include "timestamp.h" … … 78 79 // filog << " ... NMaxMemZones=" << nmax_ << " NMean=" << nmean_ << " Step=" << step_ << endl; 79 80 80 / /NTuple81 /*----DELETE NTuple 81 82 const char* nnames[8] = {"fcs","tts","s1","s2","s12","s12re","s12im","s12phi"}; 82 83 NTuple nt(8, nnames); … … 84 85 uint_4 nmnt = 0; 85 86 double ms1,ms2,ms12,ms12re,ms12im,ms12phi; 87 ----*/ 86 88 // Initialisation pour calcul FFT 87 89 TVector< complex<r_4> > cfour1; // composant TF … … 113 115 uint_4 ifile = 0; 114 116 uint_4 nzm = 0; 117 118 uint_4 curfc=0; 119 uint_8 curtt=0; 120 uint_8 firsttt=0; 121 bool fgfirst=true; 115 122 for (uint_4 kmz=0; kmz<nmax_; kmz++) { 116 123 if (stop_) break; … … 126 133 break; 127 134 } 128 nmnt=0; ms1=ms2=ms12=ms12re=ms12im=ms12phi=0.;135 //---- DELETE nmnt=0; ms1=ms2=ms12=ms12re=ms12im=ms12phi=0.; 129 136 for(uint_4 i=0; i<memgr.NbPaquets(); i++) { 130 137 BRPaquet paq(NULL, buff+i*paqsz, paqsz); 131 138 if (!pcheck.Check(paq)) continue; // on ne traite que les paquets OK 132 139 if (fgfirst) { firsttt=paq.TimeTag(); fgfirst=false; } 140 curfc=paq.FrameCounter(); 141 curtt=paq.TimeTag()-firsttt; 133 142 // Traitement voie 1 134 143 for(sa_size_t j=0; j<vx.Size(); j++) … … 154 163 visiV12(j)+=cfour1(j)*conj(cfour2(j)); 155 164 // for(sa_size_t j=0; j<visiV12.Size(); j++) visiV12(j)+=zp1[j]*zp2[j]; 165 if (nzm==0) { 166 spectreV1.Info()["StartFC"] = curfc; 167 spectreV2.Info()["StartFC"] = curfc; 168 visiV12.Info()["StartFC"] = curfc; 169 spectreV1.Info()["StartTT"] = curtt; 170 spectreV2.Info()["StartTT"] = curtt; 171 visiV12.Info()["StartTT"] = curtt; 172 } 156 173 nzm++; 174 /*----DELETE 157 175 if (nmnt==0) { xnt[0]=paq.FrameCounter(); xnt[1]=paq.TimeTag(); } 158 176 for(sa_size_t j=2700; j<2800; j++) { … … 163 181 } 164 182 nmnt++; 183 ----*/ 165 184 totnbytesproc += paq.DataSize(); 166 185 totnbytesout += (2*sizeof(complex<r_4>)*cfour1.Size()); 167 186 168 187 } // Fin de boucle sur les paquets d'une zone 188 189 /*---- DELETE 169 190 if (nmnt>0) { 170 191 double fnorm = (double)nmnt*(2800-2700); … … 177 198 nt.Fill(xnt); 178 199 } 200 ----*/ 179 201 if ((nzm >= nmean_) || ((kmz==(nmax_-1))&&(nzm>1))) { 180 202 spectreV1 /= (r_4)(nzm); … … 186 208 spectreV2.Info()["NPaqMoy"] = nzm; 187 209 visiV12.Info()["NPaqMoy"] = nzm; 210 spectreV1.Info()["EndFC"] = curfc; 211 spectreV2.Info()["EndFC"] = curfc; 212 visiV12.Info()["EndFC"] = curfc; 213 spectreV1.Info()["EndTT"] = curtt; 214 spectreV2.Info()["EndTT"] = curtt; 215 visiV12.Info()["EndTT"] = curtt; 188 216 { 189 217 sprintf(fname,"%s_%d.ppf",path_.c_str(),(int)ifile); … … 214 242 cout << " ------------ BRProcARaw2C::run() END " << card2name_(card_) 215 243 << " ------------ " << endl; 216 { 244 /*---- DELETE 245 { 246 nt.Info()["FirstTT"]=firsttt; 217 247 cout << nt; 218 248 sprintf(fname,"%s_nt.ppf",path_.c_str()); … … 220 250 po << PPFNameTag("ntv12") << nt; 221 251 cout << " BRProcARaw2C::run() created NTuple file " << fname << card2name_(card_) << endl; 222 } 252 } 253 ---- */ 223 254 ts.SetNow(); 224 255 tm.SplitQ(); … … 320 351 << " *8=" << szfour*8 << endl; 321 352 353 DataTable dt; 354 dt.AddLongColumn("fc1"); 355 dt.AddLongColumn("fc2"); 356 dt.AddLongColumn("tt1"); 357 dt.AddLongColumn("tt2"); 358 DataTableRow dtr = dt.EmptyRow(); 359 322 360 uint_4 nzm = 0; 323 361 uint_4 totnoksfc = 0; … … 325 363 uint_4 totnpaq = 0; 326 364 uint_4 ifile = 0; 365 366 uint_4 curfc=0; 367 uint_8 curtt=0; 368 uint_4 curfc2=0; 369 uint_8 curtt2=0; 370 uint_8 firsttt=0; 371 uint_8 firsttt2=0; 372 bool fgfirst=true; 327 373 for (uint_4 kmz=0; kmz<nmax_; kmz++) { 328 374 uint_4 noksfc = 0; … … 377 423 // Les deux framecounters sont identiques ... 378 424 noksfc++; 425 curfc=paq1.FrameCounter(); 426 curfc2=paq2.FrameCounter(); 427 if (fgfirst) { 428 firsttt=paq1.TimeTag(); firsttt=paq2.TimeTag(); 429 cout << " BRProcBRaw4C()/Info First FC="<<curfc<<" , "<<curfc2<<" -> TT=" 430 << firsttt<<" , "<<firsttt2 <<endl; 431 fgfirst=false; 432 } 433 curtt=paq1.TimeTag()-firsttt; 434 curtt2=paq2.TimeTag()-firsttt2; 435 dtr[0]=curfc; dtr[1]=curtt; 436 dtr[2]=curfc2; dtr[3]=curtt2; 437 dt.AddRow(dtr); 438 379 439 complex<r_4>* zp1 = (complex<r_4>*)(procbuff1+i1*procpaqsz); 380 440 complex<r_4>* zp2 = (complex<r_4>*)(procbuff1+i1*procpaqsz+procpaqsz/2); … … 387 447 visiV24(j)+=zp2[j]*conj(zp4[j]); 388 448 } 449 if (nzm==0) { 450 visiV13.Info()["StartFC"] = curfc; 451 visiV14.Info()["StartFC"] = curfc; 452 visiV23.Info()["StartFC"] = curfc; 453 visiV24.Info()["StartFC"] = curfc; 454 visiV13.Info()["StartTT"] = curtt; 455 visiV14.Info()["StartTT"] = curtt; 456 visiV23.Info()["StartTT"] = curtt; 457 visiV24.Info()["StartTT"] = curtt; 458 } 389 459 nzm++; i1++; i2++; 390 460 totnbytesproc += 2*paq1.DataSize(); … … 402 472 visiV23.Info()["NPaqMoy"] = nzm; 403 473 visiV24.Info()["NPaqMoy"] = nzm; 474 visiV13.Info()["EndFC"] = curfc; 475 visiV14.Info()["EndFC"] = curfc; 476 visiV23.Info()["EndFC"] = curfc; 477 visiV24.Info()["EndFC"] = curfc; 478 visiV13.Info()["EndTT"] = curtt; 479 visiV14.Info()["EndTT"] = curtt; 480 visiV23.Info()["EndTT"] = curtt; 481 visiV24.Info()["EndTT"] = curtt; 404 482 char fname[512]; 405 483 { … … 427 505 } // Fin de boucle sur les zones a traiter 428 506 cout << " ------------------ BRProcBRaw4C::run() END ----------------- " << endl; 507 { 508 dt.Info()["FirstTT1"]=firsttt; 509 dt.Info()["FirstTT2"]=firsttt2; 510 cout << dt; 511 char fname[512]; 512 sprintf(fname,"%s_fctt.ppf",path_.c_str()); 513 POutPersist po(fname); 514 po << PPFNameTag("ttfc") << dt; 515 cout << " BRProcBRaw4C::run() created TimeTag/FrameCounter file " << fname << endl; 516 } 429 517 ts.SetNow(); 430 518 tm.SplitQ();
Note:
See TracChangeset
for help on using the changeset viewer.