TrackTest.cc
Go to the documentation of this file.
1 //
2 // File: TrackTest.cxx
3 //
4 // Purpose: Single source executable with tests for track classes
5 //
6 
7 #include <iostream>
8 #include <cassert>
12 
13 int main()
14 {
15  // Make sure assert is enabled.
16 
17  bool assert_flag = false;
18  assert((assert_flag = true, assert_flag));
19  if ( ! assert_flag ) {
20  std::cerr << "Assert is disabled" << std::endl;
21  return 1;
22  }
23 
24  // Make some tracks.
25 
27  trkf::KETrack tre;
28  trkf::KFitTrack trf;
29 
30  // Some simple tests.
31 
32  assert(!trk.isValid());
33  assert(trf.getStat() == trkf::KFitTrack::INVALID);
34 
35  // Done (success).
36 
37  std::cout << "TrackTest: All tests passed." << std::endl;
38 
39  return 0;
40 }
int main()
Definition: TrackTest.cc:13
Basic Kalman filter track class, with error.
Basic Kalman filter track class, with fit information.
Basic Kalman filter track class, without error.
QTextStream & endl(QTextStream &s)
bool isValid() const
Test if track is valid.
Definition: KTrack.cxx:91
FitStatus getStat() const
Fit status.
Definition: KFitTrack.h:68