#include "Demo/DemoDataReject.h"#include <cstdio>#include "TObject.h"#include "TCollection.h"#include "TObjectTable.h"#include "CandData/CandRecord.h"#include "CandDigit/CandDigitHandle.h"#include "CandDigit/CandDigitListHandle.h"#include "RawData/RawRecord.h"#include "RawData/RawDaqHeader.h"#include "RawData/RawDigitDataBlock.h"#include "RawData/RawDigit.h"#include "Plex/PlexHandle.h"#include "JobControl/JobCommand.h"#include "JobControl/JobCModuleRegistry.h"#include "MinosObjectMap/MomNavigator.h"#include "MessageService/MsgService.h"#include "Util/UtilString.h"Go to the source code of this file.
Namespaces | |
| namespace | RejectHelper |
Enumerations | |
| enum | { kRejectIfAllOff = -2, kRejectIfAnyOff = -1, kIgnoreTest = 0, kRejectIfAnyOn = 1, kRejectIfAllOn = 2 } |
Functions | |
| CVSID ("$Id: DemoDataReject.cxx,v 1.5 2004/10/19 23:55:45 rhatcher Exp $") | |
| JOBMODULE (DemoDataReject,"DataReject","Filter out data records.") | |
| bool | reject_it (Short_t setting, Short_t n, Short_t m) |
| bool | reject_veto (Short_t setting, RawDigitDataBlock *rddb) |
|
|
Definition at line 31 of file DemoDataReject.cxx. 00031 {
00032 kRejectIfAllOff = -2,
00033 kRejectIfAnyOff = -1,
00034 kIgnoreTest = 0,
00035 kRejectIfAnyOn = 1,
00036 kRejectIfAllOn = 2
00037 };
|
|
||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
Definition at line 45 of file DemoDataReject.cxx. References kIgnoreTest, kRejectIfAllOff, kRejectIfAllOn, kRejectIfAnyOff, and kRejectIfAnyOn. Referenced by DemoDataReject::FilterRawRecord(), and RejectHelper::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 }
|
|
||||||||||||
|
Definition at line 59 of file DemoDataReject.cxx. References RawDigit::GetChannel(), RawDigitDataBlock::GetDatumIter(), RawDigitDataBlock::GetVldContext(), PlexSEIdAltL::IsVetoShield(), and RejectHelper::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 }
|
1.3.9.1