Changeset 6253
- Timestamp:
- 02/04/05 13:31:19 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r6252 r6253 129 129 130 130 * mjobs/MJExtractCalibTest.[h,cc] 131 - remove 131 - removed 132 132 133 133 * mjobs/MJCalibrateSignal.cc -
trunk/MagicSoft/Mars/callisto.cc
r6252 r6253 379 379 return 1; 380 380 } 381 MJCalibTest job4(Form("MJCalibTest #%d", seq.GetSequence())); 381 382 382 if (kUseTest) 383 { 384 job4.SetBadPixels(job3.GetBadPixels()); 383 { 384 MJCalibTest job4(Form("MJCalibTest #%d", seq.GetSequence())); 385 job4.SetBadPixels(job3.GetBadPixels()); 385 386 job4.SetSequence(seq); 386 387 job4.SetEnv(kConfig); … … 390 391 job4.SetPathOut(kOutpathC); 391 392 job4.SetPathData(kInpathD); 392 // job4.SetPathIn(kInpathC);393 393 394 394 if (!job4.ProcessFile(job1.GetPedestalCam())) 395 395 { 396 396 gLog << err << "Calibration of calibration failed." << endl << endl; 397 397 return -1; 398 399 398 } 399 400 400 if (!job4.GetDisplay()) 401 401 { 402 402 gLog << warn << "Display closed by user... execution aborted." << endl << endl; 403 403 return 1; 404 405 404 } 405 } 406 406 } 407 407 -
trunk/MagicSoft/Mars/mbase/MFilter.cc
r4991 r6253 95 95 TString MFilter::GetRule() const 96 96 { 97 return "<GetRule n/a for " + fName + ">";97 return ClassName(); //"<GetRule n/a for " + fName + ">"; 98 98 } 99 99 -
trunk/MagicSoft/Mars/mbase/MParContainer.cc
r5994 r6253 534 534 MParContainer *MParContainer::GetNewObject(const char *name, TClass *base) const 535 535 { 536 return base ? GetNewObject(name, base->GetName()) : 0; 537 } 538 539 // -------------------------------------------------------------------------- 540 // 541 // Return a new object of class 'name'. Make sure that the object 542 // derives from the class base. 543 // 544 // In case of failure return NULL 545 // 546 // The caller is responsible of deleting the object! 547 // 548 MParContainer *MParContainer::GetNewObject(const char *name, const char *base) const 549 { 536 550 TClass *cls = GetConstructor(name); 537 551 if (!cls || !base) … … 540 554 if (!cls->InheritsFrom(base)) 541 555 { 542 *fLog << " - Class doesn't inherit from " << base->GetName() << endl; 556 *fLog << err; 557 *fLog << dbginf << GetDescriptor() << " - Cannot create new instance of class '" << name << "': "; 558 *fLog << " - Class " << cls->GetName() << " doesn't inherit from " << base << endl; 543 559 return NULL; 544 560 } … … 550 566 if (!obj) 551 567 { 552 *fLog << " - Class has no default constructor." << endl; 553 *fLog << " - An abstract member functions of a base class is not overwritten." << endl; 554 return NULL; 555 } 556 557 return (MParContainer*)obj; 558 } 559 560 // -------------------------------------------------------------------------- 561 // 562 // Return a new object of class 'name'. Make sure that the object 563 // derives from the class base. 564 // 565 // In case of failure return NULL 566 // 567 // The caller is responsible of deleting the object! 568 // 569 MParContainer *MParContainer::GetNewObject(const char *name, const char *base) const 570 { 571 TClass *cls = GetConstructor(name); 572 if (!cls || !base) 573 return NULL; 574 575 if (!cls->InheritsFrom(base)) 576 { 577 *fLog << " - Class doesn't inherit from " << base << endl; 578 return NULL; 579 } 580 581 // 582 // create the parameter container of the the given class type 583 // 584 TObject *obj = (TObject*)cls->New(); 585 if (!obj) 586 { 587 *fLog << " - Class has no default constructor." << endl; 568 *fLog << err; 569 *fLog << dbginf << GetDescriptor() << " - Cannot create new instance of class '" << name << "': "; 570 *fLog << " - Class " << cls->GetName() << " has no default constructor." << endl; 588 571 *fLog << " - An abstract member functions of a base class is not overwritten." << endl; 589 572 return NULL; … … 766 749 return kFALSE; 767 750 768 *fLog << warn << "WARNING - Resource " << prefix+fName<< " found, but no " << ClassName() << "::ReadEnv." << endl;751 *fLog << warn << "WARNING - " << fName << ": Resource " << prefix << " found, but no " << ClassName() << "::ReadEnv." << endl; 769 752 return kTRUE; 770 753 } -
trunk/MagicSoft/Mars/merpp.cc
r5796 r6253 73 73 gLog << " Options:" << endl; 74 74 gLog.Usage(); 75 gLog << " --version, -V Show startup message with version number" << endl; 75 76 gLog << " -?, -h, --help This help" << endl << endl; 76 77 gLog << " File Options:" << endl; … … 150 151 // 151 152 MArgs arg(argc, argv); 153 154 if (arg.HasOnly("-V") || arg.HasOnly("--version")) 155 return 0; 152 156 153 157 if (arg.HasOnly("-?") || arg.HasOnly("-h") || arg.HasOnly("--help")) -
trunk/MagicSoft/Mars/mfbase/MF.cc
r5956 r6253 172 172 if (fg<0 && fl<0) 173 173 { 174 *fLog << err << dbginf << "Syntax Error: No coditional sign found in " << txt << endl; 175 return NULL; 176 } 174 MFilter *f = (MFilter*)GetNewObject(txt, MFilter::Class()); 175 if (!f) 176 { 177 *fLog << err << dbginf << "Syntax Error: '" << txt << "' is neither a MFilter nor conditional sign found." << endl; 178 return NULL; 179 } 180 // FIXME: Search object through list...? 181 txt = ""; 182 return f; 183 } 184 177 185 if (fg>=0 && fl>=0) 178 186 { … … 199 207 200 208 txt = ""; 201 202 209 return f; 203 210 } -
trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
r5399 r6253 376 376 fLoGainFadcSamples = new MArrayB(numconnected*numlo); 377 377 378 fABFlags = new MArrayB(maxid /8+1);378 fABFlags = new MArrayB(maxid==0 ? 0 : maxid/8+1); 379 379 380 380 fConnectedPixels = 0; -
trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc
r5728 r6253 73 73 // return kTRUE the lo gains exist for the actual pixel, else return kFALSE 74 74 // 75 #include <iostream>76 75 Bool_t MRawEvtPixelIter::HasLoGain() const 77 76 { … … 85 84 return kTRUE; 86 85 87 // cout << fNumLoGainEntry << " " << flush;88 // cout << fData->fLoGainPixId->GetSize() << " " << flush;89 90 86 if (fNumLoGainEntry>fData->fLoGainPixId->GetSize()) 91 87 return kFALSE; 92 88 93 /*94 cout << fNumLoGainEntry << " " << flush;95 cout << fData->fLoGainPixId->GetSize() << " " << flush;96 cout << fData->fLoGainPixId->GetArray() << " " << flush;97 cout << fLoGainId << endl;98 */99 // cout << (int)(fLoGainId-fData->fLoGainPixId->GetArray()) << " " << flush;100 // cout << (int)(fHiGainId-fData->fHiGainPixId->GetArray()) << " " << flush;101 102 89 Bool_t rc = *fHiGainId!=*fLoGainId; 103 104 // cout << "done." << endl;105 106 90 107 91 if (rc) 108 92 return kFALSE; 109 /* 110 // We have no lo-gain at all 111 if (!fLoGainId) 112 return kFALSE; 113 114 // This is to make the first call of this function in Next() 115 // work properly! NEVER call this function before Next() 116 if (fNumLoGainEntry==0) 117 return kTRUE; 118 119 // Make sure, that we don't exceed the last entry in the array! 120 if (fNumLoGainEntry==fData->fLoGainPixId->GetSize()) 121 return kFALSE; 122 123 // Check whether the current position in lo-gain fits the hi-gain 124 return *fHiGainId!=*fLoGainId; 125 */ 93 126 94 return kTRUE; 127 95 } -
trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.h
r5728 r6253 97 97 // return kTRUE the lo gains exist for the actual pixel, else return kFALSE 98 98 // 99 return fABFlags ? TESTBIT(fABFlags[GetPixelId()/8], GetPixelId()%8) : 0;99 return TESTBIT(GetABFlag(), GetPixelId()%8); 100 100 } 101 101 Byte_t GetABFlag() const -
trunk/MagicSoft/Mars/showlog.cc
r4887 r6253 19 19 gLog << " showlog [options] < filename" << endl << endl; 20 20 gLog.Usage(); 21 gLog << " -?, -h, --help This help" << endl << endl; 21 gLog << " --version, -V Show startup message with version number" << endl; 22 gLog << " -?, -h, --help This help" << endl; 22 23 gLog << endl; 23 24 gLog << " This program converts colored output made with ansi codes" << endl; … … 49 50 { 50 51 MArgs arg(argc, argv); 52 53 if (arg.HasOnly("-V") || arg.HasOnly("--version")) 54 return 0; 51 55 52 56 if (arg.HasOnly("-?") || arg.HasOnly("-h") || arg.HasOnly("--help")) -
trunk/MagicSoft/Mars/showplot.cc
r6167 r6253 41 41 gLog << " --save-as-gif[=filename] Save plots as gif files" << endl; 42 42 gLog << " --save-as-C[=filename] Save plots as root scripts" << endl; 43 gLog << " --tab=num Save only tab number num" << endl << endl; 43 gLog << " --tab=num Save only tab number num" << endl; 44 gLog << endl; 45 gLog << " --version, -V Show startup message with version number" << endl; 46 gLog << " -?, -h, --help This help" << endl; 47 gLog << endl; 44 48 gLog << "Description:" << endl; 45 49 gLog << " Use showplot to display a MStatusArray in an MStatusDisplay." << endl; … … 57 61 // 58 62 MArgs arg(argc, argv, kTRUE); 63 64 if (arg.HasOnly("-V") || arg.HasOnly("--version")) 65 return 0; 59 66 60 67 if (arg.HasOnly("-?") || arg.HasOnly("-h") || arg.HasOnly("--help")) -
trunk/MagicSoft/Mars/star.cc
r5564 r6253 66 66 gLog << " --config=star.rc Resource file [default=star.rc]" << endl; 67 67 gLog << endl; 68 gLog << " --version, -V Show startup message with version number" << endl; 68 69 gLog << " -?, -h, --help This help" << endl << endl; 69 70 } … … 77 78 // 78 79 MArgs arg(argc, argv, kTRUE); 80 81 if (arg.HasOnly("-V") || arg.HasOnly("--version")) 82 return 0; 79 83 80 84 if (arg.HasOnly("-?") || arg.HasOnly("-h") || arg.HasOnly("--help"))
Note:
See TracChangeset
for help on using the changeset viewer.