Changeset 3674 in Sophya for trunk/AddOn/TAcq
- Timestamp:
- Nov 15, 2009, 1:27:00 AM (16 years ago)
- Location:
- trunk/AddOn/TAcq
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AddOn/TAcq/brpaqu.cc
r3671 r3674 226 226 szcmx = pq.DataSize()-offset; 227 227 if (szcmx<szc) szc=szcmx; 228 memcpy(Data1(), pq.Data1() , szc);228 memcpy(Data1(), pq.Data1()+offset, szc); 229 229 if (ract==BR_OneChanReducK0) *(Data1C()) = *(pq.Data1C()); // On garde le continu et le nyquist 230 230 SetPaqLen(szc/4); … … 235 235 szcmx = pq.DataSize()/2-offset; 236 236 if (szcmx<szc) szc=szcmx; 237 memcpy(Data1(), pq.Data1() , szc);238 memcpy(Data2(), pq.Data2() , szc);237 memcpy(Data1(), pq.Data1()+offset, szc); 238 memcpy(Data2(), pq.Data2()+offset, szc); 239 239 if (ract==BR_TwoChanReducK0) { // On garde le continu et le nyquist 240 240 *(Data1C()) = *(pq.Data1C()); … … 552 552 case BR_FFTTwoChanSwap32 : 553 553 rs = "BR_FFTTwoChanSwap32"; 554 break; 555 default: 556 rs = "?????"; 557 break; 558 } // Fin switch 559 return rs; 560 } 561 562 /* --Methode__ */ 563 const char* BRPaquet::ReducActionToString(BRPaqReducAction rac) 564 { 565 const char * rs=""; 566 switch ( rac ) { 567 case BR_CopyRA : 568 rs = "BR_CopyRA"; 569 break; 570 case BR_OneChanReduc : 571 rs = "BR_OneChanReduc"; 572 break; 573 case BR_TwoChanReduc : 574 rs = "BR_TwoChanReduc"; 575 break; 576 case BR_OneChanReducK0 : 577 rs = "BR_OneChanReducK0"; 578 break; 579 case BR_TwoChanReducK0 : 580 rs = "BR_TwoChanReducK0"; 554 581 break; 555 582 default: -
trunk/AddOn/TAcq/brpaqu.h
r3671 r3674 193 193 static void ReorderFFTData(SByte* src, SByte* dst, int sz); 194 194 static const char* FmtConvToString(BRDataFmtConv fgconv); 195 static const char* ReducActionToString(BRPaqReducAction rac); 196 195 197 // protected: 196 198 // donnees membres -
trunk/AddOn/TAcq/brparam.cc
r3673 r3674 63 63 64 64 /* --Methode-- */ 65 void BRConfList::SetBaseDirectory(string basedir) 66 { 67 basedir_=basedir; 68 size_t len = basedir_.length(); 69 if ((len>1)&&(basedir_[len-1]!='/')) basedir_ += '/'; 70 } 71 72 /* --Methode-- */ 65 73 void BRConfList::Set(BRConfList const & cf) 66 74 { … … 86 94 87 95 /* --Methode-- */ 88 BRParList::BRParList(string fibres,unsigned int paqsz ,unsigned int nframeDMA,96 BRParList::BRParList(string fibres,unsigned int paqsz ,unsigned int dmaszkb, 89 97 int nfiles, string acqmod,int nblocfile,int nmxproc , 90 98 string outpath, uint_4 nzon , uint_4 npaqzon, bool fgcntlc) … … 94 102 for (int fib=0; fib<PMAXNBFIBRES;fib++) FiberNum[fib]=0; 95 103 PaqSize=paqsz; 96 nbFrameDMA=nframeDMA;104 dmasizekb=dmaszkb; 97 105 NbFiles=nfiles; 98 106 AcqMode=acqmod; … … 105 113 savesigfits=true; 106 114 fgnulldev4fits=false; 115 107 116 fg_hard_ctrlc=fgcntlc; 117 108 118 fgreducpsize=false; 119 reducneedcopy=false; 109 120 pqreducmode=BR_CopyRA; 110 121 redpqsize=PaqSize; 111 122 reducoffset=0; 112 123 124 skysource=""; 113 125 monothr=false; 114 126 activate_pattern=false; … … 130 142 for (int fib=0; fib<PMAXNBFIBRES;fib++) FiberNum[fib]=p.FiberNum[fib]; 131 143 PaqSize=p.PaqSize; 132 nbFrameDMA=p.nbFrameDMA;144 dmasizekb=p.dmasizekb; 133 145 NbFiles=p.NbFiles; 134 146 AcqMode=p.AcqMode; … … 145 157 146 158 fgreducpsize=p.fgreducpsize; 159 reducneedcopy=p.reducneedcopy; 147 160 pqreducmode=p.pqreducmode; 148 161 redpqsize=p.redpqsize; 149 162 reducoffset=p.reducoffset; 150 163 164 skysource=p.skysource; 165 151 166 monothr=p.monothr; 152 167 activate_pattern=p.activate_pattern; … … 158 173 { 159 174 DataCards conf(file); 160 FiberListS= conf.SParam(" Fibres",0,"1");161 PaqSize=(unsigned int)conf.IParam("PaqSZ",0,16424);162 nbFrameDMA =(unsigned int) conf.IParam("nbFrameDma",0,32);163 NbFiles=conf.IParam("NbFiles",0,1);164 NBlocPerFile=conf.IParam("NBlocPerFile",0,10);165 N MaxProc=conf.IParam("NMaxProc",0,0);166 OutPathName= conf.SParam("OutPathName",0,"TstAcq");175 FiberListS= conf.SParam("fibres",0,"1"); 176 OutPathName= conf.SParam("outpathname",0,"TstAcq"); 177 skysource= conf.SParam("skysource",0,""); 178 PaqSize=(uint_4)conf.IParam("paqsize",0,16424); 179 dmasizekb =(uint_4) conf.IParam("dmasizekb",0,32); 180 NbFiles=conf.IParam("nbfiles",0,1); 181 NBlocPerFile=conf.IParam("nblocperfile",0,10); 167 182 AcqMode =conf.SParam("acqmode",0,"std"); 168 nZones=(unsigned int)conf.IParam("nZones",0,4); 169 nPaqZone=(uint_4)conf.IParam("nPaqZone",0,128); 170 fg_hard_ctrlc=conf.HasKey("fg_hard_ctrlc"); 183 nZones=(uint_4)conf.IParam("memmgr",0,4); 184 nPaqZone=(uint_4)conf.IParam("memmgr",1,128); 185 if (conf.HasKey("reducpaqsz")) { // reduction des tailles de paquets 186 fgreducpsize=true; 187 redpqsize=(uint_4)conf.IParam("reducpaqsz",0,PaqSize/4); 188 reducoffset=(uint_4)conf.IParam("reducpaqsz",1,0); 189 } 190 NMaxProc=conf.IParam("monitor",0,0); 191 fg_hard_ctrlc=conf.HasKey("hard_ctrlc"); 171 192 172 193 Decode(); … … 191 212 } 192 213 string acqmode = AcqMode; 193 if (acqmode == "std") swapall = BR_Copy ; 214 reducneedcopy=false; pqreducmode=BR_TwoChanReduc; 215 if (acqmode == "std") swapall = BR_Copy ; 194 216 if (acqmode == "nosw") swapall = BR_Copy ; 195 217 if (acqmode == "nof") { swapall = BR_Copy ; savesigfits = false; } 196 if (acqmode == "fft1c") swapall = BR_FFTOneChan; 197 if (acqmode == "fft2c") swapall = BR_FFTTwoChan; 198 if (acqmode == "fft1cnof") { swapall = BR_FFTOneChan; savesigfits = false; } 199 if (acqmode == "fft2cnof") { swapall = BR_FFTTwoChan; savesigfits = false; } 218 if (acqmode == "fft1c") { swapall = BR_FFTOneChan; reducneedcopy=true; pqreducmode=BR_OneChanReducK0; } 219 if (acqmode == "fft2c") { swapall = BR_FFTTwoChan; reducneedcopy=true; pqreducmode=BR_TwoChanReducK0; } 220 if (acqmode == "fft1cnof") 221 { swapall = BR_FFTOneChan; savesigfits = false; reducneedcopy=true; pqreducmode=BR_OneChanReducK0; } 222 if (acqmode == "fft2cnof") 223 { swapall = BR_FFTTwoChan; savesigfits = false; reducneedcopy=true; pqreducmode=BR_TwoChanReducK0; } 200 224 if (acqmode == "mono") { monothr = true; swapall = BR_Copy; } 201 225 if (acqmode == "monodirect") { monothr = true; swapall = BR_CopyHDR;} … … 206 230 207 231 if (acqmode == "swapall") swapall = BR_SwapAll; 208 if (acqmode == "fft1csw") swapall = BR_FFTOneChanSwapAll; 209 if (acqmode == "fft2csw") swapall = BR_FFTTwoChanSwapAll; 210 if (acqmode == "fft1cswnof") { swapall = BR_FFTOneChanSwapAll; savesigfits = false; } 211 if (acqmode == "fft2cswnof") { swapall = BR_FFTTwoChanSwapAll; savesigfits = false; } 232 if (acqmode == "fft1csw") 233 { swapall = BR_FFTOneChanSwapAll; reducneedcopy=true; pqreducmode=BR_OneChanReducK0; } 234 if (acqmode == "fft2csw") 235 { swapall = BR_FFTTwoChanSwapAll; reducneedcopy=true; pqreducmode=BR_TwoChanReducK0; } 236 if (acqmode == "fft1cswnof") 237 { swapall = BR_FFTOneChanSwapAll; savesigfits = false; reducneedcopy=true; pqreducmode=BR_OneChanReducK0; } 238 if (acqmode == "fft2cswnof") 239 { swapall = BR_FFTTwoChanSwapAll; savesigfits = false; reducneedcopy=true; pqreducmode=BR_TwoChanReducK0; } 212 240 if ((acqmode == "swh") || (acqmode == "mxs") || (acqmode == "monoswh") ) swapall = BR_SwapHDR; 213 241 if ((acqmode == "swapallnof") || (acqmode == "mxs") ) savesigfits = false; … … 217 245 if (acqmode == "swap32") swapall = BR_Swap32 ; 218 246 if (acqmode == "nof32") { swapall = BR_Swap32 ; savesigfits = false; } 219 if (acqmode == "fft1c32") swapall = BR_FFTOneChanSwap32; 220 if (acqmode == "fft2c32") swapall = BR_FFTTwoChanSwap32; 221 if (acqmode == "fft1cnof32") { swapall = BR_FFTOneChanSwap32; savesigfits = false; } 222 if (acqmode == "fft2cnof32") { swapall = BR_FFTTwoChanSwap32; savesigfits = false; } 247 if (acqmode == "fft1c32") 248 { swapall = BR_FFTOneChanSwap32; reducneedcopy=true; pqreducmode=BR_OneChanReducK0; } 249 if (acqmode == "fft2c32") 250 { swapall = BR_FFTTwoChanSwap32; reducneedcopy=true; pqreducmode=BR_TwoChanReducK0; } 251 if (acqmode == "fft1cnof32") 252 { swapall = BR_FFTOneChanSwap32; savesigfits = false; reducneedcopy=true; pqreducmode=BR_OneChanReducK0; } 253 if (acqmode == "fft2cnof32") 254 { swapall = BR_FFTTwoChanSwap32; savesigfits = false; reducneedcopy=true; pqreducmode=BR_TwoChanReducK0; } 255 256 if (fgreducpsize) { 257 if (redpqsize>=PaqSize) fgreducpsize=false; 258 else { 259 if(reducoffset>(PaqSize-redpqsize)/2) reducoffset=(PaqSize-redpqsize)/2; 260 } 261 } 223 262 } 224 263 … … 229 268 os << " FiberListS=" << FiberListS ; 230 269 os << " PaqSize=" <<PaqSize; 231 os << " nbFrameDMA=" <<nbFrameDMA<< endl;270 os << " DMA_Size_kb=" <<dmasizekb << endl; 232 271 os << " AcqMode="<<AcqMode; 233 272 os << " Type of acquisition :" << BRPaquet::FmtConvToString( swapall) << endl; 273 os << " SkySource=" << skysource; 234 274 os << " NbFiles="<<NbFiles; 235 275 os << " NBlocPerFile="<<NBlocPerFile; 236 276 os << " OutPathName="<<OutPathName << endl; 237 277 os << " MemMgr: nZones="<<nZones; 238 os << " nPaqZone="<<nPaqZone; 278 os << " nPaqZone="<<nPaqZone<<endl; 279 if (fgreducpsize) { 280 os << " PaquetSize Reduction, ReducedSize=" << redpqsize << " Offset=" << reducoffset << endl; 281 } 239 282 os << " fg_hard_ctrlc=" << ((fg_hard_ctrlc)?"true":"false"); 240 283 os << " Save to fits " << ((savesigfits)?"true":"false") << endl; -
trunk/AddOn/TAcq/brparam.h
r3673 r3674 60 60 BRConfList(string basedir, vector<ADCBoardDesc> boards); 61 61 BRConfList(BRConfList const & cf); 62 63 void SetBaseDirectory(string basedir); 62 64 void Set(BRConfList const & cf); 63 65 ostream& Print(ostream& os) ; 64 66 void ReadDCFile(string file); 65 inline string& BaseDirectory(){ return basedir_; }67 inline const string& BaseDirectory() const { return basedir_; } 66 68 //....................................... 67 69 string basedir_; … … 75 77 class BRParList { 76 78 public: 77 BRParList (string fibres="1", unsigned int szframe= 16424, unsigned int nframeDMA= 32,79 BRParList (string fibres="1", unsigned int szframe= 16424, unsigned int dmaszkb = 32, 78 80 int nfiles=1, string acqmode="fft2c", int nblocfile=10, 79 81 int nmaxpr = 0, string outpath="TstAcq", … … 89 91 inline int NFibers() { return NbFibers; } 90 92 // Taille des operations DMA (en octets) 91 inline uint_4 DMASizeBytes() { return nbFrameDMA*1024; }93 inline uint_4 DMASizeBytes() { return dmasizekb*1024; } 92 94 // Taille des operations DMA (en KB=1024 bytes) 93 inline uint_4 DMASizeKB() { return nbFrameDMA; }95 inline uint_4 DMASizeKB() { return dmasizekb; } 94 96 // Taille des paquets recus sur PCIExpress 95 97 inline uint_4 RecvPaquetSize() { return PaqSize; } … … 106 108 inline uint_4 MaxNbBlocs() { return NbFiles*NBlocPerFile; } 107 109 110 // Identification source ciel 111 inline string& SkySource() { return skysource; } 112 108 113 //.......................................... 109 114 void Decode(); … … 116 121 string OutPathName; // directory de base 117 122 string ProcPathName; 118 u nsigned intPaqSize ; // taille des paquets ou sizeFrame119 u nsigned int nbFrameDMA; // taille du dma en multiple de 2 (2 a 56)123 uint_4 PaqSize ; // taille des paquets ou sizeFrame 124 uint_4 dmasizekb ; // taille du dma en multiple de 2 (2 a 56) 120 125 int NbFiles; // nombre de fichier produits 121 126 int NBlocPerFile; // nombre de bloc par fichier … … 134 139 // ---- Pour gerer la reduction des tailles de paquets 135 140 bool fgreducpsize; // true -> reduction taille des paquets 141 bool reducneedcopy; // true -> besoin de copie intermediaire pour la reduction de taille de paquets 136 142 BRPaqReducAction pqreducmode; 137 143 uint_4 redpqsize; 138 144 uint_4 reducoffset; 139 145 146 // Identification source observee dans le ciel 147 string skysource; 140 148 // Pour des tests de performances ou sans carte ADC (pattern) 141 149 bool monothr ; // pour les test mono thread … … 200 208 inline uint_4 MaxNbBlocs() { return param_->MaxNbBlocs(); } 201 209 210 // Identification source ciel 211 inline string& SkySource() { return param_->SkySource(); } 212 202 213 // repertoire d'acquisition 203 214 inline string OutputDirectory() { return (config_->BaseDirectory()+param_->OutPathName); } -
trunk/AddOn/TAcq/mfacq.cc
r3672 r3674 45 45 } 46 46 47 47 string pardcfile=arg[1]; 48 #ifndef NOPCIECARD 49 string basedir="/Raid"; 50 #else 51 string basedir="./"; 52 #endif 53 if (narg>2) basedir=arg[2]; 48 54 try { 49 55 // Creation/initialisation parametres Acq 50 56 BRAcqConfig acpar; 51 57 acpar.ReadParamFile(arg[1]); 52 #ifndef NOPCIECARD 53 BRConfList conf("/Raid"); 54 #else 55 BRConfList conf("./"); 56 #endif 57 acpar.Set(conf); 58 acpar.GetConfig().SetBaseDirectory(basedir); 58 59 // Creation des repertoires 59 60 if (acpar.CreateOutputDirectories()!=0) return 9; … … 97 98 { 98 99 if (fgshort) { 99 cout << " Usage: mfacq DataCardFile \n" << endl; 100 cout << "parameter in DataCard :Fibres PaquetSize NFrameDMA NFiles NBlocPerFile \n" 101 << " NMaxProc DataDirPath acqmode nZones nPaqZones fg_hard_ctrlc" << endl; 102 cout << " type mfacq -h for detailed usage " << endl; 100 cout << " Usage: mfacq DataCardFile [BaseDirectory] \n" << endl; 101 cout << " Parameters in DataCard : \n" 102 << " fibres outpathname skysource paqsize dmasizekb nbfiles \n" 103 << " nblocperfile acqmode memmgr monitor reducpaqsz "<< endl; 104 cout << " BaseDirectory (default= /Raid ) " << endl; 103 105 return; 104 106 } … … 119 121 cout << " mfacq[1]/Info: Creating RAcqMemZoneMgr for" << acpar.NbFibers << " fibers , nZones=" 120 122 << acpar.nZones << " NbPaquet/Zone=" << acpar.nPaqZone 121 << " mmgrPaqSize=" << acpar.MMgrPaquetSize() << endl;123 << " MmgrPaqSize=" << acpar.MMgrPaquetSize() << endl; 122 124 RAcqMemZoneMgr mmgr(acpar.nZones, bpar.NFibers(), acpar.nPaqZone, acpar.MMgrPaquetSize()); 123 125 pMmgr=&mmgr; -
trunk/AddOn/TAcq/racqurw.cc
r3673 r3674 21 21 #include "datatable.h" // Pour sauver les entetes de paquet 22 22 #include <sys/time.h> // pour gettimeofday 23 24 // Si on veut que MultiDataSaver cree des fichiers avec le numero des FrameCounters... 25 // define DEBUGPAQHDR 26 23 27 //------------------------------------------------------- 24 28 // Classe thread de lecture PCI-Express … … 494 498 495 499 cout << " PCIEMultiReader::run() - Starting , NMaxMemZones=" << nmax_ 496 << " memgr.NbPaquets()=" << memgr.NbPaquets() << "Paqsize " << packSize_<< endl; 500 << " memgr.NbPaquets()=" << memgr.NbPaquets() << "Paqsize " << packSize_ 501 << " " << BRPaquet::FmtConvToString(swapall_) << endl; 497 502 setRC(1); 498 503 … … 507 512 Byte* Datas[MAXNBFIB]; 508 513 Byte* tampon[MAXNBFIB] ; 514 Byte* predtampon=NULL; // tampon de recopie pour la reduction des tailles de paquets 509 515 Byte* nextpaq=NULL; 510 516 uint_4 off_acheval=0; … … 518 524 tampon[i]= new Byte[paqsz]; 519 525 } 520 526 bool fgredpaq=par_.fgreducpsize; 527 if (fgredpaq) { 528 cout << " PCIEMultiReader::run() - PaquetSizeReduction - RedSize=" << par_.redpqsize 529 << " Offset=" << par_.reducoffset << " " << ((par_.reducneedcopy)?"NeedCopy":"NOCopy") 530 << " " << BRPaquet::ReducActionToString(par_.pqreducmode) << endl; 531 predtampon = new Byte[paqsz]; 532 } 533 534 #ifdef DEBUGPAQHDR 521 535 ofstream header[MAXNBFIB]; 522 536 for(uint_4 fib=0; fib<nbDma_; fib++) { … … 525 539 header[fib].open(hfnm); 526 540 } 527 541 #endif 528 542 uint_4 npaqfait[MAXNBFIB] ; 529 543 for (int i=0;i< (int)nbDma_ ;i++) npaqfait[i]=0; … … 571 585 } 572 586 // CHECK S'il faut faire une reduction de taille de paquet 573 if (par_.fgreducpsize) { // reduction taille de paquet 574 587 if (fgredpaq) { // reduction taille de paquet 588 if (par_.reducneedcopy) { 589 BRPaquet paqc1(tampon[fib], predtampon, paqsz, swapall_); 590 BRPaquet paqc2(nextpaq, par_.redpqsize); 591 paqc2.CopyFrom(paqc1, par_.pqreducmode, par_.reducoffset); 592 } 593 else { 594 BRPaquet paqc1(tampon[fib], paqsz); 595 BRPaquet paqc2(nextpaq, par_.redpqsize); 596 paqc2.CopyFrom(paqc1, par_.pqreducmode, par_.reducoffset); 597 } 575 598 } 576 599 else { … … 581 604 if (fib==nbDma_-1) npaqfaitg++; // Ne pas oublier le compteur de paquets faits 582 605 pcheck[fib].Check(paq); // Verification du paquet / FrameCounter 583 header[fib] << dec << paq.FrameCounter()<< endl; ; 606 #ifdef DEBUGPAQHDR 607 header[fib] << dec << paq.FrameCounter()<< endl; 608 #endif 584 609 } 585 610 } … … 607 632 } 608 633 // CHECK S'il faut faire une reduction de taille de paquet 609 if (par_.fgreducpsize) { // reduction taille de paquet 610 634 if (fgredpaq) { // reduction taille de paquet 635 if (par_.reducneedcopy) { 636 BRPaquet paqc1(Datas[fib]+curoff, predtampon, paqsz, swapall_); 637 BRPaquet paqc2(nextpaq, par_.redpqsize); 638 paqc2.CopyFrom(paqc1, par_.pqreducmode, par_.reducoffset); 639 } 640 else { 641 BRPaquet paqc1(Datas[fib]+curoff, paqsz); 642 BRPaquet paqc2(nextpaq, par_.redpqsize); 643 paqc2.CopyFrom(paqc1, par_.pqreducmode, par_.reducoffset); 644 } 611 645 } 612 646 else { … … 617 651 if (fib==nbDma_-1) npaqfaitg++; // Ne pas oublier le compteur de paquets faits 618 652 pcheck[fib].Check(paq); // Verification du paquet / FrameCounter 619 header[fib] << dec << paq.FrameCounter()<< endl; ; 653 #ifdef DEBUGPAQHDR 654 header[fib] << dec << paq.FrameCounter()<< endl; 655 #endif 620 656 } 621 657 curoff += paqsz; // On avance l'index dans le buffer du DMA … … 647 683 // //// Nettoyage final 648 684 MZoneManage(true); 685 for (int i=0;i< (int)nbDma_ ;i++) delete[] tampon[i]; 686 if ((fgredpaq)&&predtampon) delete[] predtampon; 687 #ifdef DEBUGPAQHDR 649 688 for(uint_4 fib=0; fib<nbDma_; fib++) header[fib].close(); 650 for (int i=0;i< (int)nbDma_ ;i++) delete[] tampon[i]; 689 #endif 690 651 691 //DBG cout << " fin thread ========================" <<endl; 652 692 return; … … 743 783 uint_4 paqsz = memgr.PaqSize(); 744 784 cout << " ============================ MultiDataSaver::run() PaqSize " << paqsz <<endl; 785 bool fgfirstfctt=false; 745 786 bool fgnulldev = bpar.GetFileDevNull(); 746 787 if (fgnulldev) { … … 772 813 // Sans TRAILER de paquet mff.setDTypeNaxis(MF_Byte, paq0.DataSize()+paq0.HeaderSize(), npaqperfile); 773 814 } 774 // Ajout mots-cle additionnels a tous les fichiers FITS 775 AddFitsKW(mff,bpar); 776 fnum++; 815 fnum++; fgfirstfctt=true; 777 816 } 778 817 else sprintf(fname,"MemDataBloc[%d]-NoDataFile",(int)fnum++); … … 797 836 for(uint_4 i=0; i<memgr.NbPaquets(); i++) { // boucle sur les paquets 798 837 BRPaquet paq(NULL, buff+i*paqsz, paqsz); 799 pcheck[fib].Check(paq); // Verification du paquet / FrameCounter 838 bool cpaqok=pcheck[fib].Check(paq); // Verification du paquet / FrameCounter 839 if (cpaqok && fgfirstfctt) { 840 framecnt_first_[fib] = pcheck[fib].LastFrameNum(); 841 timetag_first_[fib] = paq.TimeTag(); 842 fgfirstfctt=false; 843 } 800 844 if (savesig_) 801 845 header[fib] << hex << paq.HDRMarker() << " " << paq.TRLMarker() << " " … … 821 865 cout << " Fib " << fib << " -> " << fname << " Stat:" << pcsum << endl; 822 866 } 823 if (savesig_) 867 if (savesig_) { 868 // Ajout mots-cle additionnels a tous les fichiers FITS 869 for(uint_4 fib=0; fib<memgr.NbFibres(); fib++) 870 framecnt_last_[fib] = pcheck[fib].LastFrameNum(); 871 872 AddFitsKW(mff,bpar); 824 873 for(uint_4 fib=0; fib<memgr.NbFibres(); fib++) { 825 874 header[fib].close(); 826 875 mff[fib].Close(); 827 876 } 828 877 } 829 878 830 879 } // Fin de boucle sur les fichiers … … 861 910 TimeStamp ts; 862 911 string cdtu=ts.ToString(); 912 string& skysrc=acpar.SkySource(); 913 bool hassrc=false; 914 if (skysrc.length()>0) hassrc=true; 863 915 for(uint_4 fib=0; fib<memgr.NbFibres(); fib++) { 864 916 mff[fib].AddKeyS("DATE", cdtu.c_str(), " File Creation time(YYYY-MM-DDThh:mm:ss UT) "); … … 866 918 mff[fib].AddKeyD("ACQVER", acpar.AcqVersion(), " BAORadio Acq Software version ") ; 867 919 mff[fib].AddKeyS("ACQCONF", acpar.GetParams().AcqMode, " BAORadio Acq run mode" ); 920 if (hassrc) 921 mff[fib].AddKeyS("SKYSOURC", skysrc, " Source identification" ); 922 mff[fib].AddKeyI("FCFIRST", framecnt_first_[fib], " First valid frame counter in file") ; 923 mff[fib].AddKeyI("FCLAST", framecnt_last_[fib], " Last valid frame counter in file") ; 924 mff[fib].AddKeyI("TTFIRST", timetag_first_[fib], " First valid timetag in file") ; 868 925 } 869 926 return 0; -
trunk/AddOn/TAcq/racqurw.h
r3672 r3674 177 177 bool savesig_; // Si false, pas d'ecriture des fichiers FITS du signal 178 178 bool stop_; 179 uint_8 framecnt_first_[MAXNBFIB]; // Numero de framecounter first 180 uint_8 framecnt_last_[MAXNBFIB]; // Numero de framecounter last 181 uint_8 timetag_first_[MAXNBFIB]; // TimeTag first 182 179 183 }; 180 184
Note:
See TracChangeset
for help on using the changeset viewer.