RejectHelper Namespace Reference

Functions

bool reject_it (Short_t setting, Short_t n, Short_t m)
bool reject_veto (Short_t setting, RawDigitDataBlock *rddb)

Function Documentation

bool RejectHelper::reject_it ( Short_t  setting,
Short_t  n,
Short_t  m 
)

Definition at line 45 of file DemoDataReject.cxx.

References kIgnoreTest, kRejectIfAllOff, kRejectIfAllOn, kRejectIfAnyOff, and kRejectIfAnyOn.

Referenced by DemoDataReject::FilterRawRecord(), and reject_veto().

00045                                                          {
00046      //
00047      // make selection based on user setting and "n of m"
00048      //
00049       switch (setting) {
00050       case kRejectIfAllOff: return (n==0);
00051       case kRejectIfAnyOff: return (n<m);
00052       case kIgnoreTest:     return false;
00053       case kRejectIfAnyOn:  return (n>0);
00054       case kRejectIfAllOn:  return (n==m);
00055       default:              return false;
00056       }
00057    }

bool RejectHelper::reject_veto ( Short_t  setting,
RawDigitDataBlock rddb 
)

Definition at line 59 of file DemoDataReject.cxx.

References RawDigit::GetChannel(), RawDigitDataBlock::GetDatumIter(), RawDigitDataBlock::GetVldContext(), PlexSEIdAltL::IsVetoShield(), and reject_it().

Referenced by DemoDataReject::FilterRawRecord().

00059                                                              {
00060 
00061     //
00062     // loop over digits, count number that come from veto shield
00063     // use user criteria for whether to reject
00064     //
00065 
00066     PlexHandle ph(rddb->GetVldContext());
00067     TIter rdit = rddb->GetDatumIter();
00068     RawDigit *rd;
00069 
00070     int ndigit=0, nveto=0;
00071     while ( ( rd = (RawDigit*)rdit() ) ) {
00072       ++ndigit;
00073       RawChannelId rcid = rd->GetChannel();
00074       PlexSEIdAltL altl = ph.GetSEIdAltL(rcid);
00075       if (altl.IsVetoShield()) ++nveto;
00076     }
00077 
00078     return reject_it(setting,nveto,ndigit);
00079 
00080   }


Generated on 19 Jan 2018 for loon by  doxygen 1.6.1