DQLightInjection Class Reference

#include <DQLightInjection.h>

List of all members.

Public Member Functions

 DQLightInjection ()
 DQLightInjection (const DQLightInjection &rhs)
 ~DQLightInjection ()
void Process (RawLIAdcSummaryBlock *rdb)
void Process (RawLiTpmtDigitsBlock *rdb)
Int_t GetTime () const
Int_t GetCalibPoint () const
Int_t GetCalibType () const
Int_t GetPulserBox () const
Int_t GetPulserLed () const
Int_t GetPulseHeight () const
Int_t GetPulseWidth () const
Int_t GetLast () const
TObject * At (Int_t i) const

Private Member Functions

 ClassDef (DQLightInjection, 1)

Private Attributes

Int_t fTime
Int_t fCalibPoint
Int_t fCalibType
Int_t fPulserBox
Int_t fPulserLed
Int_t fPulseHeight
Int_t fPulseWidth
RawReadoutfRawReadout
TObjArray * fTpmtHitList

Detailed Description

Definition at line 17 of file DQLightInjection.h.


Constructor & Destructor Documentation

DQLightInjection::DQLightInjection (  ) 

Definition at line 15 of file DQLightInjection.cxx.

00015                                    :
00016   fTime(-1),
00017   fCalibPoint(-1), 
00018   fCalibType(-1),
00019   fPulserBox(-1), 
00020   fPulserLed(-1),
00021   fPulseHeight(-1), 
00022   fPulseWidth(-1),
00023   fRawReadout(0), 
00024   fTpmtHitList(0)
00025 {
00026   fRawReadout = new RawReadout();
00027   
00028   fTpmtHitList = new TObjArray(); 
00029 }
 

DQLightInjection::DQLightInjection ( const DQLightInjection rhs  ) 

Definition at line 31 of file DQLightInjection.cxx.

00031                                                               :
00032   TObject(rhs),
00033   fTime(rhs.fTime),
00034   fCalibPoint(rhs.fCalibPoint), 
00035   fCalibType(rhs.fCalibType),
00036   fPulserBox(rhs.fPulserBox), 
00037   fPulserLed(rhs.fPulserLed),
00038   fPulseHeight(rhs.fPulseHeight), 
00039   fPulseWidth(rhs.fPulseWidth),
00040   fRawReadout(rhs.fRawReadout),
00041   fTpmtHitList(rhs.fTpmtHitList)
00042 {
00043   
00044 }
   

DQLightInjection::~DQLightInjection (  ) 

Definition at line 46 of file DQLightInjection.cxx.

References fRawReadout, and fTpmtHitList.

00047 {
00048   delete fRawReadout;
00049 
00050   fTpmtHitList->Delete();
00051   delete fTpmtHitList;
00052 }


Member Function Documentation

TObject * DQLightInjection::At ( Int_t  i  )  const

Definition at line 150 of file DQLightInjection.cxx.

References fTpmtHitList.

Referenced by AlgDataQuality::RunAlg().

00151 {
00152   return (TObject*)(fTpmtHitList->At(i));
00153 }

DQLightInjection::ClassDef ( DQLightInjection  ,
 
) [private]
Int_t DQLightInjection::GetCalibPoint (  )  const [inline]

Definition at line 29 of file DQLightInjection.h.

References fCalibPoint.

Referenced by AlgDataQuality::RunAlg().

00029 { return fCalibPoint; }

Int_t DQLightInjection::GetCalibType (  )  const [inline]

Definition at line 30 of file DQLightInjection.h.

References fCalibType.

Referenced by AlgDataQuality::RunAlg().

00030 { return fCalibType; }

Int_t DQLightInjection::GetLast (  )  const

Definition at line 145 of file DQLightInjection.cxx.

References fTpmtHitList.

Referenced by Process(), and AlgDataQuality::RunAlg().

00146 {
00147   return fTpmtHitList->GetLast();
00148 }

Int_t DQLightInjection::GetPulseHeight (  )  const [inline]

Definition at line 33 of file DQLightInjection.h.

References fPulseHeight.

Referenced by AlgDataQuality::RunAlg().

00033 { return fPulseHeight; }

Int_t DQLightInjection::GetPulserBox (  )  const [inline]

Definition at line 31 of file DQLightInjection.h.

References fPulserBox.

Referenced by AlgDataQuality::RunAlg().

00031 { return fPulserBox; }

Int_t DQLightInjection::GetPulserLed (  )  const [inline]

Definition at line 32 of file DQLightInjection.h.

References fPulserLed.

Referenced by AlgDataQuality::RunAlg().

00032 { return fPulserLed; }

Int_t DQLightInjection::GetPulseWidth (  )  const [inline]

Definition at line 34 of file DQLightInjection.h.

References fPulseWidth.

Referenced by AlgDataQuality::RunAlg().

00034 { return fPulseWidth; }

Int_t DQLightInjection::GetTime (  )  const [inline]

Definition at line 28 of file DQLightInjection.h.

References fTime.

Referenced by AlgDataQuality::RunAlg().

00028 { return fTime; }

void DQLightInjection::Process ( RawLiTpmtDigitsBlock rdb  ) 

Definition at line 76 of file DQLightInjection.cxx.

References RawLiTpmtDigitsBlock::At(), fCalibPoint, fCalibType, fPulseHeight, fPulserBox, fPulserLed, fPulseWidth, fRawReadout, fTime, fTpmtHitList, RawDigit::GetADC(), RawDigit::GetChannel(), VldContext::GetDetector(), RawChannelId::GetElecType(), GetLast(), RawLiTpmtDigitsBlock::GetNumberOfDigits(), RawReadout::GetPulserBox(), VldTimeStamp::GetSec(), RawDigit::GetTDC(), VldContext::GetTimeStamp(), RawLiTpmtDigitsBlock::GetVldContext(), Detector::kFar, RawChip::kGood, Detector::kNear, ElecType::kQIE, RawReadout::kTpmt, ElecType::kVA, Msg::kVerbose, MSG, and n.

00077 {
00078   MSG("DataQuality",Msg::kVerbose) << " DQLightInjection::Process(RawLiTpmtDigitsBlock) " << endl;
00079 
00080   Int_t n;
00081   Int_t time;
00082   Int_t adc;
00083   Int_t pulserbox;
00084   Int_t maxadc = -1;
00085   Int_t maxpulserbox = -1;
00086 
00087   VldContext vldc = (VldContext)(rdb->GetVldContext()); 
00088   time=vldc.GetTimeStamp().GetSec();
00089 
00090   if(time!=fTime){
00091     fTime=time;
00092     fCalibPoint=-1;
00093     fCalibType=-1;
00094     fPulserBox=-1;
00095     fPulserLed=-1;
00096     fPulseHeight=-1;
00097     fPulseWidth=-1;
00098   }
00099 
00100   // reset the list of TPMT hits
00101   fTpmtHitList->Delete();
00102   
00103   // iterate over raw TPMT hits
00104   // (pulser box is given by hit with largest adc)
00105   for(n=0;n<rdb->GetNumberOfDigits();n++){
00106     RawDigit* rd = (RawDigit*)(rdb->At(n));
00107     if( rd ){
00108       RawChannelId rawch = (RawChannelId)(rd->GetChannel());   
00109 
00110       if( vldc.GetDetector()==Detector::kNear
00111        && rawch.GetElecType()==ElecType::kQIE ){
00112         adc = rd->GetADC();
00113         pulserbox = fRawReadout->GetPulserBox(rawch);
00114         if( (maxpulserbox<0)
00115          || (pulserbox>=0 && adc>maxadc) ){
00116           maxadc=adc; maxpulserbox=pulserbox; }
00117         RawChip* tpmt = new RawChip(rawch,rd->GetADC(),rd->GetTDC(),RawReadout::kTpmt,RawChip::kGood,0);
00118         fTpmtHitList->Add(tpmt);
00119       }
00120 
00121       if( vldc.GetDetector()==Detector::kFar
00122        && rawch.GetElecType()==ElecType::kVA ){
00123         adc = rd->GetADC();
00124         pulserbox = fRawReadout->GetPulserBox(rawch);
00125         if( (maxpulserbox<0)
00126          || (pulserbox>=0 && adc>maxadc) ){
00127           maxadc=adc; maxpulserbox=pulserbox; }
00128         RawChip* tpmt = new RawChip(rawch,rd->GetADC(),rd->GetTDC(),RawReadout::kTpmt,RawChip::kGood,0);
00129         fTpmtHitList->Add(tpmt);
00130       }
00131 
00132     }
00133   }
00134 
00135   if(maxpulserbox>-1 && maxpulserbox!=fPulserBox){
00136     MSG("DataQuality",Msg::kVerbose) << " Pulser Box: " << maxpulserbox << " Adc: " << maxadc << endl;
00137     MSG("DataQuality",Msg::kVerbose) << " Overwritten Pulser Box: " << fPulserBox << " -> " << maxpulserbox << endl;
00138     fPulserBox=maxpulserbox;
00139   }
00140 
00141   MSG("DataQuality",Msg::kVerbose) << " Found " << 1+this->GetLast() << " Tpmt Hits" << endl;
00142 
00143 }

void DQLightInjection::Process ( RawLIAdcSummaryBlock rdb  ) 

Definition at line 54 of file DQLightInjection.cxx.

References fCalibPoint, fCalibType, fPulseHeight, fPulserBox, fPulserLed, fPulseWidth, fTime, RawLIAdcSummaryBlock::GetCalibPoint(), RawLIAdcSummaryBlock::GetCalibType(), RawLIAdcSummaryBlock::GetLed(), RawLIAdcSummaryBlock::GetPulseHeight(), RawLIAdcSummaryBlock::GetPulserBox(), RawLIAdcSummaryBlock::GetPulseWidth(), VldTimeStamp::GetSec(), VldContext::GetTimeStamp(), RawLIAdcSummaryBlock::GetVldContext(), Msg::kVerbose, and MSG.

Referenced by DataQualityReader::ProcessBlock().

00055 {
00056   MSG("DataQuality",Msg::kVerbose) << " DQLightInjection::Process(RawLIAdcSummaryBlock) " << endl;
00057 
00058   fTime=rdb->GetVldContext().GetTimeStamp().GetSec();
00059   fCalibPoint=rdb->GetCalibPoint();
00060   fCalibType=rdb->GetCalibType();
00061   fPulserBox=rdb->GetPulserBox();
00062   fPulserLed=rdb->GetLed();
00063   fPulseHeight=rdb->GetPulseHeight();
00064   fPulseWidth=rdb->GetPulseWidth();
00065 
00066   MSG("DataQuality",Msg::kVerbose) << "   Time=" << fTime << endl;
00067   MSG("DataQuality",Msg::kVerbose) << "   CalibPoint=" << fCalibPoint << endl;
00068   MSG("DataQuality",Msg::kVerbose) << "   CalibType=" << fCalibType << endl;
00069   MSG("DataQuality",Msg::kVerbose) << "   PulserBox=" << fPulserBox << endl;
00070   MSG("DataQuality",Msg::kVerbose) << "   PulserLed=" << fPulserLed << endl;
00071   MSG("DataQuality",Msg::kVerbose) << "   PulseHeight=" << fPulseHeight << endl;
00072   MSG("DataQuality",Msg::kVerbose) << "   PulseWidth=" << fPulseWidth << endl;
00073   
00074 }


Member Data Documentation

Definition at line 42 of file DQLightInjection.h.

Referenced by GetCalibPoint(), and Process().

Definition at line 43 of file DQLightInjection.h.

Referenced by GetCalibType(), and Process().

Definition at line 46 of file DQLightInjection.h.

Referenced by GetPulseHeight(), and Process().

Definition at line 44 of file DQLightInjection.h.

Referenced by GetPulserBox(), and Process().

Definition at line 45 of file DQLightInjection.h.

Referenced by GetPulserLed(), and Process().

Definition at line 47 of file DQLightInjection.h.

Referenced by GetPulseWidth(), and Process().

Definition at line 49 of file DQLightInjection.h.

Referenced by Process(), and ~DQLightInjection().

Int_t DQLightInjection::fTime [private]

Definition at line 41 of file DQLightInjection.h.

Referenced by GetTime(), and Process().

TObjArray* DQLightInjection::fTpmtHitList [private]

Definition at line 51 of file DQLightInjection.h.

Referenced by At(), GetLast(), Process(), and ~DQLightInjection().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1