Changeset 3909 in Sophya for trunk/AddOn/TAcq/brparam.cc
- Timestamp:
- Nov 21, 2010, 2:26:12 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AddOn/TAcq/brparam.cc
r3901 r3909 98 98 99 99 // Classe qui memorise tous les parametres importants de l'acquisition 100 #define PMAXNBFIBRES 64 100 101 101 102 /* --Methode-- */ … … 109 110 110 111 FiberListS=fibres; 111 NbFibers=0;112 for (int fib=0; fib<PMAXNBFIBRES;fib++) FiberNum[fib]=0; 112 FiberIdsS="1,2,3,4,5,6,7,8"; 113 113 114 PaqSize=paqsz; 115 114 116 dmasizekb=dmaszkb; 117 maxkwedma_=1000; 118 nretrydma_=3; 119 first_maxkwedma_=20000; 120 first_nretrydma_=9; 115 121 116 122 NbFiles=nfiles; … … 181 187 182 188 FiberListS=p.FiberListS; 183 NbFibers=p.NbFibers; 184 for (int fib=0; fib<PMAXNBFIBRES;fib++) FiberNum[fib]=p.FiberNum[fib]; 189 FiberNum=p.FiberNum; 190 FiberIdsS=p.FiberIdsS; 191 FiberIds=p.FiberIds; 185 192 186 193 PaqSize=p.PaqSize; 194 187 195 dmasizekb=p.dmasizekb; 196 maxkwedma_=p.maxkwedma_; 197 nretrydma_=p.nretrydma_; 198 first_maxkwedma_=p.first_maxkwedma_; 199 first_nretrydma_=p.first_nretrydma_; 188 200 189 201 NbFiles=p.NbFiles; … … 237 249 { 238 250 DataCards conf(file); 239 FiberListS= conf.SParam("fibres",0,"1"); 251 if(conf.HasKey("fibres")) 252 FiberListS= conf.SParam("fibres",0,"1"); 253 else if(conf.HasKey("fibers")) 254 FiberListS= conf.SParam("fibers",0,"1"); 255 if(conf.HasKey("fiberids")) 256 FiberIdsS= conf.SParam("fiberids",0,"1"); 257 240 258 OutPathName= conf.SParam("outpathname",0,"TstAcq"); 241 259 skysource= conf.SParam("skysource",0,""); 242 260 PaqSize=(uint_4)conf.IParam("paqsize",0,16424); 261 243 262 dmasizekb =(uint_4) conf.IParam("dmasizekb",0,32); 263 maxkwedma_=(unsigned int)conf.IParam("waitenddma",0,1000); 264 nretrydma_=(unsigned int)conf.IParam("waitenddma",1,3); 265 first_maxkwedma_=(unsigned int)conf.IParam("waitenddma",2,20*maxkwedma_); 266 first_nretrydma_=(unsigned int)conf.IParam("waitenddma",3,3*nretrydma_); 267 244 268 NbFiles=conf.IParam("nbfiles",0,1); 245 269 NBlocPerFile=conf.IParam("nblocperfile",0,10); … … 303 327 vector<string> fiblist; 304 328 FillVStringFrString(FiberListS, fiblist, ','); 305 NbFibers=fiblist.size();306 329 for (int fib=0; fib<fiblist.size(); fib++) { 307 FiberNum[fib]=atoi(fiblist[fib].c_str()); 308 } 330 FiberNum.push_back(atoi(fiblist[fib].c_str())); 331 } 332 vector<string> fibids; 333 FillVStringFrString(FiberIdsS, fibids, ','); 334 for (int fib=0; fib<fibids.size(); fib++) { 335 FiberIds.push_back(atoi(fibids[fib].c_str())); 336 } 337 309 338 if (OutPathName == "/dev/null") { 310 339 fgnulldev4fits=true; … … 318 347 fgdatafft=false; fgsinglechannel=false; 319 348 reducneedcopy=false; pqreducmode=BR_TwoChanReduc; 320 if ((acqmode == "std")||(acqmode=="raw2c")) swapall = BR_Copy ; 349 if ((acqmode == "std")||(acqmode=="raw2c")) swapall = BR_Copy ; 350 if (acqmode=="raw1c") { swapall = BR_Copy ; fgsinglechannel=true; pqreducmode=BR_OneChanReduc; } 351 352 if ((acqmode == "fft2c")||(acqmode == "fft1c")) swapall = BR_Copy ; 321 353 if (acqmode == "nosw") swapall = BR_Copy ; 322 354 if (acqmode == "nof") { swapall = BR_Copy ; savesigfits = false; } 323 if (acqmode == "fft1c") { swapall = BR_FFTOneChan; reducneedcopy=true; pqreducmode=BR_OneChanReducK0; } 324 if (acqmode == "fft2c") { swapall = BR_FFTTwoChan; reducneedcopy=true; pqreducmode=BR_TwoChanReducK0; } 355 if (acqmode == "ordfft1c") { swapall = BR_FFTOneChan; reducneedcopy=true; pqreducmode=BR_OneChanReducK0; } 356 if (acqmode == "ordfft2c") { swapall = BR_FFTTwoChan; reducneedcopy=true; pqreducmode=BR_TwoChanReducK0; } 357 325 358 if (acqmode == "fft1cnof") 326 359 { swapall = BR_FFTOneChan; savesigfits = false; reducneedcopy=true; pqreducmode=BR_OneChanReducK0; } … … 379 412 os << " ------ BRParList::Print() ----- " << endl; 380 413 os << " FiberListS=" << FiberListS ; 414 os << " FiberIdsS=" << FiberIdsS ; 415 os << " Fibers (Num->Id): "; 416 for(size_t f=0; f<NbFibers(); f++) cout << FiberNum[f] << " -> " << FiberIds[f] << " ; " ; 417 os << endl; 381 418 os << " PaqSize=" <<PaqSize; 382 os << " DMA_Size_kb=" <<dmasizekb << endl; 419 os << " DMA_Size_kb=" <<dmasizekb << " (EndDMA: Maxkw=" << maxkwedma_ << " NRetry=" << nretrydma_ 420 << " FirstDMA: Maxkw=" << first_maxkwedma_ << " NRetry=" << first_nretrydma_ << ")" << endl; 383 421 os << " AcqMode="<<AcqMode; 384 422 os << " Type of acquisition :" << BRPaquet::FmtConvToString( swapall) << endl;
Note:
See TracChangeset
for help on using the changeset viewer.