KaliVeda
1.14/2
Toolkit for HIC analysis
KVConfig.h
1
#ifndef KV_CONFIG__H
2
#define KV_CONFIG__H
3
4
#include "KVMacros.h"
5
6
// These defines are passed to dependent targets using CMake target_compile_definitions,
7
// however, when compiling user's code on the kaliveda/ROOT command line with ACliC,
8
// the defines are not defined... We need to define them here.
9
#ifndef WITH_TEMPLATED_EVENTS
10
#define WITH_TEMPLATED_EVENTS
11
#endif
12
13
#ifndef USING_ROOT6
14
#define USING_ROOT6
15
#endif
16
17
#ifndef WITH_GIT_INFOS
18
#define WITH_GIT_INFOS
19
#endif
20
21
#ifndef WITH_OPENGL
22
#define WITH_OPENGL
23
#endif
24
25
#ifndef WITH_PROOF
26
#define WITH_PROOF
27
#endif
28
29
#ifndef WITH_BOOST
30
#define WITH_BOOST
31
#endif
32
33
#ifndef WITH_GNU_INSTALL
34
#define WITH_GNU_INSTALL
35
#endif
36
37
#ifndef WITH_RSQLITE
38
#define WITH_RSQLITE
39
#endif
40
41
#ifndef WITH_ZMQ
42
#define WITH_ZMQ
43
#endif
44
45
#ifndef WITH_MULTICORE_CPU
46
#define WITH_MULTICORE_CPU 8
47
#endif
48
49
50
// Info on C++ standard used to compile code
51
#if __cplusplus > 199711L
52
#define WITH_CPP11
53
#if __cplusplus > 201103L
54
#define WITH_CPP14
55
#if __cplusplus > 201402L
56
#define WITH_CPP17
57
#if __cplusplus > 201703L
58
#define WITH_CPP20
59
#if __cplusplus > 202002L
60
#define WITH_CPP23
61
#if __cplusplus > 202302L
62
#define WITH_CPP26
63
#endif
64
#endif
65
#endif
66
#endif
67
#endif
68
#endif
69
70
// macro which expands to default constructor
71
#define ROOT_DEF_CTOR(classname,basename) \
72
classname() : basename() {}
73
74
// macro which expands to constructor with name
75
#define ROOT_NAME_CTOR(classname,basename) \
76
classname(const Char_t* name) : basename(name) {}
77
78
// macro which expands to default constructor
79
#define ROOT_DEF_CTOR_WITH_INIT(classname,basename) \
80
classname() : basename() { init(); }
81
82
// macro which expands to constructor with name
83
#define ROOT_NAME_CTOR_WITH_INIT(classname,basename) \
84
classname(const Char_t* name) : basename(name) { init(); }
85
86
// macro which expands to standard ROOT assignment by copy operator definition
87
// using object's Copy(TObject&) const method
88
// place in header file as needed
89
#define ROOT_COPY_ASSIGN_OP(name) \
90
name& operator=(const name& other) \
91
{ \
92
if(this != &other) \
93
{ \
94
other.Copy(*this); \
95
} \
96
return (*this); \
97
}
98
99
// macro which expands to standard ROOT copy constructor definition
100
// using object's Copy(TObject&) const method
101
// place in header file as needed
102
#define ROOT_COPY_CTOR(classname,basename) \
103
classname(const classname& other) \
104
: basename() \
105
{ \
106
other.Copy(*this); \
107
}
108
109
// provide set of constructors (default, named, copy) & a default destructor,
110
// plus copy assignment operator
111
#define ROOT_FULL_SET(classname,basename) \
112
ROOT_DEF_CTOR(classname,basename) \
113
ROOT_NAME_CTOR(classname,basename) \
114
ROOT_COPY_CTOR(classname,basename) \
115
ROOT_COPY_ASSIGN_OP(classname)
116
117
// provide set of constructors (default, copy),
118
// plus copy assignment operator
119
#define ROOT_FULL_SET_UNNAMED(classname,basename) \
120
ROOT_DEF_CTOR(classname,basename) \
121
ROOT_COPY_CTOR(classname,basename) \
122
ROOT_COPY_ASSIGN_OP(classname)
123
124
// provide set of constructors (default, named, copy),
125
// plus copy assignment operator, default & named ctors call init()
126
#define ROOT_FULL_SET_WITH_INIT(classname,basename) \
127
ROOT_DEF_CTOR_WITH_INIT(classname,basename) \
128
ROOT_NAME_CTOR_WITH_INIT(classname,basename) \
129
ROOT_COPY_CTOR(classname,basename) \
130
ROOT_COPY_ASSIGN_OP(classname)
131
132
// avoid warnings from clang static analyzer
133
#define AUTO_NEW_CTOR(classname,ptr) \
134
auto ptr = new classname
135
136
#endif
kaliveda.doxygen
KVMultiDet
base
KVConfig.h
Generated on Wed Jul 9 2025 15:38:06 for KaliVeda by
1.9.1