// Checker.cpp #include "Checker.h" #include #include using std::cout; using std::endl; using trf::Checker; //********************************************************************** // Free functions. //********************************************************************** namespace { ObjPtr create(const ObjData& data) { return ObjPtr(0); } } //********************************************************************** // Member functions. //********************************************************************** // constructor Checker::Checker() : _loop(false) { } //********************************************************************** // destructor Checker::~Checker() { } //********************************************************************** // Return the creator. ObjCreator Checker::get_creator() { return create; } //********************************************************************** // Check with cut record. // This implementation calls status_with_record with a null record. // User should override this or status_with_record. bool Checker:: status(const MTrack& trm) const { return status_with_record(trm,0); } //********************************************************************** // Check with cut record. // This implementation calls status and ignores the record. // User should override this or status_with_record. bool Checker:: status_with_record(const MTrack& trm, CutRecord* prec) const { // Check to make sure we do not get caught in loop if user fails // to implement one of the status methods. if ( _loop ) { cout << *this << endl; assert(false); abort(); } _loop = true; int stat = status(trm); _loop = false; return stat; } //**********************************************************************