30 inline void print(std::ostream& out,
const std::string& prefix,
const Trk& trk)
35 << setw(4) << trk.
id <<
' '
42 <<
FIXED(11,1) << trk.
t <<
' '
44 << setw(3) << trk.
status <<
':';
60 inline void print(std::ostream& out,
const std::string& prefix,
const Evt& evt,
const int id)
68 print(out, prefix, i);
83int main(
int argc,
char **argv)
89 JLimit_t& numberOfEvents = inputFile.getLimit();
95 JParser<> zap(
"Example program to print track fit results from Evt formatted data.");
104 catch(
const exception& error) {
105 FATAL(error.what() << endl);
111 cout <<
"event " << setw(10) << inputFile.
getCounter() << endl;
113 const Evt* evt = inputFile.
next();
119 print(cout,
"", trk);
122 for (
const auto& key : keys) {
130 for (
const Trk& i : evt->
trks) {
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
ROOT TTree parameter settings of various packages.
Utility class to parse command line options.
General purpose class for object reading from a list of file names.
virtual bool hasNext() override
Check availability of next element.
counter_type getCounter() const
Get counter.
virtual const pointer_type & next() override
Get next element.
std::ostream & print(std::ostream &out, const JTestSummary &summary, T __begin, T __end, const bool useColors=true, const JFormat_t &formatting=JFormat_t(18, 3, std::ios::fixed))
Print test summary.
array_type< JKey_t > get_keys(const std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > &data)
Method to create array of keys of map.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
JRECONSTRUCTION::JWeight getWeight
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
std::vector< Trk > trks
list of reconstructed tracks (can be several because of prefits,showers, etc).
Auxiliary data structure for floating point format specification.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
Auxiliary data structure for floating point format specification.
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
int status
MC or reconstruction status code, see km3net-dataformat/definitions/trkmembers.csv for values.
std::vector< int > rec_stages
list of identifiers of successful fitting stages resulting in this track
double t
track time [ns] (when the particle is at pos )
int rec_type
identifier of the fitting algorithm/chain/strategy, see km3net-dataformat/definitions/reconstruction....
int mother_id
id of the parent MC particle or of the reconstructed track at the previous stage
Vec pos
postion [m] of the track at time t