Changeset 6968


Ignore:
Timestamp:
04/21/05 16:38:03 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6966 r6968  
    2121
    2222                                                 -*-*- END OF LINE -*-*-
     23
     24 2005/04/21 Thomas Bretz
     25
     26    * mjobs/MJCalibrateSignal.cc:
     27      - fixed usage of MFTriggerPattern
     28
     29    * mtrigger/MFTriggerPattern.[h,cc]:
     30      - allow to set default from outside in case no pattern
     31        could be decoded
     32
     33
    2334
    2435 2005/04/20 Thomas Bretz
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r6958 r6968  
    498498
    499499    MFTriggerPattern ftp;
     500    ftp.SetDefault(kTRUE);
    500501    //    ftp.RequireCalibration();
    501502    ftp.DenyCalibration();
     
    581582
    582583    MFTriggerPattern        fcalib("CalibFilter");
     584    fcalib.SetDefault(kFALSE);
    583585    fcalib.RequireCalibration();
    584586
  • trunk/MagicSoft/Mars/mtrigger/MFTriggerPattern.cc

    r5903 r6968  
    5050MFTriggerPattern::MFTriggerPattern(const char *name, const char *title)
    5151    : fPattern(0), fMaskRequiredPrescaled(0), fMaskRequiredUnprescaled(0),
    52       fMaskDeniedPrescaled(0), fMaskDeniedUnprescaled(0)
     52      fMaskDeniedPrescaled(0), fMaskDeniedUnprescaled(0), fDefault(kTRUE)
    5353{
    5454    fName  = name  ? name  : "MFTriggerPattern";
     
    8686Int_t MFTriggerPattern::Process()
    8787{
    88     fResult = kFALSE;
    89 
    9088    const Byte_t p = fPattern->GetPrescaled();
    9189    const Byte_t u = fPattern->GetUnprescaled();
     90    if (p==0 && u==0)
     91    {
     92        fResult = fDefault;
     93        return kTRUE;
     94    }
     95
     96    fResult = kFALSE;
    9297
    9398    // Check whether all the bits required are ON
     
    99104    if ( (p & fMaskDeniedPrescaled) || (u & fMaskDeniedUnprescaled) )
    100105      fResult = kFALSE;
    101    
     106
    102107    return kTRUE;
    103108}
  • trunk/MagicSoft/Mars/mtrigger/MFTriggerPattern.h

    r5903 r6968  
    2323  Byte_t fMaskDeniedPrescaled;      // Mask for filtering Trigger Pattern denied
    2424  Byte_t fMaskDeniedUnprescaled;    // Mask for filtering Trigger Pattern denied
    25  
     25
     26  Bool_t fDefault;                  // Default which is used if trigger pattern has default value (p==0&&u==0)
    2627  Bool_t fResult;                   //!
    2728 
     
    4950  void Require(TString patt, Prescale_t prescaled=kUnPrescaled);
    5051  void Deny(TString patt, Prescale_t prescaled=kUnPrescaled);
    51  
     52
     53  void SetDefault(Bool_t b) { fDefault=b; }
     54
    5255  // Low level settings. USE THESE ONLY IF YOU ARE AN EXPERT!
    5356  void SetMaskRequired(const Byte_t mask, Prescale_t prescaled=kUnPrescaled);
Note: See TracChangeset for help on using the changeset viewer.