//////////////////////////////////////////////////////////////////////// /// \class RAT::DQRunProc /// /// \brief Data quality run processor /// /// \author Ashley R. Back /// /// REVISION HISTORY:\n /// 2014-11-28 : a.r.back@qmul.ac.uk - Added average Nhit calculation /// plus general tidying up for FTB // 2017-02-07 : ms711@sussex.ac.uk - Bug fixes changing the clockCounts to // unsigned longs and the universal times to // unsigned ints /// /// \details Similar to first pass run selection on SNO. Carries out\n /// some basic run-level checks such as run type, correct active\n /// triggers and correct run length. /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_DQRunProc__ #define __RAT_DQRunProc__ #include #include #include #include class TH1D; namespace RAT { namespace DS { class Run; class Entry; class EV; } } namespace RAT { class DQRunProc : public DataQualityProc { public: DQRunProc(); virtual ~DQRunProc(); virtual void BeginOfRun( DS::Run& run ); virtual Processor::Result DSEvent( DS::Run& run, DS::Entry& ds ); /// For each bit in trigType mask, checks against criteria. Match with criteria returns true virtual bool CheckTrigBit( const int trigger, const int criteria, const int bit, int &failedBits ) const; virtual void EndOfRun( DS::Run& run ); protected: virtual Processor::Result Event( DS::Entry& ds, DS::EV& ev ); DBLinkPtr fDQChecks; /// fEventTimes; std::vector fEventCount10s; std::vector fEventCount50s; TH1D* fEventTimeHist; TH1D* fEventCount10Hist; TH1D* fEventCount50Hist; unsigned long int fNhitCount; ///