FilterEvent Class Reference

#include <FilterEvent.h>

Inheritance diagram for FilterEvent:

JobCModule List of all members.

Public Member Functions

 FilterEvent ()
 ~FilterEvent ()
JobCResult Ana (const MomNavigator *mom)

Private Member Functions

 ClassDef (FilterEvent, 0)

Detailed Description

Definition at line 16 of file FilterEvent.h.


Constructor & Destructor Documentation

FilterEvent::FilterEvent (  )  [inline]

Definition at line 19 of file FilterEvent.h.

00019 {};

FilterEvent::~FilterEvent (  )  [inline]

Definition at line 20 of file FilterEvent.h.

00020 {};


Member Function Documentation

JobCResult FilterEvent::Ana ( const MomNavigator mom  )  [virtual]

Implement this for read only access to the MomNavigator

Reimplemented from JobCModule.

Definition at line 21 of file FilterEvent.cxx.

References digits(), RawDaqSnarlHeader::GetNumRawDigits(), RawRecord::GetRawBlockIter(), RawRecord::GetRawHeader(), JobCResult::kFailed, Msg::kInfo, JobCResult::kPassed, and MSG.

00022 {
00023   TIter    fragiter = mom->FragmentIter();
00024   
00025   TObject* tobj;
00026   const RawHeader* rawhead =0;
00027   const RawDaqSnarlHeader* snarlHead = 0;
00028   const RawDigitDataBlock* rddb =0;
00029   
00030   fragiter.Reset();
00031   while( ( tobj = fragiter.Next() ) ) {
00032     RawRecord* rawRec = dynamic_cast<RawRecord*>(tobj);
00033     if(rawRec) {
00034       rawhead = rawRec->GetRawHeader();
00035       snarlHead = dynamic_cast<const RawDaqSnarlHeader*>(rawhead);
00036       if(snarlHead) {
00037         int digits = snarlHead->GetNumRawDigits();
00038         if(digits>5000){
00039           MSG("TriD",Msg::kInfo) << "EventFilter: " << digits << " is wayyy to many digits to try to plot." << endl;
00040           return JobCResult::kFailed;     
00041         } else {
00042           return JobCResult::kPassed;
00043         }       
00044       }
00045       TIter itr = rawRec->GetRawBlockIter();
00046       RawDataBlock* rawBlk;
00047       while ( ( rawBlk = dynamic_cast<RawDataBlock*>(itr.Next()) ) ) {
00048         rddb = dynamic_cast<RawDigitDataBlock*>(rawBlk);
00049         if(rddb) break;
00050       }
00051     }
00052   }
00053 
00054   MSG("TriD",Msg::kInfo) << "EventFilter: No snarl.\n"; 
00055   return JobCResult::kPassed;
00056 }

FilterEvent::ClassDef ( FilterEvent  ,
 
) [private]


The documentation for this class was generated from the following files:
Generated on Mon Nov 10 00:55:29 2014 for loon by  doxygen 1.4.7