//////////////////////////////////////////////////////////////////// /// \class RAT:ChannelFlagsProc /// /// \brief Check the channel flags for issues /// /// \author Tanner Kaptanoglu /// /// \details This processor loops through all hit channels and /// checks whether the channel has a error flags set /// corresponding to that channel dropping data or being /// out of sync. /// //////////////////////////////////////////////////////////////////// #ifndef __RAT__ChannelFlagsProc__ #define __RAT__ChannelFlagsProc__ #include #include #include namespace RAT { class ChannelFlagsProc : public Processor { public: ChannelFlagsProc(); virtual ~ChannelFlagsProc(){}; virtual void BeginOfRun(DS::Run&); virtual void EndOfRun(DS::Run& run); virtual void SetI(const std::string& param, const int value); virtual Processor::Result DSEvent(DS::Run&, DS::Entry& ds); virtual Processor::Result Event(DS::Entry&, DS::EV& ev); protected: // Skip counting channels, just count syncs int fFindSyncMode; // Keep track of the run ranges int fRunRangeSync16; int fRunRangeSync24; // Used to check whether the run was resyced int fEventCounter; int fResync; // Keep track of the syncs in the run int fCountSync16; int fCountSync24; int fSync16Occured; int fSync24Occured; // Keep track of channels with missed count std::vector fMissedCount; // Keep track of out of sync channels std::vector fCGTSync24; std::vector fCMOSSync16; std::vector fCGTSync24PreviousRuns; std::vector fCMOSSync16PreviousRuns; std::vector fCountAllSync16; std::vector fCountAllSync24; }; }//namespace RAT #endif