Changeset 3688 in Sophya for trunk/AddOn/TAcq/branap.cc
- Timestamp:
- Nov 29, 2009, 12:13:54 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AddOn/TAcq/branap.cc
r3687 r3688 14 14 outpath_="./"; 15 15 nmean_=nmean; 16 nbloc_=1; 16 17 imin_=imax_=0; 17 18 istep_=1; 19 freqmin_=freqmax_=0; 20 nbinfreq_=1; 18 21 paqsize_=16424; 19 22 nzones_=nzon; 20 23 npaqinzone_=npaqz; 24 prtlevel_=0; 21 25 } 22 26 … … 30 34 int ka=1; 31 35 while (ka<(narg-1)) { 36 cout << " *DBG ka=" << ka << " narg=" << narg << " arg[ka]=" << arg[ka] << endl; 32 37 if (strcmp(arg[ka],"-act")==0) { 33 38 action_=arg[ka+1]; … … 36 41 else if (strcmp(arg[ka],"-out")==0) { 37 42 outpath_=arg[ka+1]; 43 size_t lenp=outpath_.size(); 44 if ((lenp>0)&&(outpath_[lenp-1]!='/')) outpath_+='/'; 38 45 ka+=2; 39 46 } 40 47 else if (strcmp(arg[ka],"-nmean")==0) { 41 48 nmean_=atoi(arg[ka+1]); 49 ka+=2; 50 } 51 else if (strcmp(arg[ka],"-nbloc")==0) { 52 nbloc_=atoi(arg[ka+1]); 53 ka+=2; 54 } 55 else if (strcmp(arg[ka],"-freq")==0) { 56 sscanf(arg[ka+1],"%d,%d,%d",&freqmin_,&freqmax_,&nbinfreq_); 42 57 ka+=2; 43 58 } … … 49 64 ka+=2; 50 65 } 66 else if (strcmp(arg[ka],"-prtlev")==0) { 67 prtlevel_=atoi(arg[ka+1]); 68 ka+=2; 69 } 51 70 else if (strcmp(arg[ka],"-in")==0) { 52 71 if ((narg-ka)<4) { … … 55 74 } 56 75 sscanf(arg[ka+1],"%d,%d,%d",&imin_,&imax_,&istep_); ka+=2; 57 while(ka<(narg- 3)) {76 while(ka<(narg-1)) { 58 77 string inpath = arg[ka]; 59 if (inpath.size()<1) inpath="./"; 60 if (inpath[inpath.size()-1]!='/') inpath[inpath.size()-1]='/'; 78 size_t lenp=inpath.size(); 79 if (lenp<1) inpath="./"; 80 if ((lenp>0)&&(inpath[lenp-1]!='/')) inpath+='/'; 61 81 vector<string> fiblist; 62 82 string sa1 = arg[ka+1]; … … 71 91 okarg=true; 72 92 } 93 else ka++; 73 94 } 95 74 96 if (!okarg) { 75 97 cout << " BRAnaParam::DecodeArgs() / Argument error " << endl; … … 84 106 cout << " --- BRAnaParam : Reading/Processing BAORadio FITS files parameters " << endl; 85 107 cout << " Usage: prgname [-act ACT] [-out OutPath] [-nmean NMean] [-zones NZones,nPaqinZone] \n" 108 << " [-nbloc NBloc] [-freq NumFreqMin,NumFreqMax,NBinFreq] \n" 86 109 << " -in Imin,Imax,Istep InPath FiberList [InPath2 FiberList2 InPath3 FiberList3 ...] \n" << endl; 87 110 if (fgshort) { … … 89 112 return 5; 90 113 } 91 cout << " -act Action: Not YET used\n"114 cout << " -act Action: cube3d or vis \n" 92 115 << " -out OutPath: Output directory name \n" 93 116 << " -nmean NMean: Number of packet used for spectra/visibility computation \n" 117 << " -nbloc NBloc: Number of MemMgr blocs in output file\n" 94 118 << " -zones NZones,NbPaqinZone : Number of Zones and number of paquets in one zone \n" 119 << " -freq NumFreqMin,NumFreqMax,NBinFreq : Frequency zone and number of bins \n" 95 120 << " -in : input files/directory definition : \n" 96 121 << " Imin,Imax,Istep: fits files signalII.fits Imin<=II<=Imax Istep=increment \n" … … 117 142 cout << " IMin= " << imin_ << " IMax= " << imax_ << " IStep= " << istep_ << endl; 118 143 cout << " OutPath= " << outpath_ << endl; 119 cout << " NMean=" << nmean_ << " PaqSize=" << paqsize_ << " - NZones=" << nzones_ 120 << " NPaqZone=" << npaqinzone_ << endl; 144 cout << " Action=" << action_ << " NMean=" << nmean_ << " NBloc=" << nbloc_ << endl; 145 cout << " FreqMin= " << freqmin_ << " FreqMax= " << freqmax_ << " NBinFreq= " << nbinfreq_ << endl; 146 cout << " PaqSize=" << paqsize_ << " - NZones=" << nzones_ << " NPaqZone=" << npaqinzone_ 147 << " PrtLevel=" << prtlevel_ << endl; 121 148 return os; 122 149 }
Note:
See TracChangeset
for help on using the changeset viewer.