Functions
TrackTest.cc File Reference
#include <iostream>
#include <cassert>
#include "lardata/RecoObjects/KTrack.h"
#include "lardata/RecoObjects/KETrack.h"
#include "lardata/RecoObjects/KFitTrack.h"

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

int main ( void  )

Definition at line 13 of file TrackTest.cc.

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 }
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