Changeset 3909 in Sophya for trunk/AddOn/TAcq/brparam.cc


Ignore:
Timestamp:
Nov 21, 2010, 2:26:12 PM (15 years ago)
Author:
ansari
Message:

1/ Mise en place d'informations auxiliaires au niveau de RAcqMemZoneMgr ,

FillTime (DATEOBS) pour chaque zone et identificateur des fibres

2/ remplissage de FillTime(DATEOBS) Et FiberId's de MemZoneMgr par

les classes PCIEMultiReader et EthernetReader

3/ Ajout de mots-cle (ds les datacards) pour numeros d'identification des

fibres et parametres de controles du DMA (@fiberids @waitenddma)
et corrections/ameliorations des modes acq (raw1c ordfft2c ...)

4/ Parametrage des WaitEndDMA ds PCIEWrapperInterface et implementation

au niveau de DMAMgrV6 (dmamgrv6.h .cc)

5/ Gestion d'echec DMA -> arret acquisition ds PCIEMultiReader,EthernetReader

modification TimeOut DMA entre le premier DMA et les suivants pour permettre
un arret propre rapide

6/ Adaptation de la classe BRVisibilityCalculator pour utilisation

FillTime (DATEOBS) et FiberIds de MemZoneMgr - amelioration de
l'identification des numeros de canaux pour les matrices de visibilites

7/ Petites ameliorations (ecriture mot-cles) pour MultiDataSaver et

amelioration classe BRMultiFitsReader pour lecture FillTime (DATEOBS)
et FiberIds depuis les fichiers FITS et remplissage de RAcqMemZoneMgr

Reza, 21/11/2010

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/AddOn/TAcq/brparam.cc

    r3901 r3909  
    9898
    9999// Classe qui memorise tous les parametres importants de l'acquisition
     100#define PMAXNBFIBRES 64
    100101
    101102/* --Methode-- */
     
    109110
    110111  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
    113114  PaqSize=paqsz;
     115
    114116  dmasizekb=dmaszkb;
     117  maxkwedma_=1000;
     118  nretrydma_=3;
     119  first_maxkwedma_=20000;
     120  first_nretrydma_=9;
    115121
    116122  NbFiles=nfiles;
     
    181187
    182188  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;
    185192
    186193  PaqSize=p.PaqSize;
     194
    187195  dmasizekb=p.dmasizekb;
     196  maxkwedma_=p.maxkwedma_;
     197  nretrydma_=p.nretrydma_;
     198  first_maxkwedma_=p.first_maxkwedma_;
     199  first_nretrydma_=p.first_nretrydma_;
    188200
    189201  NbFiles=p.NbFiles;
     
    237249{
    238250  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
    240258  OutPathName= conf.SParam("outpathname",0,"TstAcq");
    241259  skysource= conf.SParam("skysource",0,"");
    242260  PaqSize=(uint_4)conf.IParam("paqsize",0,16424);
     261
    243262  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
    244268  NbFiles=conf.IParam("nbfiles",0,1);
    245269  NBlocPerFile=conf.IParam("nblocperfile",0,10);
     
    303327  vector<string> fiblist;
    304328  FillVStringFrString(FiberListS, fiblist, ',');
    305   NbFibers=fiblist.size();
    306329  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
    309338  if (OutPathName == "/dev/null") {
    310339    fgnulldev4fits=true;
     
    318347  fgdatafft=false;  fgsinglechannel=false;
    319348  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 ; 
    321353  if (acqmode == "nosw")   swapall = BR_Copy ;
    322354  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
    325358  if (acqmode == "fft1cnof") 
    326359    { swapall = BR_FFTOneChan;  savesigfits = false; reducneedcopy=true;  pqreducmode=BR_OneChanReducK0;  }
     
    379412  os << " ------ BRParList::Print() ----- " << endl;
    380413  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;
    381418  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;
    383421  os << " AcqMode="<<AcqMode;
    384422  os << " Type of acquisition :" << BRPaquet::FmtConvToString( swapall) << endl;
Note: See TracChangeset for help on using the changeset viewer.