Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

FilterEvent.cxx

Go to the documentation of this file.
00001 #include "FilterEvent.h"
00002 #include "MinosObjectMap/MomNavigator.h"
00003 #include "JobControl/JobCModuleRegistry.h" // For JOBMODULE macro
00004 #include "CandDigit/CandDigitListHandle.h"
00005 #include "CandDigit/CandDeMuxDigitListHandle.h"
00006 #include "Validity/VldContext.h"
00007 #include "DataUtil/GetCandidate.h"
00008 #include "MessageService/MsgService.h"
00009 
00010 #include "RawData/RawDaqSnarlHeader.h"
00011 #include "RawData/RawRecord.h"
00012 #include "RawData/RawDigitDataBlock.h"
00013 
00014 JOBMODULE(FilterEvent, "FilterEvent",
00015           "Tests for DeMuxDigitList");
00016 
00017 CVSID("$Id: FilterEvent.cxx,v 1.3 2007/03/01 16:59:43 rhatcher Exp $");
00018 
00019 ClassImp(FilterEvent)
00020 
00021 JobCResult FilterEvent::Ana(const MomNavigator* mom)
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 }
00057 
00058 
00059 
00060 

Generated on Mon Feb 15 11:06:43 2010 for loon by  doxygen 1.3.9.1