RawLILooker Class Reference

#include <RawLILooker.h>

Inheritance diagram for RawLILooker:
JobCModule

List of all members.

Public Member Functions

 RawLILooker ()
 ~RawLILooker ()
void BeginJob ()
int GetPixel (Int_t vachannel)
JobCResult Ana (const MomNavigator *mom)
void EndJob ()
void Help ()

Private Attributes

Detector detector

Detailed Description

Definition at line 23 of file RawLILooker.h.


Constructor & Destructor Documentation

RawLILooker::RawLILooker (  ) 

Definition at line 46 of file RawLILooker.cxx.

00046                          {
00047 
00048   // Constructor stuff..
00049 
00050   //MSG("JobC", Msg::kDebug) << "RawLILooker::Constructor" << endl;
00051  }

RawLILooker::~RawLILooker (  ) 

Definition at line 54 of file RawLILooker.cxx.

00055 {
00056 // Destructor
00057 
00058   //MSG("JobC", Msg::kDebug) << "RawLILooker::Destructor" << endl;
00059 }


Member Function Documentation

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

Implement this for read only access to the MomNavigator

Reimplemented from JobCModule.

Definition at line 77 of file RawLILooker.cxx.

References Detector::AddEntry(), RawLIAdcSummaryBlock::At(), detector, RawRecord::FindRawBlock(), RawLIAdcSummaryBlock::GetCalibPoint(), RawLIAdcSummaryBlock::GetCalibType(), RawLIAdcSummary::GetChannel(), RawLIAdcSummary::GetEntries(), MomNavigator::GetFragment(), RawLIAdcSummaryBlock::GetLed(), RawLIAdcSummary::GetMean(), VldTimeStamp::GetNanoSec(), RawLIAdcSummaryBlock::GetNumberOfSummaries(), RawLIAdcSummaryBlock::GetPeriod(), RawLIAdcSummaryBlock::GetPulseHeight(), RawLIAdcSummaryBlock::GetPulserBox(), RawLIAdcSummaryBlock::GetPulses(), RawLIAdcSummaryBlock::GetPulseWidth(), RawLIAdcSummary::GetRms(), VldTimeStamp::GetSec(), RawLIAdcSummaryBlock::GetTimeStamp(), RawLIAdcSummaryBlock::GetVldContext(), JobCResult::kPassed, n, JobCResult::SetError(), JobCResult::SetFailed(), Detector::Update(), and Detector::validity.

00078 {
00079   JobCResult result(JobCResult::kPassed);
00080 
00081   // Check that mom exists.
00082   assert(mom);
00083   
00084   // Find Raw Record in MOM
00085   RawRecord *rawrec = dynamic_cast<RawRecord *>
00086     (mom->GetFragment("RawRecord"));
00087   
00088 
00089   //Get LI Summary block from rawdatablock
00090   const RawLIAdcSummaryBlock *rawLIadcblock = 
00091     dynamic_cast<const RawLIAdcSummaryBlock*>
00092     (rawrec->FindRawBlock("RawLIAdcSummaryBlock"));
00093   
00094   if (rawrec == 0) {
00095     result.SetError().SetFailed();
00096     return result;
00097   }
00098   
00099   // Work through  rawliadcblock..  
00100   if(rawLIadcblock){  
00101 
00102     //unused: Int_t crate;
00103     //unused: Int_t chAd;
00104     
00105     Double_t mean;
00106     Double_t rms;
00107     Int_t no_entries;
00108     Int_t timesec;
00109     Int_t timens;
00110     
00111     Int_t calibtype;
00112     Int_t calibpoint;
00113     Int_t pulserbox;
00114     Int_t led;
00115     Int_t pulseheight;
00116     Int_t pulsewidth;
00117     Int_t pulses;
00118     Int_t period;
00119 
00120     
00121     timesec =0;
00122 
00123     
00124     timesec = rawLIadcblock->GetTimeStamp().GetSec();
00125     timens = rawLIadcblock->GetTimeStamp().GetNanoSec();
00126     calibpoint = rawLIadcblock->GetCalibPoint();
00127     calibtype = rawLIadcblock->GetCalibType();
00128     pulserbox = rawLIadcblock->GetPulserBox();
00129     led = rawLIadcblock->GetLed();
00130     pulseheight = rawLIadcblock->GetPulseHeight();
00131     pulsewidth = rawLIadcblock->GetPulseWidth();
00132     pulses = rawLIadcblock->GetPulses();
00133     period = rawLIadcblock->GetPeriod();
00134     
00135     detector.validity = rawLIadcblock->GetVldContext();
00136     
00137 
00138     detector.Update(led,
00139                     pulseheight,
00140                     pulsewidth,
00141                     pulserbox,
00142                     calibpoint,
00143                     rawLIadcblock->GetTimeStamp(),
00144                     calibtype,
00145                     pulses,
00146                     period);
00147 
00148     //Work through all summaries
00149     for(Int_t n=0;n<rawLIadcblock->GetNumberOfSummaries();n++){
00150       const RawLIAdcSummary *rawLIadcsummary = rawLIadcblock->At(n);
00151       
00152       mean = rawLIadcsummary->GetMean();
00153       rms = rawLIadcsummary->GetRms();
00154       no_entries = rawLIadcsummary->GetEntries();
00155 
00156       detector.AddEntry(rawLIadcsummary->GetChannel(),mean,rms,no_entries);
00157       
00158     }
00159 
00160 
00161     
00162     return result;
00163     
00164   }
00165 
00166   return result;
00167 }

void RawLILooker::BeginJob ( void   )  [virtual]

Implement for notification of begin of job

Reimplemented from JobCModule.

Definition at line 61 of file RawLILooker.cxx.

00062 {
00063 
00064 }

void RawLILooker::EndJob (  )  [virtual]

Implement for notification of end of job

Reimplemented from JobCModule.

Definition at line 178 of file RawLILooker.cxx.

00179 {
00180  
00181   //Stuff to do at end of job
00182   
00183   return;
00184 }

int RawLILooker::GetPixel ( Int_t  vachannel  ) 

Definition at line 67 of file RawLILooker.cxx.

00068 {
00069   Int_t pixelmap[] = {-1, -1, 15, 1, 16, 2, 11, 5, 12, 
00070                        6, 7, 9, 8, 10, 3, 14, 4, 13};
00071  
00072   return pixelmap[vachannel];
00073 }

void RawLILooker::Help (  )  [virtual]

Implement to spew some useful help to cout

Reimplemented from JobCModule.

Definition at line 171 of file RawLILooker.cxx.

00172 {
00173   // MSG("JobC", Msg::kInfo) 
00174   // << "RawLILooker::Help\n"
00175   //  << endl;
00176 }


Member Data Documentation

Definition at line 39 of file RawLILooker.h.

Referenced by Ana().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1