Ignore:
Timestamp:
01/26/05 08:40:22 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc

    r5678 r6014  
    408408}
    409409
    410 // --------------------------------------------------------------------------
    411 //
    412 // return power of continous light, see class reference
    413 //
    414 UShort_t MRawEvtHeader::GetPowerOfContLight() const
    415 {
    416   return fTrigPattern[1] & 0xff;
    417 }
    418 
    419 // --------------------------------------------------------------------------
    420 //
    421 // return pulser slot patter as a 17-bit-field
    422 //
    423410UInt_t MRawEvtHeader::GetPulserSlotPattern() const
    424411{
    425   return (fTrigPattern[1] >> 16) & 0x1ffff;
    426 }
    427 
    428 // --------------------------------------------------------------------------
    429 //
    430 // return colour of the pulsed light as an MCalibrationCam::PulserColor_t
    431 // ATTENTION: In case of mulitple colours, kNONE is returned
    432 //
    433 const MCalibrationCam::PulserColor_t MRawEvtHeader::GetPulserColor() const
    434 {
    435 
    436   const UInt_t pattern = GetPulserSlotPattern();
    437  
    438   if ((pattern & kGreenAndBlue) || (pattern & kBlueAndUV) || (pattern & kGreenAndUV))
    439     return MCalibrationCam::kNONE;
    440 
    441   if (pattern & kCT1Pulser)
    442     return MCalibrationCam::kCT1;
    443   if (pattern & kAnyUV)
    444     return MCalibrationCam::kUV;
    445   if (pattern & kAnyGreen)
    446     return MCalibrationCam::kGREEN;
    447   if (pattern & kAnyBlue)
    448     return MCalibrationCam::kBLUE;
    449 
    450   return MCalibrationCam::kNONE;
    451 }
    452 
    453 
    454 // --------------------------------------------------------------------------
    455 //
    456 // return strength of the pulsed light
    457 // ATTENTION: In case of mulitple colours, kNONE is returned
    458 //
    459 Float_t MRawEvtHeader::GetPulserStrength() const
    460 {
    461 
    462   const MCalibrationCam::PulserColor_t col = GetPulserColor();
    463   const UInt_t pattern = GetPulserSlotPattern();
    464 
    465   Float_t strength = 0.;
    466 
    467   switch (col)
    468     {
    469     case MCalibrationCam::kNONE:
    470       break;
    471     case MCalibrationCam::kGREEN:
    472         if (pattern & kSlot1Green)
    473           strength += 5.;
    474         if (pattern & kSlot2Green)
    475           strength += 2.;
    476         if (pattern & kSlot15Green)
    477           strength += 1.;
    478         if (pattern & kSlot16AttGreen)
    479           strength += 0.2;
    480       break;     
    481     case MCalibrationCam::kBLUE:
    482         if (pattern & kSlot3Blue)
    483           strength += 5.;
    484         if (pattern & kSlot6Blue)
    485           strength += 5.;
    486         if (pattern & kSlot7Blue)
    487           strength += 5.;
    488         if (pattern & kSlot8Blue)
    489           strength += 2.;
    490         if (pattern & kSlot9AttBlue)
    491           strength += 0.2;
    492         if (pattern & kSlot10Blue)
    493           strength += 0.;
    494         if (pattern & kSlot11Blue)
    495           strength += 1.;
    496         if (pattern & kSlot14Blue)
    497           strength += 5.;
    498       break;     
    499     case MCalibrationCam::kUV:
    500         if (pattern & kSlot4UV)
    501           strength += 1.;
    502         if (pattern & kSlot5UV)
    503           strength += 2.;
    504         if (pattern & kSlot12UV)
    505           strength += 5.;
    506         if (pattern & kSlot13UV)
    507           strength += 5.;
    508       break;     
    509     case MCalibrationCam::kCT1:
    510       strength = 20.;
    511       break;     
    512     }
    513  
    514   return strength;
    515 }
    516 
    517 // --------------------------------------------------------------------------
    518 //
    519 // return color of continous light
    520 //
    521 MRawEvtHeader::CLColor_t MRawEvtHeader::GetContLightColor() const
    522 {
    523   return (CLColor_t)((fTrigPattern[1]>>8)&0xf);
    524 }
     412    return (fTrigPattern[1] >> 16) & 0x1ffff;
     413}
     414
Note: See TracChangeset for help on using the changeset viewer.