[3671] | 1 | #include "brparam.h"
|
---|
| 2 | #include "strutilxx.h"
|
---|
| 3 | #include "bracqvers.h"
|
---|
| 4 |
|
---|
[3672] | 5 | /* --Methode-- */
|
---|
| 6 | ADCBoardDesc::ADCBoardDesc(int id, string sbid, string cyc_firmw, string str1_firmw, string str2_firmw)
|
---|
| 7 | : id_(id), sbid_(sbid), cyclone_firmware_(cyc_firmw), stratix1_firmware_(str1_firmw), stratix2_firmware_(str2_firmw)
|
---|
| 8 | {
|
---|
| 9 |
|
---|
| 10 | }
|
---|
[3671] | 11 |
|
---|
[3672] | 12 | /* --Methode-- */
|
---|
| 13 | ADCBoardDesc::ADCBoardDesc(ADCBoardDesc const& bdes)
|
---|
| 14 | : id_(bdes.id_), sbid_(bdes.sbid_), cyclone_firmware_(bdes.cyclone_firmware_),
|
---|
| 15 | stratix1_firmware_(bdes.stratix1_firmware_), stratix2_firmware_(bdes.stratix2_firmware_)
|
---|
| 16 | {
|
---|
| 17 | }
|
---|
| 18 |
|
---|
| 19 | /* --Methode-- */
|
---|
| 20 | ADCBoardDesc& ADCBoardDesc::Set(ADCBoardDesc const & bdes)
|
---|
| 21 | {
|
---|
| 22 | id_ = bdes.id_;
|
---|
| 23 | sbid_ = bdes.sbid_;
|
---|
| 24 | cyclone_firmware_ = bdes.cyclone_firmware_;
|
---|
| 25 | stratix1_firmware_ = bdes.stratix1_firmware_;
|
---|
| 26 | stratix2_firmware_ = bdes.stratix2_firmware_;
|
---|
| 27 | return(*this);
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | /* --Methode-- */
|
---|
| 31 | ostream& ADCBoardDesc::Print(ostream& os)
|
---|
| 32 | {
|
---|
| 33 | os << "ADCBoard#" << id_ << "(" << sbid_ << ") Cyclone:" << cyclone_firmware_
|
---|
| 34 | << " Stratix1: " << stratix1_firmware_ << " Stratix2: " << stratix2_firmware_ << endl;
|
---|
| 35 | return os;
|
---|
| 36 | }
|
---|
| 37 |
|
---|
| 38 | /* --Methode-- */
|
---|
| 39 | BRConfList::BRConfList()
|
---|
| 40 | : basedir_("./")
|
---|
| 41 | {
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 44 | /* --Methode-- */
|
---|
| 45 | BRConfList::BRConfList(string basedir)
|
---|
| 46 | : basedir_(basedir)
|
---|
| 47 | {
|
---|
| 48 | }
|
---|
| 49 |
|
---|
| 50 | /* --Methode-- */
|
---|
| 51 | BRConfList::BRConfList(string basedir, vector<ADCBoardDesc> boards)
|
---|
| 52 | : basedir_(basedir), boards_(boards)
|
---|
| 53 | {
|
---|
| 54 | size_t len = basedir_.length();
|
---|
| 55 | if ((len>1)&&(basedir_[len-1]!='/')) basedir_ += '/';
|
---|
| 56 | }
|
---|
| 57 |
|
---|
| 58 | /* --Methode-- */
|
---|
| 59 | BRConfList::BRConfList(BRConfList const & cf)
|
---|
| 60 | : basedir_(cf.basedir_), boards_(cf.boards_)
|
---|
| 61 | {
|
---|
| 62 | }
|
---|
| 63 |
|
---|
| 64 | /* --Methode-- */
|
---|
[3674] | 65 | void BRConfList::SetBaseDirectory(string basedir)
|
---|
| 66 | {
|
---|
| 67 | basedir_=basedir;
|
---|
| 68 | size_t len = basedir_.length();
|
---|
| 69 | if ((len>1)&&(basedir_[len-1]!='/')) basedir_ += '/';
|
---|
| 70 | }
|
---|
| 71 |
|
---|
| 72 | /* --Methode-- */
|
---|
[3672] | 73 | void BRConfList::Set(BRConfList const & cf)
|
---|
| 74 | {
|
---|
| 75 | basedir_=cf.basedir_;
|
---|
| 76 | boards_=cf.boards_;
|
---|
| 77 | }
|
---|
| 78 |
|
---|
| 79 | /* --Methode-- */
|
---|
| 80 | ostream& BRConfList::Print(ostream& os)
|
---|
| 81 | {
|
---|
| 82 | os << " ----- BRConfList:: BaseDir:" << basedir_ << " NBoards= " << boards_.size() << endl;
|
---|
| 83 | for(size_t k=0; k<boards_.size(); k++) boards_[k].Print(os);
|
---|
| 84 | return os;
|
---|
| 85 | }
|
---|
| 86 |
|
---|
| 87 | /* --Methode-- */
|
---|
| 88 | void BRConfList::ReadDCFile(string file)
|
---|
| 89 | {
|
---|
| 90 | // A FAIRE
|
---|
| 91 | }
|
---|
| 92 |
|
---|
[3671] | 93 | // Classe qui memorise tous les parametres importants de l'acquisition
|
---|
| 94 |
|
---|
| 95 | /* --Methode-- */
|
---|
[3681] | 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)
|
---|
[3671] | 99 | {
|
---|
[3681] | 100 | AcqMode=acqmod;
|
---|
| 101 | fgdatafft=false;
|
---|
| 102 | fgsinglechannel=false;
|
---|
| 103 |
|
---|
[3671] | 104 | FiberListS=fibres;
|
---|
| 105 | NbFibers=0;
|
---|
| 106 | for (int fib=0; fib<PMAXNBFIBRES;fib++) FiberNum[fib]=0;
|
---|
| 107 | PaqSize=paqsz;
|
---|
[3674] | 108 | dmasizekb=dmaszkb;
|
---|
[3681] | 109 |
|
---|
[3671] | 110 | NbFiles=nfiles;
|
---|
| 111 | NBlocPerFile=nblocfile;
|
---|
| 112 | OutPathName=outpath;
|
---|
[3681] | 113 |
|
---|
[3671] | 114 | nZones=nzon;
|
---|
| 115 | nPaqZone=npaqzon;
|
---|
[3681] | 116 |
|
---|
[3671] | 117 | swapall=BR_Copy;
|
---|
| 118 | savesigfits=true;
|
---|
| 119 | fgnulldev4fits=false;
|
---|
[3674] | 120 |
|
---|
[3681] | 121 | fg_hard_ctrlc=false;
|
---|
[3674] | 122 |
|
---|
[3671] | 123 | fgreducpsize=false;
|
---|
[3674] | 124 | reducneedcopy=false;
|
---|
[3673] | 125 | pqreducmode=BR_CopyRA;
|
---|
[3671] | 126 | redpqsize=PaqSize;
|
---|
| 127 | reducoffset=0;
|
---|
| 128 |
|
---|
[3674] | 129 | skysource="";
|
---|
[3681] | 130 |
|
---|
| 131 | fgdoProc=false;
|
---|
| 132 | nmeanProc=512;
|
---|
| 133 | stepProc=5;
|
---|
| 134 | nmaxProc=0;
|
---|
| 135 |
|
---|
[3671] | 136 | monothr=false;
|
---|
| 137 | activate_pattern=false;
|
---|
[3681] | 138 | nopciLossRate=0.;
|
---|
[3671] | 139 |
|
---|
| 140 | Decode(); // On decode et on complete les parametres
|
---|
| 141 | }
|
---|
| 142 |
|
---|
| 143 | /* --Methode-- */
|
---|
| 144 | BRParList::BRParList(BRParList const & p)
|
---|
| 145 | {
|
---|
| 146 | Set(p);
|
---|
| 147 | }
|
---|
| 148 |
|
---|
| 149 | /* --Methode-- */
|
---|
| 150 | void BRParList::Set(BRParList const & p)
|
---|
| 151 | {
|
---|
[3681] | 152 | AcqMode=p.AcqMode;
|
---|
| 153 | fgdatafft=p.fgdatafft;
|
---|
| 154 | fgsinglechannel=p.fgsinglechannel;
|
---|
| 155 |
|
---|
[3671] | 156 | FiberListS=p.FiberListS;
|
---|
| 157 | NbFibers=p.NbFibers;
|
---|
| 158 | for (int fib=0; fib<PMAXNBFIBRES;fib++) FiberNum[fib]=p.FiberNum[fib];
|
---|
[3681] | 159 |
|
---|
[3671] | 160 | PaqSize=p.PaqSize;
|
---|
[3674] | 161 | dmasizekb=p.dmasizekb;
|
---|
[3681] | 162 |
|
---|
[3671] | 163 | NbFiles=p.NbFiles;
|
---|
| 164 | NBlocPerFile=p.NBlocPerFile;
|
---|
| 165 | OutPathName=p.OutPathName;
|
---|
[3681] | 166 |
|
---|
[3671] | 167 | nZones=p.nZones;
|
---|
| 168 | nPaqZone=p.nPaqZone;
|
---|
[3681] | 169 |
|
---|
[3671] | 170 | swapall=p.swapall;
|
---|
| 171 | savesigfits=p.savesigfits;
|
---|
| 172 | fgnulldev4fits=p.fgnulldev4fits;
|
---|
| 173 | fg_hard_ctrlc=p.fg_hard_ctrlc;
|
---|
| 174 | fgnulldev4fits=p.fgnulldev4fits;
|
---|
| 175 |
|
---|
| 176 | fgreducpsize=p.fgreducpsize;
|
---|
[3674] | 177 | reducneedcopy=p.reducneedcopy;
|
---|
[3673] | 178 | pqreducmode=p.pqreducmode;
|
---|
[3671] | 179 | redpqsize=p.redpqsize;
|
---|
| 180 | reducoffset=p.reducoffset;
|
---|
| 181 |
|
---|
[3674] | 182 | skysource=p.skysource;
|
---|
[3681] | 183 |
|
---|
| 184 | fgdoProc=p.fgdoProc;
|
---|
| 185 | nmeanProc=p.nmeanProc;
|
---|
| 186 | stepProc=p.stepProc;
|
---|
| 187 | nmaxProc=p.nmaxProc;
|
---|
[3674] | 188 |
|
---|
[3671] | 189 | monothr=p.monothr;
|
---|
| 190 | activate_pattern=p.activate_pattern;
|
---|
[3681] | 191 |
|
---|
| 192 | nopciLossRate=p.nopciLossRate;
|
---|
[3671] | 193 | return;
|
---|
| 194 | }
|
---|
| 195 |
|
---|
| 196 | /* --Methode-- */
|
---|
| 197 | void BRParList::ReadDCFile(string file)
|
---|
| 198 | {
|
---|
| 199 | DataCards conf(file);
|
---|
[3674] | 200 | FiberListS= conf.SParam("fibres",0,"1");
|
---|
| 201 | OutPathName= conf.SParam("outpathname",0,"TstAcq");
|
---|
| 202 | skysource= conf.SParam("skysource",0,"");
|
---|
| 203 | PaqSize=(uint_4)conf.IParam("paqsize",0,16424);
|
---|
| 204 | dmasizekb =(uint_4) conf.IParam("dmasizekb",0,32);
|
---|
| 205 | NbFiles=conf.IParam("nbfiles",0,1);
|
---|
| 206 | NBlocPerFile=conf.IParam("nblocperfile",0,10);
|
---|
[3671] | 207 | AcqMode =conf.SParam("acqmode",0,"std");
|
---|
[3674] | 208 | nZones=(uint_4)conf.IParam("memmgr",0,4);
|
---|
| 209 | nPaqZone=(uint_4)conf.IParam("memmgr",1,128);
|
---|
| 210 | if (conf.HasKey("reducpaqsz")) { // reduction des tailles de paquets
|
---|
| 211 | fgreducpsize=true;
|
---|
| 212 | redpqsize=(uint_4)conf.IParam("reducpaqsz",0,PaqSize/4);
|
---|
| 213 | reducoffset=(uint_4)conf.IParam("reducpaqsz",1,0);
|
---|
| 214 | }
|
---|
[3681] | 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 |
|
---|
[3674] | 223 | fg_hard_ctrlc=conf.HasKey("hard_ctrlc");
|
---|
[3681] | 224 | if (conf.HasKey("nosavesigfits")) savesigfits=false;
|
---|
[3671] | 225 | Decode();
|
---|
| 226 | }
|
---|
| 227 |
|
---|
| 228 | /* --Methode-- */
|
---|
| 229 | void BRParList::Decode()
|
---|
| 230 | {
|
---|
| 231 | vector<string> fiblist;
|
---|
| 232 | FillVStringFrString(FiberListS, fiblist, ',');
|
---|
| 233 | NbFibers=fiblist.size();
|
---|
| 234 | for (int fib=0; fib<fiblist.size(); fib++) {
|
---|
| 235 | FiberNum[fib]=atoi(fiblist[fib].c_str());
|
---|
| 236 | }
|
---|
[3672] | 237 | if (OutPathName == "/dev/null") {
|
---|
| 238 | fgnulldev4fits=true;
|
---|
| 239 | }
|
---|
| 240 | else {
|
---|
| 241 | size_t len = OutPathName.length();
|
---|
| 242 | if ((len>1)&&(OutPathName[len-1]!='/')) OutPathName+='/';
|
---|
| 243 | fgnulldev4fits=false;
|
---|
| 244 | }
|
---|
[3671] | 245 | string acqmode = AcqMode;
|
---|
[3681] | 246 | fgdatafft=false; fgsinglechannel=false;
|
---|
[3674] | 247 | reducneedcopy=false; pqreducmode=BR_TwoChanReduc;
|
---|
[3681] | 248 | if ((acqmode == "std")||(acqmode=="raw2c")) swapall = BR_Copy ;
|
---|
[3671] | 249 | if (acqmode == "nosw") swapall = BR_Copy ;
|
---|
| 250 | if (acqmode == "nof") { swapall = BR_Copy ; savesigfits = false; }
|
---|
[3674] | 251 | if (acqmode == "fft1c") { swapall = BR_FFTOneChan; reducneedcopy=true; pqreducmode=BR_OneChanReducK0; }
|
---|
| 252 | if (acqmode == "fft2c") { swapall = BR_FFTTwoChan; reducneedcopy=true; pqreducmode=BR_TwoChanReducK0; }
|
---|
| 253 | if (acqmode == "fft1cnof")
|
---|
| 254 | { swapall = BR_FFTOneChan; savesigfits = false; reducneedcopy=true; pqreducmode=BR_OneChanReducK0; }
|
---|
| 255 | if (acqmode == "fft2cnof")
|
---|
| 256 | { swapall = BR_FFTTwoChan; savesigfits = false; reducneedcopy=true; pqreducmode=BR_TwoChanReducK0; }
|
---|
[3671] | 257 | if (acqmode == "mono") { monothr = true; swapall = BR_Copy; }
|
---|
| 258 | if (acqmode == "monodirect") { monothr = true; swapall = BR_CopyHDR;}
|
---|
| 259 | if (acqmode == "patmonodirect") { monothr = true; swapall = BR_CopyHDR; activate_pattern=true; }
|
---|
| 260 | if (acqmode == "patmono") { monothr = true; swapall = BR_Copy; activate_pattern=true; }
|
---|
| 261 | if (acqmode == "patnof") { savesigfits = false; swapall = BR_Copy; activate_pattern=true; }
|
---|
| 262 | if (acqmode == "pattern") { savesigfits = true; swapall = BR_Copy; activate_pattern=true; }
|
---|
| 263 |
|
---|
| 264 | if (acqmode == "swapall") swapall = BR_SwapAll;
|
---|
[3674] | 265 | if (acqmode == "fft1csw")
|
---|
| 266 | { swapall = BR_FFTOneChanSwapAll; reducneedcopy=true; pqreducmode=BR_OneChanReducK0; }
|
---|
| 267 | if (acqmode == "fft2csw")
|
---|
| 268 | { swapall = BR_FFTTwoChanSwapAll; reducneedcopy=true; pqreducmode=BR_TwoChanReducK0; }
|
---|
| 269 | if (acqmode == "fft1cswnof")
|
---|
| 270 | { swapall = BR_FFTOneChanSwapAll; savesigfits = false; reducneedcopy=true; pqreducmode=BR_OneChanReducK0; }
|
---|
| 271 | if (acqmode == "fft2cswnof")
|
---|
| 272 | { swapall = BR_FFTTwoChanSwapAll; savesigfits = false; reducneedcopy=true; pqreducmode=BR_TwoChanReducK0; }
|
---|
[3671] | 273 | if ((acqmode == "swh") || (acqmode == "mxs") || (acqmode == "monoswh") ) swapall = BR_SwapHDR;
|
---|
| 274 | if ((acqmode == "swapallnof") || (acqmode == "mxs") ) savesigfits = false;
|
---|
| 275 | if (acqmode == "monoswh") { monothr = true; swapall = BR_SwapHDR;; }
|
---|
| 276 | if (acqmode == "monosw") { monothr = true; swapall = BR_SwapAll; }
|
---|
| 277 |
|
---|
| 278 | if (acqmode == "swap32") swapall = BR_Swap32 ;
|
---|
| 279 | if (acqmode == "nof32") { swapall = BR_Swap32 ; savesigfits = false; }
|
---|
[3674] | 280 | if (acqmode == "fft1c32")
|
---|
| 281 | { swapall = BR_FFTOneChanSwap32; reducneedcopy=true; pqreducmode=BR_OneChanReducK0; }
|
---|
| 282 | if (acqmode == "fft2c32")
|
---|
| 283 | { swapall = BR_FFTTwoChanSwap32; reducneedcopy=true; pqreducmode=BR_TwoChanReducK0; }
|
---|
| 284 | if (acqmode == "fft1cnof32")
|
---|
| 285 | { swapall = BR_FFTOneChanSwap32; savesigfits = false; reducneedcopy=true; pqreducmode=BR_OneChanReducK0; }
|
---|
| 286 | if (acqmode == "fft2cnof32")
|
---|
| 287 | { swapall = BR_FFTTwoChanSwap32; savesigfits = false; reducneedcopy=true; pqreducmode=BR_TwoChanReducK0; }
|
---|
| 288 |
|
---|
[3681] | 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 |
|
---|
[3674] | 296 | if (fgreducpsize) {
|
---|
| 297 | if (redpqsize>=PaqSize) fgreducpsize=false;
|
---|
| 298 | else {
|
---|
| 299 | if(reducoffset>(PaqSize-redpqsize)/2) reducoffset=(PaqSize-redpqsize)/2;
|
---|
| 300 | }
|
---|
| 301 | }
|
---|
[3671] | 302 | }
|
---|
| 303 |
|
---|
| 304 | /* --Methode-- */
|
---|
| 305 | ostream& BRParList::Print(ostream& os)
|
---|
| 306 | {
|
---|
| 307 | os << " ------ BRParList::Print() ----- " << endl;
|
---|
| 308 | os << " FiberListS=" << FiberListS ;
|
---|
| 309 | os << " PaqSize=" <<PaqSize;
|
---|
[3674] | 310 | os << " DMA_Size_kb=" <<dmasizekb << endl;
|
---|
[3671] | 311 | os << " AcqMode="<<AcqMode;
|
---|
| 312 | os << " Type of acquisition :" << BRPaquet::FmtConvToString( swapall) << endl;
|
---|
[3674] | 313 | os << " SkySource=" << skysource;
|
---|
[3671] | 314 | os << " NbFiles="<<NbFiles;
|
---|
| 315 | os << " NBlocPerFile="<<NBlocPerFile;
|
---|
| 316 | os << " OutPathName="<<OutPathName << endl;
|
---|
| 317 | os << " MemMgr: nZones="<<nZones;
|
---|
[3674] | 318 | os << " nPaqZone="<<nPaqZone<<endl;
|
---|
| 319 | if (fgreducpsize) {
|
---|
| 320 | os << " PaquetSize Reduction, ReducedSize=" << redpqsize << " Offset=" << reducoffset << endl;
|
---|
| 321 | }
|
---|
[3681] | 322 | if (fgdoProc>0)
|
---|
| 323 | os << " Monitoring NMeanProc=" << nmeanProc << " StepProc=" << stepProc << " NMaxProc=" << nmaxProc << endl;
|
---|
| 324 | else os << " No monotoring thread " << endl;
|
---|
[3671] | 325 | os << " fg_hard_ctrlc=" << ((fg_hard_ctrlc)?"true":"false");
|
---|
| 326 | os << " Save to fits " << ((savesigfits)?"true":"false") << endl;
|
---|
| 327 | os << " monothr y(1)/n(0) " << ((monothr)?"true":"false");
|
---|
| 328 | os << " ActivatePattern " << ((activate_pattern)?"true":"false") << endl;
|
---|
| 329 |
|
---|
| 330 | return os;
|
---|
| 331 | }
|
---|
| 332 |
|
---|
| 333 |
|
---|
[3672] | 334 | //-------------------- Classe BRAcqConfig -----------------------
|
---|
| 335 |
|
---|
[3671] | 336 | BRParList* BRAcqConfig::param_=NULL;
|
---|
[3672] | 337 | BRConfList* BRAcqConfig::config_=NULL;
|
---|
[3671] | 338 |
|
---|
| 339 | /* --Methode-- */
|
---|
| 340 | BRAcqConfig::BRAcqConfig()
|
---|
| 341 | {
|
---|
| 342 | if (param_==NULL) param_ = new BRParList;
|
---|
[3672] | 343 | if (config_==NULL) config_ = new BRConfList;
|
---|
[3671] | 344 | }
|
---|
| 345 |
|
---|
| 346 | /* --Methode-- */
|
---|
[3672] | 347 | ostream& BRAcqConfig::Print(ostream& os)
|
---|
| 348 | {
|
---|
| 349 | os << " ------------ BAORadio Acq Run/Configuration -------- " << endl;
|
---|
| 350 | config_->Print(os);
|
---|
| 351 | param_->Print(os);
|
---|
| 352 | os << " ----------------------------------------------------- " << endl;
|
---|
| 353 | }
|
---|
| 354 |
|
---|
| 355 | /* --Methode-- */
|
---|
[3671] | 356 | int BRAcqConfig::CreateOutputDirectories()
|
---|
| 357 | {
|
---|
[3672] | 358 | char cmd[1024];
|
---|
[3671] | 359 | if (param_->fgnulldev4fits!=true) {
|
---|
[3672] | 360 | sprintf(cmd,"mkdir %s%s",config_->BaseDirectory().c_str(), param_->OutPathName.c_str());
|
---|
[3671] | 361 | if (system(cmd) < 0) {
|
---|
[3672] | 362 | cout << "CreateOutputDirectories()/Error: Can not create subdirectory "
|
---|
| 363 | << cmd << " -> stop" << endl;
|
---|
[3671] | 364 | return 2;
|
---|
| 365 | }
|
---|
| 366 | cout << "CreateOutputDirectories() - Executed command " << cmd << endl;
|
---|
| 367 |
|
---|
[3672] | 368 | memset(cmd,0,1024);
|
---|
[3671] | 369 | for (int i= 0; i< NFibers() ; i++) {
|
---|
[3672] | 370 | sprintf(cmd,"mkdir %s%s/Fiber%d",config_->BaseDirectory().c_str(), param_->OutPathName.c_str(),param_->FiberNum[i]);
|
---|
[3671] | 371 | if (system(cmd) < 0) {
|
---|
| 372 | cout << "CreateOutputDirectories()/Error: Can not create subdirectory "
|
---|
[3672] | 373 | << cmd << " -> stop" << endl;
|
---|
[3671] | 374 | return 3;
|
---|
| 375 | }
|
---|
| 376 | else cout << "CreateOutputDirectories() - Executed command " << cmd << endl;
|
---|
| 377 | }
|
---|
| 378 | }
|
---|
| 379 | else {
|
---|
| 380 | string ProcPathName = "./XZXZXZX/";
|
---|
| 381 | cout << " Using " << ProcPathName << " for other processed files ... " << endl;
|
---|
| 382 | char cmd[512];
|
---|
| 383 | sprintf(cmd,"mkdir %s",ProcPathName.c_str());
|
---|
| 384 | if (system(cmd) < 0) {
|
---|
| 385 | cout << "CreateOutputDirectories()/Error: Can not create subdirectory ./XZXZXZX/"
|
---|
| 386 | << "-> stop" << endl;
|
---|
| 387 | return 3;
|
---|
| 388 | }
|
---|
| 389 | else cout << "CreateOutputDirectories() - Executed command " << cmd << endl;
|
---|
| 390 | }
|
---|
| 391 | return 0;
|
---|
| 392 | }
|
---|
| 393 |
|
---|
| 394 | /* --Methode-- */
|
---|
| 395 | string BRAcqConfig::OutputDirectoryFib(int ifib)
|
---|
| 396 | {
|
---|
| 397 | char buff[24];
|
---|
[3672] | 398 | sprintf(buff,"Fiber%d/",param_->FiberNum[ifib]);
|
---|
| 399 | return ( config_->BaseDirectory() + param_->OutPathName + buff );
|
---|
[3671] | 400 | }
|
---|