Index: /trunk/AddOn/TAcq/brparam.cc
===================================================================
--- /trunk/AddOn/TAcq/brparam.cc	(revision 3671)
+++ /trunk/AddOn/TAcq/brparam.cc	(revision 3672)
@@ -3,4 +3,83 @@
 #include "bracqvers.h"
 
+/* --Methode-- */
+ADCBoardDesc::ADCBoardDesc(int id, string sbid, string cyc_firmw, string str1_firmw, string str2_firmw)
+  : id_(id), sbid_(sbid), cyclone_firmware_(cyc_firmw), stratix1_firmware_(str1_firmw), stratix2_firmware_(str2_firmw)
+{
+  
+}
+
+/* --Methode-- */
+ADCBoardDesc::ADCBoardDesc(ADCBoardDesc const& bdes)
+  : id_(bdes.id_), sbid_(bdes.sbid_), cyclone_firmware_(bdes.cyclone_firmware_), 
+    stratix1_firmware_(bdes.stratix1_firmware_), stratix2_firmware_(bdes.stratix2_firmware_)
+{
+}
+
+/* --Methode-- */
+ADCBoardDesc& ADCBoardDesc::Set(ADCBoardDesc const & bdes)
+{
+  id_ = bdes.id_;
+  sbid_ = bdes.sbid_;
+  cyclone_firmware_ = bdes.cyclone_firmware_;
+  stratix1_firmware_ = bdes.stratix1_firmware_;
+  stratix2_firmware_ = bdes.stratix2_firmware_;
+  return(*this);
+}
+
+/* --Methode-- */
+ostream& ADCBoardDesc::Print(ostream& os)
+{
+  os << "ADCBoard#" << id_ << "(" << sbid_ << ") Cyclone:" << cyclone_firmware_ 
+     << " Stratix1: " << stratix1_firmware_ << " Stratix2: " << stratix2_firmware_ << endl;
+  return os;
+}
+
+/* --Methode-- */
+BRConfList::BRConfList()
+  : basedir_("./")
+{
+}
+
+/* --Methode-- */
+BRConfList::BRConfList(string basedir)
+  : basedir_(basedir)
+{
+}
+
+/* --Methode-- */
+BRConfList::BRConfList(string basedir, vector<ADCBoardDesc> boards)
+  : basedir_(basedir), boards_(boards)
+{
+  size_t len = basedir_.length();
+  if ((len>1)&&(basedir_[len-1]!='/')) basedir_ += '/';
+}
+
+/* --Methode-- */
+BRConfList::BRConfList(BRConfList const & cf)
+  : basedir_(cf.basedir_), boards_(cf.boards_)
+{
+}
+
+/* --Methode-- */
+void BRConfList::Set(BRConfList const & cf)
+{
+  basedir_=cf.basedir_;
+  boards_=cf.boards_;
+}
+
+/* --Methode-- */
+ostream& BRConfList::Print(ostream& os)
+{
+  os << " ----- BRConfList:: BaseDir:" << basedir_ << " NBoards= " << boards_.size() << endl;
+  for(size_t k=0; k<boards_.size(); k++)  boards_[k].Print(os);
+  return os;
+}
+
+/* --Methode-- */
+void BRConfList::ReadDCFile(string file)
+{
+  //  A FAIRE 
+}
 
 // Classe qui memorise tous les parametres importants de l'acquisition
@@ -27,6 +106,4 @@
   fgnulldev4fits=false;
   fg_hard_ctrlc=fgcntlc;
-  fgnulldev4fits = (OutPathName == "/dev/null") ? true : false;
-
   fgreducpsize=false;
   redpqsize=PaqSize;
@@ -102,4 +179,12 @@
   for (int fib=0; fib<fiblist.size(); fib++) {
     FiberNum[fib]=atoi(fiblist[fib].c_str()); 
+  }
+  if (OutPathName == "/dev/null") { 
+    fgnulldev4fits=true;
+  }
+  else { 
+    size_t len = OutPathName.length();
+    if ((len>1)&&(OutPathName[len-1]!='/')) OutPathName+='/';
+    fgnulldev4fits=false;
   }
   string acqmode = AcqMode;
@@ -159,5 +244,8 @@
 
 
+//-------------------- Classe BRAcqConfig -----------------------
+
 BRParList* BRAcqConfig::param_=NULL;
+BRConfList* BRAcqConfig::config_=NULL;
 
 /* --Methode-- */
@@ -165,4 +253,14 @@
 {
   if (param_==NULL)  param_ = new BRParList;  
+  if (config_==NULL) config_ = new BRConfList;
+}
+
+/* --Methode-- */
+ostream& BRAcqConfig::Print(ostream& os)
+{ 
+  os << " ------------  BAORadio Acq Run/Configuration -------- " << endl;
+  config_->Print(os);
+  param_->Print(os); 
+  os << " ----------------------------------------------------- " << endl;
 }
 
@@ -170,20 +268,20 @@
 int BRAcqConfig::CreateOutputDirectories()
 {
-  char cmd[512];
+  char cmd[1024];
   if (param_->fgnulldev4fits!=true) {
-    sprintf(cmd,"mkdir %s",param_->OutPathName.c_str());
+    sprintf(cmd,"mkdir %s%s",config_->BaseDirectory().c_str(), param_->OutPathName.c_str());
     if (system(cmd) < 0) {
-      cout << "CreateOutputDirectories()/Error: Can not create  subdirectory " 
-	   << param_->OutPathName << " -> stop" << endl;
+      cout << "CreateOutputDirectories()/Error: Can not create subdirectory " 
+	   << cmd << " -> stop" << endl;
       return 2;
     }
     cout << "CreateOutputDirectories() - Executed command " << cmd << endl;
     
-    memset(cmd,0,512); 
+    memset(cmd,0,1024); 
     for (int  i= 0; i< NFibers() ; i++)  {
-      sprintf(cmd,"mkdir %s/Fibre%d",param_->OutPathName.c_str(),param_->FiberNum[i]);
+      sprintf(cmd,"mkdir %s%s/Fiber%d",config_->BaseDirectory().c_str(), param_->OutPathName.c_str(),param_->FiberNum[i]);
       if (system(cmd) < 0) {
 	cout << "CreateOutputDirectories()/Error: Can not create subdirectory " 
-	     << param_->OutPathName << "/FiberII -> stop" << endl;
+	     << cmd << " -> stop" << endl;
 	return 3;
       }
@@ -202,11 +300,4 @@
     }
     else cout << "CreateOutputDirectories() - Executed command " << cmd << endl;
-
-    sprintf(cmd,"mkdir %s/Fibre1 %s/Fibre2",ProcPathName.c_str(),ProcPathName.c_str());
-    if (system(cmd) < 0) {
-      cout << "CreateOutputDirectories()/Error: Can not create subdirectory ./XZXZXZX/Fibre1,2" 
-	   << "-> stop" << endl;
-      return 4;
-    }
   }
   return 0;
@@ -217,5 +308,5 @@
 {
   char buff[24];
-  sprintf(buff,"/Fiber%d",param_->FiberNum[ifib]);
-  return ( param_->OutPathName + buff );
-}
+  sprintf(buff,"Fiber%d/",param_->FiberNum[ifib]);
+  return ( config_->BaseDirectory() + param_->OutPathName + buff );
+}
Index: /trunk/AddOn/TAcq/brparam.h
===================================================================
--- /trunk/AddOn/TAcq/brparam.h	(revision 3671)
+++ /trunk/AddOn/TAcq/brparam.h	(revision 3672)
@@ -8,9 +8,10 @@
 
 //---------------------------------------------------------------
-//  Classes BRParList , BRConfList , BRAcqConfig 
-//  BRParList : Liste de parametres pour un run d'acquisition 
-//  BRConfList : Liste des parametres caracterisant une configuration 
+//  Classes ADCBoardDesc , BRParList , BRConfList , BRAcqConfig 
+//  + ADCBoardDesc : Description d'une carte ADC
+//  + BRParList : Liste de parametres pour un run d'acquisition 
+//  + BRConfList : Liste des parametres caracterisant une configuration 
 //       (nombre de cartes, versions firwares ...) 
-//  BRAcqConfig : Classe donnant acces a un objet global BRParList et 
+//  + BRAcqConfig : Classe donnant acces a un objet global BRParList et 
 //         un objet global BRConfList
 //---------------------------------------------------------------
@@ -18,4 +19,6 @@
 #include "machdefs.h"
 #include <string>
+#include <vector>
+#include <iostream>
 #include "brpaqu.h"
 #include "datacards.h"
@@ -24,4 +27,45 @@
 using namespace std;
 using namespace SOPHYA;
+
+//-----------------------------------------------------------------------------
+//---- Classe Caracterisant un board ADC 
+class ADCBoardDesc {
+public:
+  ADCBoardDesc(int id, string sbid, string cyc_firmw, string str1_firmw, string str2_firmw);
+  ADCBoardDesc(ADCBoardDesc const& bdes);
+
+  inline int& getId() { return id_; } 
+  inline string& getSId() { return sbid_; }
+  inline string& CycloneFirmwareId() { return cyclone_firmware_; }
+  inline string& Stratix1FirmwareId() { return stratix1_firmware_; }
+  inline string& Stratix2FirmwareId() { return stratix2_firmware_; }
+  ostream& Print(ostream& os);
+
+  ADCBoardDesc& Set(ADCBoardDesc const & bdes);
+  inline ADCBoardDesc& operator = (ADCBoardDesc const & bdes) { return Set(bdes); }
+protected:
+  int id_;
+  string sbid_;
+  string cyclone_firmware_;
+  string stratix1_firmware_;
+  string stratix2_firmware_;  
+};
+
+//-----------------------------------------------------------------------------
+//---- Classe de liste des parametres de configuration BAORadio
+class BRConfList {
+public:
+  BRConfList();
+  BRConfList(string basedir);
+  BRConfList(string basedir, vector<ADCBoardDesc> boards);
+  BRConfList(BRConfList const & cf);
+  void Set(BRConfList const & cf);
+  ostream& Print(ostream& os) ;
+  void ReadDCFile(string file);
+  inline string& BaseDirectory() { return basedir_; }
+//.......................................
+  string basedir_;
+  vector<ADCBoardDesc> boards_;
+};
 
 #define PMAXNBFIBRES 6
@@ -110,10 +154,14 @@
   BRAcqConfig();
 
-  inline void ReadDCFile(string file) 
+  inline void ReadParamFile(string file) 
     { param_->ReadDCFile(file); }
   inline void Set(BRParList& par)
     { param_->Set(par); }
-  inline ostream& Print(ostream& os) 
-    { return param_->Print(os); }
+  inline void ReadConfigFile(string file) 
+    { config_->ReadDCFile(file); }
+  inline void Set(BRConfList& conf)
+    { config_->Set(conf); }
+
+  ostream& Print(ostream& os);
 
   int CreateOutputDirectories();
@@ -121,6 +169,8 @@
   static inline double AcqVersion()  { return BAOR_ACQ_VER ; }
   static inline const char* AcqVersionS() { return BAOR_ACQ_VER_STR ; } 
- 
+
   inline BRParList&  GetParams() { return (*param_) ;};
+  inline BRConfList&  GetConfig() { return (*config_) ;};
+  
   inline BRDataFmtConv GetSwapall() { return param_->swapall; };
   inline bool GetPattern() { return param_->activate_pattern; };
@@ -150,9 +200,10 @@
 
   // repertoire d'acquisition 
-  inline string& OutputDirectory() { param_->OutPathName; }
+  inline string OutputDirectory() { return (config_->BaseDirectory()+param_->OutPathName); }
   string OutputDirectoryFib(int fib);
 
  protected:
   static BRParList* param_;
+  static BRConfList* config_;
 };
 
Index: /trunk/AddOn/TAcq/mfacq.cc
===================================================================
--- /trunk/AddOn/TAcq/mfacq.cc	(revision 3671)
+++ /trunk/AddOn/TAcq/mfacq.cc	(revision 3672)
@@ -49,5 +49,11 @@
     // Creation/initialisation parametres Acq
     BRAcqConfig acpar;
-    acpar.ReadDCFile(arg[1]);
+    acpar.ReadParamFile(arg[1]);
+#ifndef NOPCIECARD  
+    BRConfList conf("/Raid"); 
+#else
+    BRConfList conf("./"); 
+#endif
+    acpar.Set(conf);
     // Creation des repertoires 
     if (acpar.CreateOutputDirectories()!=0)  return 9;
@@ -139,6 +145,5 @@
 
   cout <<"mfacq[3] Creating DataSaver and DataProc2C objects ... " << endl;
-  MultiDataSaver DsThr(mmgr, bpar.OutputDirectory(), bpar.MaxNbFiles(), 
-		       bpar.BlocPerFile(), bpar.GetSaveFits());
+  MultiDataSaver DsThr(mmgr);   //   Utilise les parametres globaux BRAcqConfig
   string ppath=bpar.OutputDirectory();
   DataProc2C PrThr(mmgr, ppath, 1280, stepproc, acpar.NMaxProc);
@@ -146,6 +151,5 @@
   for  (int i=0 ;i<bpar.NFibers();i++)  vec_pciw.push_back( pciwp[i]);
   cout << "mfacq[3] Creating   PCIEMultiReader       " << endl;
-  PCIEMultiReader PcierThr(vec_pciw,bpar.DMASizeBytes(),bpar.RecvPaquetSize(),
-			   mmgr, bpar.MaxNbBlocs(), bpar.GetDataConvFg());
+  PCIEMultiReader PcierThr(vec_pciw, mmgr, bpar.GetParams());
   usleep(200);  // attente au cas ou ...
   pPcierThr=&PcierThr;
Index: /trunk/AddOn/TAcq/racqurw.cc
===================================================================
--- /trunk/AddOn/TAcq/racqurw.cc	(revision 3671)
+++ /trunk/AddOn/TAcq/racqurw.cc	(revision 3672)
@@ -332,6 +332,6 @@
 //----------------------------------------------------------------------------------------------------------
 
-PCIEReaderChecker::PCIEReaderChecker(PCIEWrapperInterface &pciw,uint_4 sizeFrame,uint_4 packSize ,RAcqMemZoneMgr& mem, 
-				     uint_4 nmax, BRDataFmtConv swapall)
+PCIEReaderChecker::PCIEReaderChecker(PCIEWrapperInterface &pciw, uint_4 sizeFrame,uint_4 packSize, RAcqMemZoneMgr& mem, 
+				     uint_4 nmax, BRDataFmtConv swapall) 
   :   memgr(mem) , pciw_ (pciw)
 {
@@ -464,13 +464,13 @@
 
 /* --Methode-- */
-PCIEMultiReader::PCIEMultiReader(vector<PCIEWrapperInterface*> vec_pciw,uint_4 sizeFrame,uint_4 packSize ,RAcqMemZoneMgr& mem, uint_4 nmax, BRDataFmtConv swapall)
-  :   memgr(mem) , vec_pciw_ (vec_pciw)
-{
-  nmax_ = nmax;	
-  swapall_ = swapall;  	// select data swap/format conversion for BRPaquet
+PCIEMultiReader::PCIEMultiReader(vector<PCIEWrapperInterface*> vec_pciw, RAcqMemZoneMgr& mem, BRParList const& par)
+  :   memgr(mem), par_(par), vec_pciw_ (vec_pciw)
+{
+  nmax_ = par_.MaxNbBlocs();	
+  swapall_ = par_.GetDataConvFg();  	// select data swap/format conversion for BRPaquet
   stop_ = false;
-  packSize_ = packSize;
+  packSize_ = par_.RecvPaquetSize();
   packSizeInMgr_=memgr.PaqSize();
-  sizeFr_ =sizeFrame;
+  sizeFr_=par_.DMASizeBytes();
   if (vec_pciw.size() != memgr.NbFibres()) {
     cout << " PCIEMultiReader()PbArgs: vec_pciw.size()= " << vec_pciw.size() << " memgr.NbFibres()=" <<memgr.NbFibres()<< endl;
@@ -688,20 +688,24 @@
 //--------------------------------------------------------------------
 
-MultiDataSaver::MultiDataSaver(RAcqMemZoneMgr& mem, string path, uint_4 nfiles, uint_4 nblocperfile, bool savesig)
+/* --Methode-- */
+MultiDataSaver::MultiDataSaver(RAcqMemZoneMgr& mem)
   :  memgr(mem)
-{
-  nfiles_ = nfiles;
-  nblocperfile_ = nblocperfile;
+{  
+  BRAcqConfig bpar;
+  nfiles_ = bpar.MaxNbFiles();
+  nblocperfile_ = bpar.BlocPerFile();
   nmax_ = nblocperfile_*nfiles_;
-  savesig_ = savesig;  // Si false, pas d'ecriture des fichiers FITS du signal	
+  savesig_ = bpar.GetSaveFits();  // Si false, pas d'ecriture des fichiers FITS du signal	
   stop_ = false;	
-  path_ = path;	
-}
+}
+
+/* --Methode-- */
 void MultiDataSaver::Stop()
 {
   // cout<< " MultiDataSaver:Stop ........ " << endl;
   stop_=true;
-
-}
+}
+
+/* --Methode-- */
 void MultiDataSaver::run()
 {
@@ -715,5 +719,5 @@
     char fname[512];
 
-    sprintf(fname,"%s/msaver.log",path_.c_str());
+    sprintf(fname,"%s/msaver.log",bpar.OutputDirectory().c_str());
     ofstream filog(fname);
     filog << " MultiDataSaver::run() - starting log file " << ts << " NFibres= " << memgr.NbFibres() << endl;		       
@@ -727,6 +731,6 @@
     uint_4 paqsz = memgr.PaqSize();
     cout << " ============================ MultiDataSaver::run() PaqSize " << paqsz <<endl;
-    bool fgnulldev = false;
-    if (path_ == "/dev/null") { 
+    bool fgnulldev = bpar.GetFileDevNull(); 
+    if (fgnulldev) { 
       cout << " MultiDataSaver::run()/Warning /dev/null path specified, filenames=/dev/null" << endl;
       fgnulldev = true;
@@ -740,5 +744,5 @@
 	for(uint_4 fib=0; fib<memgr.NbFibres(); fib++) {
 	  if (fgnulldev) strcpy(fname,"/dev/null");
-	  else sprintf(fname,"%s/Fibre%d/HDRfits%d.txt",path_.c_str(),fib+1,fnum);
+	  else sprintf(fname,"%sHDRfits%d.txt",bpar.OutputDirectoryFib(fib).c_str(),fnum);
 	  header[fib].open(fname);
 	}
@@ -749,5 +753,6 @@
         for(uint_4 fib=0; fib<memgr.NbFibres(); fib++) 	  {
 	  if (fgnulldev) strcpy(fname,"/dev/null");
-	  else sprintf(fname,"%s/Fibre%d/signal%d.fits",path_.c_str(),fib+1,(int)fnum);
+	  else sprintf(fname,"%ssignal%d.fits",bpar.OutputDirectoryFib(fib).c_str(),(int)fnum);
+	  //	  cout << " ***DBG** Opening file " << fname << endl;
 	  mff[fib].Open(fname,MF_Write);  //Reza - Ouverture conditionnel fichier 
 	  // Entete correspondant a l'ecriture tout le paquet - trailer compris (modif Mai 2009)
@@ -797,5 +802,5 @@
 	if (savesig_) {
 	  if (fgnulldev) strcpy(fname,"/dev/null");
-	  else sprintf(fname,"%s/Fibre%d/signal%d.fits",path_.c_str(),fib+1,(int)fnum-1);
+	  else sprintf(fname,"%ssignal%d.fits",bpar.OutputDirectoryFib(fib).c_str(),(int)fnum);
 	}
 	else sprintf(fname,"MemDataBloc[%d]-NoDataFile",(int)fnum-1);
Index: /trunk/AddOn/TAcq/racqurw.h
===================================================================
--- /trunk/AddOn/TAcq/racqurw.h	(revision 3671)
+++ /trunk/AddOn/TAcq/racqurw.h	(revision 3672)
@@ -114,6 +114,5 @@
 class PCIEMultiReader : public ZThread {
 public:
-  PCIEMultiReader( vector<PCIEWrapperInterface*> vec_pciw , uint_4 sizeFrame,uint_4 paqSize, RAcqMemZoneMgr& mem, 
-		   uint_4 nmax=100, BRDataFmtConv swapall=BR_SwapAll);  
+  PCIEMultiReader(vector<PCIEWrapperInterface*> vec_pciw , RAcqMemZoneMgr& mem, BRParList const& par);
   virtual void run(); 
    void Stop();
@@ -134,6 +133,8 @@
   }
   bool MZoneManage(bool clean=false);  // Renvoie true si probleme
+  
+  RAcqMemZoneMgr& memgr;
+  BRParList par_;   // Parametres divers d'acquisition 
 
-  RAcqMemZoneMgr& memgr;
   uint_4 nmax_;  // Nombre maxi de blocs MemZone traites
   BRDataFmtConv swapall_;  // select data swap/format conversion for BRPaquet
@@ -158,7 +159,8 @@
 //----------------------------------------------------------------------------------------
 
+// --- Cette classe utilise les parametres globaux d'acquisition BRAcqConfig
 class MultiDataSaver : public ZThread {
 public:	
-  MultiDataSaver(RAcqMemZoneMgr& mem, string path, uint_4 nfiles=100, uint_4 nblocperfile=1, bool savesig=true);
+  MultiDataSaver(RAcqMemZoneMgr& mem);
 
   virtual void run(); 
@@ -169,4 +171,5 @@
 
   RAcqMemZoneMgr& memgr;
+
   uint_4 nfiles_;  // Nombre maxi de fichiers cree
   uint_4 nblocperfile_;  // Nombre de bloc (zone memoire) mis dans un fichier
@@ -174,6 +177,4 @@
   bool savesig_; // Si false, pas d'ecriture des fichiers FITS du signal 
   bool stop_;  
-  string path_;  
-  struct sigaction act;
 };
 
