
// DQLightInjection
// ================
// This class monitors Light Injection blocks
// (ADC summary block in LI stream, TPMT block in DAQMON stream)

#ifndef DQLIGHTINJECTION_H
#define DQLIGHTINJECTION_H

#include "RawData/RawLIAdcSummaryBlock.h"
#include "RawData/RawLiTpmtDigitsBlock.h"
#include "RawReadout.h"

#include "TObject.h"
#include "TObjArray.h"
 
class DQLightInjection : public TObject
{
 
 public:
  DQLightInjection();
  DQLightInjection(const DQLightInjection& rhs);
  ~DQLightInjection();

  void Process(RawLIAdcSummaryBlock* rdb);
  void Process(RawLiTpmtDigitsBlock* rdb);

  Int_t GetTime() const        { return fTime; }
  Int_t GetCalibPoint() const  { return fCalibPoint; }
  Int_t GetCalibType() const   { return fCalibType; }
  Int_t GetPulserBox() const   { return fPulserBox; }
  Int_t GetPulserLed() const   { return fPulserLed; }
  Int_t GetPulseHeight() const { return fPulseHeight; }
  Int_t GetPulseWidth() const  { return fPulseWidth; }

  Int_t GetLast() const;
  TObject* At(Int_t i) const;

 private:

  Int_t fTime;
  Int_t fCalibPoint;
  Int_t fCalibType;
  Int_t fPulserBox;
  Int_t fPulserLed;
  Int_t fPulseHeight;
  Int_t fPulseWidth;

  RawReadout* fRawReadout;

  TObjArray* fTpmtHitList;
 
  ClassDef(DQLightInjection,1);
            
};   

#endif
