Changeset 5897 for trunk/MagicSoft/Mars
- Timestamp:
- 01/19/05 08:59:15 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5887 r5897 20 20 21 21 -*-*- END OF LINE -*-*- 22 23 2205/01/19 Nicola Galante 24 25 * mtrigger/MFTriggerPattern.[cc,h] 26 - added in header static const Bool_t kUnPrescaled and kPrescaled 27 instead of kFALSE and kTRUE 28 - fixed a bug in Process, both fMaskRequiredUnprescaled and 29 fMaskRequiredPrescaled are checked simultaneously. 30 22 31 23 32 2005/01/18 Markus Gaug -
trunk/MagicSoft/Mars/mtrigger/MFTriggerPattern.cc
r5880 r5897 91 91 const Byte_t u = fPattern->GetUnprescaled(); 92 92 93 // Check whether at least one bit fits our neeeds 94 if ( (p & fMaskRequiredPrescaled) == fMaskRequiredPrescaled) 95 fResult = kTRUE; 96 97 if ( (u & fMaskRequiredUnprescaled) == fMaskRequiredUnprescaled) 98 fResult = kTRUE; 93 // Check whether all the bits required are ON 94 if ( ((p & fMaskRequiredPrescaled) == fMaskRequiredPrescaled) 95 && ((u & fMaskRequiredUnprescaled) == fMaskRequiredUnprescaled)) 96 fResult = kTRUE; 99 97 100 98 // Now overwrite the result if one of the bits is denied 101 if (p & fMaskDeniedPrescaled) 102 fResult = kFALSE; 103 104 if (u & fMaskDeniedUnprescaled) 105 fResult = kFALSE; 106 99 if ( (p & fMaskDeniedPrescaled) || (u & fMaskDeniedUnprescaled) ) 100 fResult = kFALSE; 101 107 102 return kTRUE; 108 103 } -
trunk/MagicSoft/Mars/mtrigger/MFTriggerPattern.h
r5725 r5897 10 10 class MFTriggerPattern : public MFilter 11 11 { 12 private: 13 MTriggerPattern *fPattern; //! 12 private: 13 MTriggerPattern *fPattern; //! 14 15 Byte_t fMaskRequiredPrescaled; // Mask for filtering Trigger Pattern allowed 16 Byte_t fMaskRequiredUnprescaled; // Mask for filtering Trigger Pattern allowed 17 Byte_t fMaskDeniedPrescaled; // Mask for filtering Trigger Pattern denied 18 Byte_t fMaskDeniedUnprescaled; // Mask for filtering Trigger Pattern denied 19 20 Bool_t fResult; //! 21 22 Int_t PreProcess(MParList *pList); 23 Int_t Process(); 24 25 Bool_t IsExpressionTrue() const; 26 27 public: 28 static const Bool_t kPrescaled = kTRUE; 29 static const Bool_t kUnPrescaled = kFALSE; 14 30 15 Byte_t fMaskRequiredPrescaled; // Mask for filtering Trigger Pattern allowed 16 Byte_t fMaskRequiredUnprescaled; // Mask for filtering Trigger Pattern allowed 17 Byte_t fMaskDeniedPrescaled; // Mask for filtering Trigger Pattern denied 18 Byte_t fMaskDeniedUnprescaled; // Mask for filtering Trigger Pattern denied 19 20 Bool_t fResult; //! 21 22 Int_t PreProcess(MParList *pList); 23 Int_t Process(); 24 25 Bool_t IsExpressionTrue() const; 26 27 public: 28 MFTriggerPattern(const char *name=NULL, const char *title=NULL); 29 MFTriggerPattern(MFTriggerPattern &trigpatt); 30 31 void RequireTriggerLvl1(Bool_t prescaled=kFALSE); 32 void RequireTriggerLvl2(Bool_t prescaled=kFALSE); 33 void RequireCalibration(Bool_t prescaled=kFALSE); 34 void RequirePedestal(Bool_t prescaled=kFALSE); 35 void RequirePinDiode(Bool_t prescaled=kFALSE); 36 37 void DenyTriggerLvl1(Bool_t prescaled=kFALSE); 38 void DenyTriggerLvl2(Bool_t prescaled=kFALSE); 39 void DenyCalibration(Bool_t prescaled=kFALSE); 40 void DenyPedestal(Bool_t prescaled=kFALSE); 41 void DenyPinDiode(Bool_t prescaled=kFALSE); 42 43 void Require(TString patt, Bool_t prescaled=kFALSE); 44 void Deny(TString patt, Bool_t prescaled=kFALSE); 45 46 // Low level settings. USE THESE ONLY IF YOU ARE AN EXPERT! 47 void SetMaskRequired(const Byte_t mask, Bool_t prescaled=kFALSE); 48 void SetMaskDenied(const Byte_t mask, Bool_t prescaled=kFALSE); 49 50 ClassDef(MFTriggerPattern, 1) // A Filter for the Trigger Pattern 31 MFTriggerPattern(const char *name=NULL, const char *title=NULL); 32 MFTriggerPattern(MFTriggerPattern &trigpatt); 33 34 void RequireTriggerLvl1(Bool_t prescaled=kUnPrescaled); 35 void RequireTriggerLvl2(Bool_t prescaled=kUnPrescaled); 36 void RequireCalibration(Bool_t prescaled=kUnPrescaled); 37 void RequirePedestal(Bool_t prescaled=kUnPrescaled); 38 void RequirePinDiode(Bool_t prescaled=kUnPrescaled); 39 40 void DenyTriggerLvl1(Bool_t prescaled=kUnPrescaled); 41 void DenyTriggerLvl2(Bool_t prescaled=kUnPrescaled); 42 void DenyCalibration(Bool_t prescaled=kUnPrescaled); 43 void DenyPedestal(Bool_t prescaled=kUnPrescaled); 44 void DenyPinDiode(Bool_t prescaled=kUnPrescaled); 45 46 void Require(TString patt, Bool_t prescaled=kUnPrescaled); 47 void Deny(TString patt, Bool_t prescaled=kUnPrescaled); 48 49 // Low level settings. USE THESE ONLY IF YOU ARE AN EXPERT! 50 void SetMaskRequired(const Byte_t mask, Bool_t prescaled=kUnPrescaled); 51 void SetMaskDenied(const Byte_t mask, Bool_t prescaled=kUnPrescaled); 52 53 ClassDef(MFTriggerPattern, 1) // A Filter for the Trigger Pattern 51 54 }; 52 55 53 56 #endif
Note:
See TracChangeset
for help on using the changeset viewer.