Changeset 6231 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 02/03/05 11:55:25 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibColorSet.cc
r6185 r6231 65 65 // 66 66 MCalibColorSet::MCalibColorSet(const char *name, const char *title) 67 : fPattern(0), fHeader(0)67 : fPattern(0), fHeader(0), fIsExplicitColor(kFALSE) 68 68 { 69 69 fName = name ? name : "MCalibColorSet"; … … 76 76 { 77 77 78 fColor = MCalibrationCam::kNONE; 79 fStrength = -1.; 80 fIsValid = kFALSE; 81 78 fIsValid = kFALSE; 79 80 if (fIsExplicitColor) 81 return; 82 83 fColor = MCalibrationCam::kNONE; 84 fStrength = -1.; 82 85 } 83 86 … … 169 172 } 170 173 174 if (fIsExplicitColor) 175 { 176 fIsValid = kTRUE; 177 return kTRUE; 178 } 179 171 180 const Int_t num = header->GetRunNumber(); 172 181 … … 535 544 return kTRUE; 536 545 } 546 547 Int_t MCalibColorSet::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 548 { 549 550 Bool_t rc = kFALSE; 551 552 if (IsEnvDefined(env, prefix, "ExplicitColor", print)) 553 { 554 TString dat = GetEnvValue(env, prefix, "ExplicitColor", ""); 555 if (dat.BeginsWith("green", TString::kIgnoreCase)) 556 SetExplicitColor(MCalibrationCam::kGREEN); 557 if (dat.BeginsWith("blue", TString::kIgnoreCase)) 558 SetExplicitColor(MCalibrationCam::kBLUE); 559 if (dat.BeginsWith("uv", TString::kIgnoreCase)) 560 SetExplicitColor(MCalibrationCam::kUV); 561 if (dat.BeginsWith("ct1", TString::kIgnoreCase)) 562 SetExplicitColor(MCalibrationCam::kCT1); 563 rc = kTRUE; 564 } 565 566 return rc; 567 } -
trunk/MagicSoft/Mars/mcalib/MCalibColorSet.h
r6013 r6231 29 29 30 30 Bool_t fIsValid; // Have to set the pulse pattern? 31 31 Bool_t fIsExplicitColor; // Is colour set explicitely from outside (for MC)? 32 32 33 void CheckAndSet(const TString &str, const char *regexp, MCalibrationCam::PulserColor_t col, Float_t strength); 33 34 … … 35 36 Int_t PreProcess(MParList *pList); 36 37 Int_t Process(); 38 39 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 37 40 38 41 public: … … 41 44 42 45 void Clear(const Option_t *o=""); 46 47 void SetExplicitColor( const MCalibrationCam::PulserColor_t col, const Float_t strength=10.) 48 { 49 fIsExplicitColor = kTRUE; 50 fColor = col; 51 fStrength = 10.; 52 } 43 53 44 54 ClassDef(MCalibColorSet, 0) // Task to workaround missing colors
Note:
See TracChangeset
for help on using the changeset viewer.