21{
   24 
   26 
   27  try {
   28 
   29    JParser<> zap(
"Example program to test application history.");
 
   30 
   32 
   33    zap(argc, argv);
   34  }
   35  catch(const exception &error) {
   36    FATAL(error.what() << endl);
 
   37  }
   38 
   39 
   40  const int numberOfFits = 3;
   41 
   43 
   44  
   45 
   46  for (int i = 0; i != numberOfFits; ++i) {
   48  }
   49 
   50  
   51 
   54                              
   56 
   57  for (int i = 0; i != sizeof(application)/sizeof(int); ++i) {
   58 
   60 
   61    
   62 
   63    copy(evt.begin(), evt.end(), back_inserter(out));
 
   64 
   65    
   66 
   67    partial_sort(evt.begin(), evt.end(), evt.end(), qualitySorter);
   68 
   69    
   70 
   71    JEvt::const_iterator __end = partition(evt.begin(), evt.end(), 
JHistory::is_event(evt.begin()->getHistory()));
 
   72 
   73    for (JEvt::const_iterator fit = evt.begin(); fit != __end; ++fit) {
   75    }
   76 
   77    
   78 
   79    sort(out.begin(), out.end(), qualitySorter);
   80 
   81    
   82 
   83    evt = out;
   84  }
   85 
   86  for (size_t i = 0; i != evt.size(); ++i) {
   87    DEBUG(
"fit[" << i << 
"]" << endl << 
static_cast<const JHistory&
>(evt[i]) << endl);
 
   88  }
   89 
   90  ASSERT((
int) evt.size() == numberOfFits * (
sizeof(application)/
sizeof(
int) + 1));
 
   91 
   92  for (int i = 0; i != numberOfFits; ++i) {
   93    ASSERT(has_muon_prefit (evt[i]) && 
 
   97           has_muon_start  (evt[i]));
   98  }
   99 
  105  ASSERT( has_reconstructed_muon  (evt));
 
  107 
  109 
  110  ASSERT(has_muon_prefit (fit) && 
 
  114         has_muon_start  (fit));  
  115 
  116  return 0;
  117}
#define DEBUG(A)
Message macros.
 
#define ASSERT(A,...)
Assert macro.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
Utility class to parse command line options.
 
static const int JMUONGANDALF
 
static const int JMUONPREFIT
 
static const int JMUONSIMPLEX
 
static const int JMUONSTART
 
void copy(const Head &from, JHead &to)
Copy header from from to to.
 
JFit getFit(const int id, const JMODEL::JString &string)
Get fit parameters of string.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
bool has_muon_gandalf(const JFit &fit)
Test whether given fit has muon gandalf in history.
 
const JFit & get_best_reconstructed_muon(const JEvt &evt)
Get best reconstructed muon.
 
bool has_muon_energy(const JFit &fit)
Test whether given fit has muon energy in history.
 
bool has_reconstructed_shower(const JEvt &evt)
Test whether given event has a track with shower reconstruction.
 
bool has_muon_simplex(const JFit &fit)
Test whether given fit has muon simplex in history.
 
Auxiliary class to test history.
 
Container for historical events.
 
JHistory & add(const int type)
Add event to history.