// ClusterFinder.cpp #include "ClusterFinder.h" #include "ClusterFinderTest.h" #include "trfbase/ETrack.h" #include #include #include "ClusterContainer.h" using std::cout; using std::cerr; using std::endl; using std::string; int main( ) { string component = "ClusterFinder"; 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 constructor." << endl; ClusterFinderTest find(3.0); cout << find << endl; assert( find.get_surface().get_parameter(0) == 3.0 ); assert( find.get_clusters().size() == 0 ); ETrack tre( trf::SurfacePtr(new SurfTest(3.0)) ); assert( find.get_clusters(tre).size() == 0 ); assert( find.get_cluster_container(tre,0,0).get_clusters().size() == 0 ); //******************************************************************** cout << ok_prefix << "------------- All tests passed. -------------" << endl; return 0; //******************************************************************** }