PulserFromRawFilterModule Class Reference

#include <PulserFromRawFilterModule.h>

Inheritance diagram for PulserFromRawFilterModule:
JobCModule

List of all members.

Public Member Functions

 PulserFromRawFilterModule ()
JobCResult Reco (MomNavigator *mom)

Detailed Description

Definition at line 20 of file PulserFromRawFilterModule.h.


Constructor & Destructor Documentation

PulserFromRawFilterModule::PulserFromRawFilterModule (  ) 

Definition at line 42 of file PulserFromRawFilterModule.cxx.

00043 {
00044 //======================================================================
00045 // Set the initial state of your module. The code above initializes the
00046 // variables listed to the values in parentheses. In this case that's
00047 // all I need to do so the method itself is empty...
00048 //======================================================================
00049 
00050 }


Member Function Documentation

JobCResult PulserFromRawFilterModule::Reco ( MomNavigator mom  )  [virtual]

Implement this for read-write access to the MomNavigator

Reimplemented from JobCModule.

Definition at line 57 of file PulserFromRawFilterModule.cxx.

References RawRecord::FindRawBlock(), MomNavigator::GetFragment(), RawLIAdcSummaryBlock::GetLed(), RawLIAdcSummaryBlock::GetNumberOfSummaries(), RawLIAdcSummaryBlock::GetPulseHeight(), RawRecord::GetRawHeader(), RawDaqSnarlHeader::GetSnarl(), RawDaqSnarlHeader::GetTrigSrc(), Msg::kDebug, JobCResult::kFailed, Msg::kVerbose, Msg::kWarning, MSG, JobCResult::SetFailed(), JobCResult::SetPassed(), and TRIG_LI_MASK.

00058 {
00059    JobCResult result(JobCResult::kFailed);
00060    
00061    RawRecord *rr = dynamic_cast<RawRecord *>(mom->GetFragment("RawRecord"));
00062    if (rr == 0) {
00063       MSG("Pulser", Msg::kWarning) << "No RawRecord in MOM." << endl;
00064       return result;
00065    }
00066 
00067    UInt_t trigword = 0;
00068    UInt_t snarl = 0;
00069    
00070    
00071    const RawDaqSnarlHeader* snarlHdr =
00072       dynamic_cast<const RawDaqSnarlHeader*>(rr->GetRawHeader());
00073    if (snarlHdr) {
00074       trigword = snarlHdr->GetTrigSrc();
00075       snarl = snarlHdr->GetSnarl();
00076    }
00077    const RawLIAdcSummaryBlock *rawsum = 
00078       dynamic_cast<const RawLIAdcSummaryBlock *>
00079       (rr->FindRawBlock("RawLIAdcSummaryBlock"));   
00080    if (rawsum) {
00081       MSG("Pulser",Msg::kDebug) 
00082          << "Got LI Summary for Led :" 
00083          << rawsum->GetLed()
00084          << " H " << rawsum->GetPulseHeight() 
00085          << " containing  " 
00086          << rawsum->GetNumberOfSummaries()<< " summaries." <<  endl;
00087       result.SetPassed();
00088       return result;
00089    }
00090    Int_t hasLI=trigword & TRIG_LI_MASK;
00091    if(hasLI) {
00092       MSG("Pulser", Msg::kVerbose) 
00093          << "Snarl " << snarl << " has LI. Trigger is: " 
00094          << hex << trigword << dec << endl;
00095       result.SetPassed();
00096       return result;
00097    }
00098    result.SetFailed();
00099    return result;
00100    
00101 }


The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1