Jpp  test_elongated_shower_pde
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  inline const char* getGITVersion()
65  {
66 #ifdef GIT_VERSION
67  return GIT_VERSION;
68 #else
69  return "?";
70 #endif
71  }
72 
73 
74  /**
75  * Get GIT commit.
76  *
77  * \return GIT commit
78  */
79  inline const char* getGITCommit()
80  {
81 #ifdef GIT_COMMIT
82  return GIT_COMMIT;
83 #else
84  return "?";
85 #endif
86  }
87 
88 
89  /**
90  * Get GIT date.
91  *
92  * \return GIT date
93  */
94  inline const char* getGITDate()
95  {
96 #ifdef GIT_DATE
97  return GIT_DATE;
98 #else
99  return "?";
100 #endif
101  }
102 
103 
104  /**
105  * Get source.
106  *
107  * \return source
108  */
109  inline const char* getSource()
110  {
111 #ifdef SOURCE
112  return SOURCE;
113 #else
114  return "?";
115 #endif
116  }
117 }
118 
119 #endif
#define ANTARES
const char * getGITCommit()
Get GIT commit.
Definition: Jpp.hh:79
const char * getGITDate()
Get GIT date.
Definition: Jpp.hh:94
std::string getNamespace(const std::string &type_name)
Get name space, i.e. part before JEEP::TYPENAME_SEPARATOR.
Definition: JeepToolkit.hh:225
#define KM3NET
std::string getGITVersion(const std::string &tag)
Get GIT version for given GIT tag.
const char * getSource()
Get source.
Definition: Jpp.hh:109