37 friend inline bool operator==(
const __A__& first,
const __A__& second)
39 return first.a == second.a;
49 friend inline std::ostream&
operator<<(std::ostream& out,
const __A__&
object)
51 return out <<
object.a;
64 bool inline is_equal(
const T& unity)
68 return value == unity;
78 inline void print(std::ostream& out,
const char* name)
84 out << setw(12) << left << name <<
' ' << value << endl;
87#define PRINT(OUT, CLASS) print<CLASS>(OUT, #CLASS)
124 JParser<> zap(
"Example program to test unity values of non-primitive data types.");
130 catch(
const exception &error) {
131 FATAL(error.what() << endl);
141 ASSERT(is_equal<int> (1));
142 ASSERT(is_equal<float> (1.0));
143 ASSERT(is_equal<double>(1.0));
144 ASSERT(is_equal<__A__> (__A__(1.0)));
General purpose messaging.
#define ASSERT(A,...)
Assert macro.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
void print(const TH1 &h1, std::ostream &out)
Print histogram parameters.
int main(int argc, char **argv)
#define PRINT(OUT, CLASS)
Definition of unity value for any class.
Utility class to parse command line options.
Auxiliary classes and methods for mathematical operations.
static const JUnity unity
Function object to assign unity value.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool operator==(Packet const &p, ID const &id)
::__A__ getUnity()
Get unity value.
Auxiliary class for obtaining unity values of a given data type.