// HitGenerator_t.cpp #include "HitGenerator.h" #include #include #include #include "HitGeneratorTest.h" using std::cout; using std::cerr; using std::endl; using std::string; using std::vector; using namespace trf; //********************************************************************** int main( ) { string component = "HitGenerator"; string ok_prefix = component + " (I): "; string error_prefix = component + " test (E): "; cout << ok_prefix << "---------- Testing component " + component + ". ----------" << endl; // Make sure assert is enabled. bool assert_flag = false; assert ( ( assert_flag = true, assert_flag ) ); if ( ! assert_flag ) { cerr << "Assert is disabled" << endl; return 1; } //******************************************************************** cout << ok_prefix << "Test virtual methods." << endl; SurfTest stest(1.0); long seed = 1111111111; HitGeneratorTest gen(stest,seed); VTrack trv( SurfacePtr(stest.new_pure_surface()) ); cout << gen.get_surface() << endl; cout << *gen.new_cluster(trv) << endl; cout << *gen.new_cluster(trv) << endl; cout << *gen.new_cluster(trv) << endl; cout << *gen.new_cluster(trv) << endl; cout << *gen.new_cluster(trv) << endl; //******************************************************************** cout << ok_prefix << "------------- All tests passed. -------------" << endl; return 0; //******************************************************************** }