Changeset 3681 in Sophya for trunk/AddOn/TAcq/brparam.cc
- Timestamp:
- Nov 20, 2009, 12:46:54 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AddOn/TAcq/brparam.cc
r3674 r3681 94 94 95 95 /* --Methode-- */ 96 BRParList::BRParList(string fibres,unsigned int paqsz ,unsigned int dmaszkb, 97 int nfiles, string acqmod,int nblocfile,int nmxproc , 98 string outpath, uint_4 nzon , uint_4 npaqzon, bool fgcntlc) 99 { 96 BRParList::BRParList(string acqmod, string fibres,unsigned int paqsz, 97 unsigned int dmaszkb, int nfiles, int nblocfile, 98 string outpath, uint_4 nzon , uint_4 npaqzon) 99 { 100 AcqMode=acqmod; 101 fgdatafft=false; 102 fgsinglechannel=false; 103 100 104 FiberListS=fibres; 101 105 NbFibers=0; … … 103 107 PaqSize=paqsz; 104 108 dmasizekb=dmaszkb; 109 105 110 NbFiles=nfiles; 106 AcqMode=acqmod;107 111 NBlocPerFile=nblocfile; 108 NMaxProc=nmxproc;109 112 OutPathName=outpath; 113 110 114 nZones=nzon; 111 115 nPaqZone=npaqzon; 116 112 117 swapall=BR_Copy; 113 118 savesigfits=true; 114 119 fgnulldev4fits=false; 115 120 116 fg_hard_ctrlc=f gcntlc;121 fg_hard_ctrlc=false; 117 122 118 123 fgreducpsize=false; … … 123 128 124 129 skysource=""; 130 131 fgdoProc=false; 132 nmeanProc=512; 133 stepProc=5; 134 nmaxProc=0; 135 125 136 monothr=false; 126 137 activate_pattern=false; 138 nopciLossRate=0.; 127 139 128 140 Decode(); // On decode et on complete les parametres … … 138 150 void BRParList::Set(BRParList const & p) 139 151 { 152 AcqMode=p.AcqMode; 153 fgdatafft=p.fgdatafft; 154 fgsinglechannel=p.fgsinglechannel; 155 140 156 FiberListS=p.FiberListS; 141 157 NbFibers=p.NbFibers; 142 158 for (int fib=0; fib<PMAXNBFIBRES;fib++) FiberNum[fib]=p.FiberNum[fib]; 159 143 160 PaqSize=p.PaqSize; 144 161 dmasizekb=p.dmasizekb; 162 145 163 NbFiles=p.NbFiles; 146 AcqMode=p.AcqMode;147 164 NBlocPerFile=p.NBlocPerFile; 148 NMaxProc=p.NMaxProc;149 165 OutPathName=p.OutPathName; 166 150 167 nZones=p.nZones; 151 168 nPaqZone=p.nPaqZone; 169 152 170 swapall=p.swapall; 153 171 savesigfits=p.savesigfits; … … 163 181 164 182 skysource=p.skysource; 183 184 fgdoProc=p.fgdoProc; 185 nmeanProc=p.nmeanProc; 186 stepProc=p.stepProc; 187 nmaxProc=p.nmaxProc; 165 188 166 189 monothr=p.monothr; 167 190 activate_pattern=p.activate_pattern; 191 192 nopciLossRate=p.nopciLossRate; 168 193 return; 169 194 } … … 188 213 reducoffset=(uint_4)conf.IParam("reducpaqsz",1,0); 189 214 } 190 NMaxProc=conf.IParam("monitor",0,0); 215 if (conf.HasKey("monitor")) { 216 fgdoProc=true; 217 nmeanProc=conf.IParam("monitor",0,512); 218 stepProc=conf.IParam("monitor",1,10); 219 nmaxProc=conf.IParam("monitor",2,0); 220 } 221 nopciLossRate=conf.DParam("nopcilossrate",0,0.); 222 191 223 fg_hard_ctrlc=conf.HasKey("hard_ctrlc"); 192 224 if (conf.HasKey("nosavesigfits")) savesigfits=false; 193 225 Decode(); 194 226 } … … 212 244 } 213 245 string acqmode = AcqMode; 246 fgdatafft=false; fgsinglechannel=false; 214 247 reducneedcopy=false; pqreducmode=BR_TwoChanReduc; 215 if ( acqmode == "std") swapall = BR_Copy ;248 if ((acqmode == "std")||(acqmode=="raw2c")) swapall = BR_Copy ; 216 249 if (acqmode == "nosw") swapall = BR_Copy ; 217 250 if (acqmode == "nof") { swapall = BR_Copy ; savesigfits = false; } … … 254 287 { swapall = BR_FFTTwoChanSwap32; savesigfits = false; reducneedcopy=true; pqreducmode=BR_TwoChanReducK0; } 255 288 289 if ((swapall==BR_FFTTwoChan)||(swapall==BR_FFTTwoChanSwapAll)||(swapall==BR_FFTTwoChanSwap32)) { 290 fgdatafft=true; 291 } 292 if ((swapall==BR_FFTOneChan)||(swapall==BR_FFTOneChanSwapAll)||(swapall==BR_FFTOneChanSwap32)) { 293 fgdatafft=true; fgsinglechannel=true; 294 } 295 256 296 if (fgreducpsize) { 257 297 if (redpqsize>=PaqSize) fgreducpsize=false; … … 280 320 os << " PaquetSize Reduction, ReducedSize=" << redpqsize << " Offset=" << reducoffset << endl; 281 321 } 322 if (fgdoProc>0) 323 os << " Monitoring NMeanProc=" << nmeanProc << " StepProc=" << stepProc << " NMaxProc=" << nmaxProc << endl; 324 else os << " No monotoring thread " << endl; 282 325 os << " fg_hard_ctrlc=" << ((fg_hard_ctrlc)?"true":"false"); 283 326 os << " Save to fits " << ((savesigfits)?"true":"false") << endl;
Note:
See TracChangeset
for help on using the changeset viewer.