Jpp  pmt_effective_area_update_2
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 #define KM3NET 1
33 #define ANTARES 2
34 
35  /**
36  * Get namespace.
37  *
38  * \return namespace
39  */
40  inline const char* getNamespace()
41  {
42 #if NAMESPACE == ANTARES
43  return "ANTARES";
44 #else
45  return "KM3NET";
46 #endif
47  }
48 
49 #undef KM3NET
50 #undef ANTARES
51 
52 
53  /**
54  * Get GIT version.
55  *
56  * \return GIT version
57  */
58  inline const char* getGITVersion()
59  {
60 #ifdef GIT_VERSION
61  return GIT_VERSION;
62 #else
63  return "?";
64 #endif
65  }
66 
67 
68  /**
69  * Get GIT commit.
70  *
71  * \return GIT commit
72  */
73  inline const char* getGITCommit()
74  {
75 #ifdef GIT_COMMIT
76  return GIT_COMMIT;
77 #else
78  return "?";
79 #endif
80  }
81 
82 
83  /**
84  * Get GIT date.
85  *
86  * \return GIT date
87  */
88  inline const char* getGITDate()
89  {
90 #ifdef GIT_DATE
91  return GIT_DATE;
92 #else
93  return "?";
94 #endif
95  }
96 
97 
98  /**
99  * Get source.
100  *
101  * \return source
102  */
103  inline const char* getSource()
104  {
105 #ifdef SOURCE
106  return SOURCE;
107 #else
108  return "?";
109 #endif
110  }
111 }
112 
113 #endif
#define ANTARES
Definition: Jpp.hh:33
const char * getGITCommit()
Get GIT commit.
Definition: Jpp.hh:73
const char * getGITDate()
Get GIT date.
Definition: Jpp.hh:88
std::string getNamespace(const std::string &type_name)
Get name space, i.e. part before JEEP::TYPENAME_SEPARATOR.
Definition: JeepToolkit.hh:225
#define KM3NET
Definition: Jpp.hh:32
std::string getGITVersion(const std::string &tag)
Get GIT version for given GIT tag.
const char * getSource()
Get source.
Definition: Jpp.hh:103