Changeset 7451 for trunk/MagicSoft/Mars
- Timestamp:
- 12/12/05 12:25:48 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7450 r7451 34 34 - simplified reading the catlog file by using TString::Tokenize 35 35 36 * mtools/MCalendar.[h,cc]: 37 - added 38 36 39 37 40 … … 80 83 - replaced the nonsense TArrayS by TArrayC because the contents is 81 84 just a byte 85 86 * mreport/MReportCC.cc: 87 - fixed the 82 88 83 89 * ganymed.cc: -
trunk/MagicSoft/Mars/mjobs/MDataSet.cc
r7413 r7451 68 68 // in time, but it is not necessary. 69 69 // 70 // MISSING (27/01/04): The default name and paths cannot be used yet, because71 // they have to be defined soon.72 //73 70 ///////////////////////////////////////////////////////////////////////////// 74 71 #include "MDataSet.h" … … 425 422 n++; 426 423 427 // Strip all spaces from line 428 for (int i=0; i<line.Length(); i++) 429 if (line[i]==' ') 430 line.Remove(i--, 1); 431 432 const Ssiz_t s = line.First(','); 433 if (s<0 || fNameSource!=line(0, s)) 434 continue; 435 436 // CrabNebula,f|L|K0,5:34:32.0,22:0:52,-1.0,2000 437 438 for (int i=0; i<6; i++) 424 TObjArray *arr = line.Tokenize(","); 425 426 if (arr->GetEntries()<6) 439 427 { 440 const Ssiz_t p = line.First(','); 441 if (p<0 && i<5) 442 { 443 gLog << err << "ERROR - Not enough arguments in line #" << n << " of " << catalog << endl; 444 return kFALSE;; 445 } 446 447 switch (i) 448 { 449 case 0: 450 case 1: 451 case 4: 452 break; 453 case 2: 454 ra = line(0, p); 455 break; 456 case 3: 457 dec = line(0, p); 458 break; 459 case 5: 460 epoch = line; 461 break; 462 } 463 line.Remove(0, p+1); 428 gLog << err << "ERROR - Not enough arguments in line #" << n << " of " << catalog << endl; 429 delete arr; 430 return kFALSE;; 464 431 } 465 432 466 if (line.First(',')>=0) 467 { 468 gLog << err << "ERROR - Too much arguments in line #" << n << " of " << catalog << endl; 469 return kFALSE; 470 } 471 472 break; 473 } 474 475 if (epoch.IsNull()) 476 { 477 gLog << err << "ERROR - No entry " << fNameSource << " in " << catalog << endl; 478 return kFALSE; 479 } 480 481 if (epoch!=(TString)"2000") 433 const TString name = (*arr)[0]->GetName(); 434 435 ra = (*arr)[2]->GetName(); 436 dec = (*arr)[3]->GetName(); 437 epoch = (*arr)[5]->GetName(); 438 439 delete arr; 440 441 if (name.Strip(TString::kBoth)==fNameSource) 442 break; 443 } 444 445 if (epoch.Strip(TString::kBoth)!=(TString)"2000") 482 446 { 483 447 gLog << err << "ERROR - Epoch not 2000... not supported." << endl;
Note:
See TracChangeset
for help on using the changeset viewer.