Changeset 4633 for trunk/MagicSoft/Mars/mbadpixels
- Timestamp:
- 08/16/04 17:17:27 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mbadpixels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc
r4608 r4633 56 56 #include <fstream> 57 57 58 #include <TEnv.h> 58 59 #include <TArrayD.h> 59 60 … … 579 580 if (TESTBIT(fFlags, kUseCentralPixel)) 580 581 out << " " << GetUniqueName() << ".SetUseCentralPixel();" << endl; 581 } 582 if (TESTBIT(fFlags, kProcessRMS)) 583 out << " " << GetUniqueName() << ".SetProcessRMS();" << endl; 584 if (TESTBIT(fFlags, kHardTreatment)) 585 out << " " << GetUniqueName() << ".SetHardTreatment();" << endl; 586 if (fNumMinNeighbors!=3) 587 out << " " << GetUniqueName() << ".SetNumMinNeighbors(" << (int)fNumMinNeighbors << ");" << endl; 588 } 589 590 // -------------------------------------------------------------------------- 591 // 592 // Read the setup from a TEnv, eg: 593 // MBadPixelsCalc.UseInterpolation: no 594 // MBadPixelsCalc.UseCentralPixel: no 595 // MBadPixelsCalc.HardTreatment: no 596 // MBadPixelsCalc.ProcessRMS: no 597 // MBadPixelsCalc.NumMinNeighbors: 3 598 // 599 Int_t MBadPixelsTreat::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 600 { 601 Bool_t rc = kFALSE; 602 if (IsEnvDefined(env, prefix, "UseInterpolation")) 603 { 604 rc = kTRUE; 605 SetUseInterpolation(GetEnvValue(env, prefix, "UseInterpolation", IsUseInterpolation())); 606 } 607 if (IsEnvDefined(env, prefix, "UseCentralPixel")) 608 { 609 rc = kTRUE; 610 SetUseCentralPixel(GetEnvValue(env, prefix, "UseCentralPixel", IsUseCentralPixel())); 611 } 612 if (IsEnvDefined(env, prefix, "HardTreatment")) 613 { 614 rc = kTRUE; 615 SetHardTreatment(GetEnvValue(env, prefix, "HardTreatment", IsHardTreatment())); 616 } 617 if (IsEnvDefined(env, prefix, "ProcessRMS")) 618 { 619 rc = kTRUE; 620 SetProcessRMS(GetEnvValue(env, prefix, "ProcessRMS", IsProcessRMS())); 621 } 622 if (IsEnvDefined(env, prefix, "NumMinNeighbors")) 623 { 624 rc = kTRUE; 625 SetNumMinNeighbors(GetEnvValue(env, prefix, "NumMinNeighbors", fNumMinNeighbors)); 626 } 627 return rc; 628 } -
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.h
r4586 r4633 28 28 kUseCentralPixel = 2, 29 29 kProcessRMS = 3, 30 kHardTreatment = 430 kHardTreatment = 4 31 31 }; 32 32 … … 37 37 38 38 void Unmap() const; 39 void StreamPrimitive(ofstream &out) const;39 Bool_t IsPixelBad(Int_t idx) const; 40 40 41 41 Bool_t ReInit(MParList *pList); 42 42 Int_t PreProcess(MParList *pList); 43 43 Int_t Process(); 44 45 Bool_t IsPixelBad(Int_t idx) const;44 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 45 void StreamPrimitive(ofstream &out) const; 46 46 47 47 public: … … 64 64 b ? SETBIT(fFlags, kHardTreatment) : CLRBIT(fFlags, kHardTreatment); 65 65 } 66 67 Bool_t IsHardTreatment() const { return TESTBIT(fFlags, kHardTreatment); } 68 Bool_t IsProcessRMS() const { return TESTBIT(fFlags, kProcessRMS); } 69 Bool_t IsUseCentralPixel() const { return TESTBIT(fFlags, kUseCentralPixel); } 70 Bool_t IsUseInterpolation() const { return TESTBIT(fFlags, kUseInterpolation); } 71 66 72 void SetNumMinNeighbors(Byte_t num) { fNumMinNeighbors=num; } 67 73 void SetNamePedPhotContainer(const char *name) { fNamePedPhotContainer = name; }
Note:
See TracChangeset
for help on using the changeset viewer.