Jpp  debug
the software that should make you happy
Jpp.hh
Go to the documentation of this file.
1 #ifndef __JLANG__JPP__
2 #define __JLANG__JPP__
3 
4 
5 /**
6  * \file
7  *
8  * Jpp environment information.
9  *
10  * \author mdejong
11  */
12 
13 /**
14  * Name space for %KM3NeT
15  */
16 namespace KM3NET {}
17 
18 /**
19  * Name space for %Antares
20  */
21 namespace ANTARES {}
22 
23 namespace JLANG {}
24 
25 /**
26  * This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
27  */
28 namespace JPP { using namespace JLANG; }
29 
30 namespace JLANG {
31 
32  /**
33  * Get namespace.
34  *
35  * \return namespace
36  */
37  inline const char* getNamespace()
38  {
39 #define KM3NET 1
40 #define KM3NET_HIGHQE 2
41 #define ANTARES 3
42 
43 #if NAMESPACE == ANTARES
44  return "ANTARES";
45 #elif NAMESPACE == KM3NET
46  return "KM3NET";
47 #elif NAMESPACE == KM3NET_HIGHQE
48  return "KM3NET_HIGHQE";
49 #else
50  return "?";
51 #endif
52 
53 #undef KM3NET
54 #undef KM3NET_HIGHQE
55 #undef ANTARES
56  }
57 
58 
59  /**
60  * Get GIT version.
61  *
62  * \return GIT version
63  */
64  const char* getGITVersion();
65 
66 
67  /**
68  * Get GIT commit.
69  *
70  * \return GIT commit
71  */
72  const char* getGITCommit();
73 
74 
75  /**
76  * Get GIT date.
77  *
78  * \return GIT date
79  */
80  const char* getGITDate();
81 
82 
83 
84  /**
85  * Get source.
86  *
87  * \return source
88  */
89  inline const char* getSource()
90  {
91 #ifdef SOURCE
92  return SOURCE;
93 #else
94  return "?";
95 #endif
96  }
97 }
98 
99 #endif
Name space for Antares.
Definition: Jpp.hh:21
std::string getGITVersion(const std::string &tag)
Get GIT version for given GIT tag.
Auxiliary classes and methods for language specific functionality.
const char * getGITDate()
Get GIT date.
Definition: Jpp.cc:39
const char * getNamespace()
Get namespace.
Definition: Jpp.hh:37
const char * getSource()
Get source.
Definition: Jpp.hh:89
const char * getGITCommit()
Get GIT commit.
Definition: Jpp.cc:24
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Name space for KM3NeT.
Definition: Jpp.hh:16