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) {
74 out.push_back(
getFit(
JHistory(fit->getHistory()).add(application[i]), JTrack3D(), 0, 0.0));
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) {
static const int JMUONSTART
bool has_muon_gandalf(const JFit &fit)
Test whether given fit has muon gandalf in history.
bool has_reconstructed_shower(const JEvt &evt)
Test whether given event has a track with shower reconstruction.
Utility class to parse command line options.
bool has_muon_start(const JFit &fit)
Test whether given fit has muon start in history.
bool qualitySorter(const JFit &first, const JFit &second)
Comparison of fit results.
const JFit & get_best_reconstructed_muon(const JEvt &evt)
Get best reconstructed muon.
static const int JMUONPREFIT
#define ASSERT(A,...)
Assert macro.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Auxiliary class to test history.
static const int JMUONGANDALF
bool has_muon_simplex(const JFit &fit)
Test whether given fit has muon simplex in history.
JFit getFit(const int id, const JMODEL::JString &string)
Get fit parameters of string.
bool has_reconstructed_muon(const JEvt &evt)
Test whether given event has a track with muon reconstruction.
static const int JMUONSIMPLEX
void copy(const Head &from, JHead &to)
Copy header from from to to.
bool has_muon_prefit(const JFit &fit)
Test whether given fit has muon prefit in history.
bool has_reconstructed_track(const JEvt &evt, JTrackSelector_t selector)
Test whether given event has a track according selection.
bool has_muon_energy(const JFit &fit)
Test whether given fit has muon energy in history.
#define DEBUG(A)
Message macros.