////////////////////////////////////////////////////////////////////
/// \class RAT::MissedCountBurstCut
///
/// \brief  Flags burst of missed count events for data cleaning
///
/// \author Tanner Kaptanoglu <tannerk@sas.upenn.edu>
/// \contact Tanner Kaptanoglu <tannerk@sas.upenn.edu>
///
/// REVISION HISTORY:\n
///    3 August 2018 : Tanner Kaptanoglu - first version
///
///  \details  This processor tags events within a burst of "missed"
///            counts, which are flagged using the channel flags proc.
///
///
////////////////////////////////////////////////////////////////////
#ifndef __RAT_MissedCountBurstCut__
#define __RAT_MissedCountBurstCut__

#include <RAT/Processor.hh>
#include <RAT/DataCleaningProc.hh>
#include <RAT/DS/Entry.hh>

namespace RAT {

  class MissedCountBurstCut : public DataCleaningProc {
    public:
      MissedCountBurstCut() : DataCleaningProc("missedcountburstcut",1){};
      virtual ~MissedCountBurstCut(){};
      virtual Processor::Result DSEvent(DS::Run&, DS::Entry& ds);
      void BeginOfRun(DS::Run&);

    protected:
      virtual Processor::Result Event(DS::Entry&, DS::EV& ev);

      double fTimeCut; // Time to cut after the burst
      double fTimeZero; // Start time of the burst
      std::vector<int> fGTIDs; // GTIDs at the start of a burst

  };

} // namespace RAT
#endif