Go to the source code of this file.
◆ main()
Example application to test comparison of objects using ROOT dictionary.
Definition at line 21 of file JRootComparator.cc.
22{
25
27
28 try {
29
31
33
35 }
36 catch(const exception &error) {
38 }
39
40
42
45 for (const auto& i : comparator) {
47 }
49 }
50
52
53 {
56
58
61
62 ASSERT(comparator(a1, a1) ==
true,
"comparison of equal objects");
63 ASSERT(comparator(a2, a2) ==
true,
"comparison of equal objects");
64 ASSERT(comparator(a1, a2) ==
false,
"comparison of different objects");
65 }
66 {
69
72
75
76 ASSERT(comparator(a1, a1) ==
true,
"comparison of equal objects");
77 ASSERT(comparator(a2, a2) ==
true,
"comparison of equal objects");
78 ASSERT(comparator(a1, a2) ==
false,
"comparison of different objects");
79 }
80 {
83
86
89
90 a1.
trks.push_back(t1);
91 a2.
trks.push_back(t2);
92
93 ASSERT(comparator(a1, a1) ==
true,
"comparison of equal objects");
94 ASSERT(comparator(a2, a2) ==
true,
"comparison of equal objects");
95 ASSERT(comparator(a1, a2) ==
false,
"comparison of different objects");
96 }
97 {
100
101 a2["aa"] = "aa";
102
103 ASSERT(comparator(a1, a1) ==
true,
"comparison of equal objects");
104 ASSERT(comparator(a2, a2) ==
true,
"comparison of equal objects");
105 ASSERT(comparator(a1, a2) ==
false,
"comparison of different objects");
106 }
107}
#define ASSERT(A,...)
Assert macro.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Template definition of a multi-dimensional oscillation probability interpolation table.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
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).
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
std::vector< int > hit_ids
list of associated hit-ids (corresponds to Hit::id).