PulserFromRawModule Class Reference

#include <PulserFromRawModule.h>

Inheritance diagram for PulserFromRawModule:
JobCModule

List of all members.

Public Member Functions

 PulserFromRawModule ()
JobCResult Reco (MomNavigator *mom)
void EndJob ()

Private Member Functions

void FinishList (MomNavigator *mom)

Private Attributes

PulserFromRawLiBlockfDoingThisSum
PulserFromRawSummaryListfSummaryList

Detailed Description

Definition at line 12 of file PulserFromRawModule.h.


Constructor & Destructor Documentation

PulserFromRawModule::PulserFromRawModule (  ) 

Definition at line 43 of file PulserFromRawModule.cxx.

00044      :fDoingThisSum(0)
00045 {
00046 //======================================================================
00047 // Set the initial state of your module. The code above initializes the
00048 // variables listed to the values in parentheses. In this case that's
00049 // all I need to do so the method itself is empty...
00050 //======================================================================
00051     fDoingThisSum=0;
00052     fSummaryList=0;
00053 
00054 }


Member Function Documentation

void PulserFromRawModule::EndJob (  )  [virtual]

Implement for notification of end of job

Reimplemented from JobCModule.

Definition at line 135 of file PulserFromRawModule.cxx.

00136 {
00137 
00138 
00139 }

void PulserFromRawModule::FinishList ( MomNavigator mom  )  [private]
JobCResult PulserFromRawModule::Reco ( MomNavigator mom  )  [virtual]

Implement this for read-write access to the MomNavigator

Reimplemented from JobCModule.

Definition at line 58 of file PulserFromRawModule.cxx.

References PulserFromRawSummaryList::Add(), fDoingThisSum, RawRecord::FindRawBlock(), FinishList(), fSummaryList, PulserFromRawLiBlock::GetCalibPoint(), MomNavigator::GetFragment(), RecMinos::GetHeader(), PulserFromRawSummaryList::GetLed(), PulserFromRawLiBlock::GetLed(), RawLIAdcSummaryBlock::GetLed(), PulserFromRawSummaryList::GetPointIndex(), RawLIAdcSummaryBlock::GetPulseHeight(), RawRecord::GetRawHeader(), RawDaqHeader::GetRun(), VldTimeStamp::GetSec(), RawDaqSnarlHeader::GetSnarl(), VldContext::GetTimeStamp(), RawDaqSnarlHeader::GetTrigSrc(), GetVldContext(), RecMinosHdr::GetVldContext(), Msg::kDebug, JobCResult::kPassed, Msg::kVerbose, Msg::kWarning, MSG, and PulserFromRawLiBlock::New().

00059 {
00060    JobCResult result(JobCResult::kPassed);
00061    
00062    RawRecord *rawrec = dynamic_cast<RawRecord *>(mom->GetFragment("RawRecord"));
00063    if (rawrec == 0) {
00064       MSG("Pulser", Msg::kWarning) << "No RawRecord in MOM." << endl;
00065       return result;
00066    }
00067 
00068    MSG("Pulser",Msg::kVerbose) << "Reco() got vld: " 
00069                              << (rawrec->GetRawHeader())->GetVldContext() 
00070                              << endl;
00071    int sec = rawrec->GetHeader()->GetVldContext().GetTimeStamp().GetSec();
00072    UInt_t trigword = 0;
00073    UInt_t frun = 0;
00074    UInt_t fsnarl = 0;
00075    
00076 
00077    const RawDaqSnarlHeader* snarlHdr =
00078       dynamic_cast<const RawDaqSnarlHeader*>(rawrec->GetRawHeader());
00079    if (snarlHdr) {
00080       frun = snarlHdr->GetRun();
00081       fsnarl = snarlHdr->GetSnarl();
00082       trigword = snarlHdr->GetTrigSrc();
00083    }
00084    const RawLIAdcSummaryBlock *rawsum = 
00085       dynamic_cast<const RawLIAdcSummaryBlock *>
00086       (rawrec->FindRawBlock("RawLIAdcSummaryBlock"));   
00087    if (rawsum) {
00088       MSG("Pulser",Msg::kDebug) 
00089          << "Got LI Summary for Led :" 
00090          << rawsum->GetLed()
00091          << " H " << rawsum->GetPulseHeight() << endl;
00092       if(!fDoingThisSum) {
00093          fDoingThisSum=new PulserFromRawLiBlock(*rawsum);
00094       }
00095       else fDoingThisSum->New(*rawsum);
00096 //      cerr << "Hello: " << fDoingThisSum << " "
00097 //                 << fDoingThisSum->GetPulses() << endl;
00098    }
00099   //  cerr << "Here " << fDoingThisSum << " "
00100 //      << fDoingThisSum->GetPulses() << endl;
00101    const RawDigitDataBlock *rawddb =
00102       dynamic_cast<const RawDigitDataBlock *>
00103       (rawrec->FindRawBlock("RawDigitDataBlock"));
00104    
00105    if (rawddb && fDoingThisSum) {
00106 //       cerr << "Here also " << fDoingThisSum << endl;
00107 //       cerr <<  fDoingThisSum->GetPulses() << endl;
00108       if (fSummaryList) {
00109          if (fDoingThisSum->GetLed()==fSummaryList->GetLed() && 
00110              fDoingThisSum->GetCalibPoint()==fSummaryList->GetPointIndex()) {
00111 //           cerr << "Here !!!" << endl;
00112             fSummaryList->Add(*rawddb,*fDoingThisSum);
00113          }
00114          else {
00115             // We're on a new point now!
00116 //           cerr << "Here !!!!" << endl;
00117             MSG("Pulser",Msg::kDebug)<< "New point at " << sec <<endl;
00118             FinishList(mom);
00119             fSummaryList = new PulserFromRawSummaryList(*rawddb,*fDoingThisSum);
00120          }
00121       } 
00122       else { 
00123 //        cerr << "Here !!!!! " << fDoingThisSum->GetPulses() << endl;
00124          
00125          fSummaryList = new PulserFromRawSummaryList(*rawddb,*fDoingThisSum);
00126       }
00127    }
00128    
00129    return result;
00130    
00131 }


Member Data Documentation

Definition at line 25 of file PulserFromRawModule.h.

Referenced by Reco().

Definition at line 27 of file PulserFromRawModule.h.

Referenced by FinishList(), and Reco().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1