//////////////////////////////////////////////////////////////////// /// \class RAT::PollingCut /// /// \brief Flags events that took place while there was other crate activity /// /// \author Eric marzec /// \contact Eric Marzec /// /// REVISION HISTORY:\n /// 24 Sept 2017 : Eric Marzec - first version /// 28 Spet 2018 : T Kaptanoglu - add new polling cut /// /// \details This cut is meant to flag event that took place while the NHit /// monitor or base current/cmos rate polling, or ping crates was going on. /// In the DAQ these events are flagged by setting the MTCA Mimic 1 threshold /// on TUBii to -5V causing it to basically trigger constantly. /// This results with the EXT-2 being set high on the MTCD. /// This cut simply looks at the TUBii trigger word and the MTCD trigger word /// and if the EXT2 is high in the MTCD and the MTCA Mimic 1 bit in the TUBii /// trigger word is set. /// /// \update (T Kaptanoglu) We now just use pedestals to cut out ping crates /// and the nhit monitor, and we've decided to use an unused bit in /// the MTC word to mark the front-end polling. Updating this cut /// accordingly, which must be run differently for different run-ranges /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_PollingCut__ #define __RAT_PollingCut__ #include #include #include namespace RAT { class PollingCut : public DataCleaningProc { public: PollingCut() : DataCleaningProc("pollingcut",1){}; virtual ~PollingCut(){}; virtual Processor::Result DSEvent(DS::Run& run, DS::Entry& ds); void BeginOfRun(DS::Run&); protected: bool fHasWarned; // keeps track if this proc has emitted warnings yet int currentRun; // the run we are processing int fRunSwitch; // the run when we switched to a new type of polling virtual Processor::Result Event(DS::Entry&, DS::EV& ev); bool PollingMarkedByTUBII(DS::EV& ev); bool PollingMarkedByMTC(DS::EV& ev); }; } // namespace RAT #endif