29 JParser<> zap(
"Example program to test application history.");
35 catch(
const exception &error) {
36 FATAL(error.what() << endl);
40 const int numberOfFits = 3;
46 for (
int i = 0; i != numberOfFits; ++i) {
57 for (
int i = 0; i !=
sizeof(application)/
sizeof(
int); ++i) {
63 copy(evt.begin(), evt.end(), back_inserter(out));
67 partial_sort(evt.begin(), evt.end(), evt.end(),
qualitySorter);
71 JEvt::const_iterator __end = partition(evt.begin(), evt.end(),
JHistory::is_event(evt.begin()->getHistory()));
73 for (JEvt::const_iterator fit = evt.begin(); fit != __end; ++fit) {
86 for (
size_t i = 0; i != evt.size(); ++i) {
87 DEBUG(
"fit[" << i <<
"]" << endl <<
static_cast<const JHistory&
>(evt[i]) << endl);
90 ASSERT((
int) evt.size() == numberOfFits * (
sizeof(application)/
sizeof(
int) + 1));
92 for (
int i = 0; i != numberOfFits; ++i) {
#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.
bool qualitySorter(const JFit &first, const JFit &second)
Comparison of fit results.
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.
const JFit & get_best_reconstructed_muon(const JEvt &evt)
Get best reconstructed muon.
bool has_muon_prefit(const JFit &fit)
Test whether given fit has muon prefit in history.
bool has_muon_start(const JFit &fit)
Test whether given fit has muon start in history.
bool has_muon_simplex(const JFit &fit)
Test whether given fit has muon simplex in history.
bool has_reconstructed_track(const JEvt &evt, JTrackSelector_t selector)
Test whether given event has a track according selection.
bool has_reconstructed_muon(const JEvt &evt)
Test whether given event has a track with muon reconstruction.
Auxiliary class to test history.
Container for historical events.
JHistory & add(const int type)
Add event to history.