// Checker.h #ifndef Checker_H #define Checker_H // Abstract interface for a checker which tests an MTrack // and returns true if the track is ok. #include "trfbase/Algorithm.h" namespace trf { class MTrack; class CutRecord; class Checker : public Algorithm { private: // data // Flag to identify infinite loop. mutable bool _loop; public: // static methods // Return the type name. static TypeName get_type_name() { return "Checker"; } // Return the creator. static ObjCreator get_creator(); // Return the type. static Type get_static_type() { return get_creator(); } public: // constructor Checker(); // destructor virtual ~Checker(); // Return the generic type. // This is only needed at this level. Type get_generic_type() const { return get_static_type(); } // Check. // Default implementation calls status_with_record with a // null record. // User must override this or status_with_record. virtual bool status(const MTrack& trm) const; // Check with cut record. // Default implementation calls status. // User must override this or status_with_record. virtual bool status_with_record(const MTrack& trm, CutRecord* prec) const; }; } // end namespace trf #endif