KaliVeda
Toolkit for HIC analysis
KVConfig.h
1 #ifndef KV_CONFIG__H
2 #define KV_CONFIG__H
3 
4 #include "KVMacros.h"
5 
6 // Configuration flags for current build set by options or
7 // depending on available external software
8 #define WITH_GIT_INFOS
9 #define WITH_GNU_INSTALL
10 #define WITH_GEMINI
11 #define WITH_MFM
12 #define WITH_MESYTEC
13 #define WITH_ZMQ
14 /* #undef ADD_DYN_PATH */
15 /* #undef WITH_DATAFLOW */
16 #define WITH_PROTOBUF
17 #define WITH_OPENGL
18 #define WITH_RSQLITE
19 #define WITH_FITLTG
20 #define WITH_BUILTIN_GRU
21 /* #undef CCIN2P3_XRD */
22 #define WITH_MULTICORE_CPU 8
23 #define WITH_BOOST
24 /* #undef CCIN2P3_BUILD */
25 /* #undef WITH_STD_ENABLE_IF_T */
26 #define WITH_TEMPLATED_EVENTS
27 
28 // Info on C++ standard used to compile code
29 #if __cplusplus > 199711L
30 #define WITH_CPP11
31 #if __cplusplus > 201103L
32 #define WITH_CPP14
33 #if __cplusplus > 201402L
34 #define WITH_CPP17
35 #endif
36 #endif
37 #endif
38 
39 // will be defined for all ROOT versions before 6.00
40 // Note that we may well be using ROOT5 (thus with cint/rootcint) and
41 // at the same time have C++11 compatibility, therefore WITH_CPP11
42 // does not always mean that we can liberally pepper our class declarations
43 // with exotic members - rootcint doesn't like it
44 /* #undef USING_ROOT5 */
45 
46 // will be defined for all ROOT versions from 6.00 onwards
47 #define USING_ROOT6
48 
49 // macro which expands to default constructor
50 #define ROOT_DEF_CTOR(classname,basename) \
51  classname() : basename() {}
52 
53 // macro which expands to constructor with name
54 #define ROOT_NAME_CTOR(classname,basename) \
55  classname(const Char_t* name) : basename(name) {}
56 
57 // macro which expands to default constructor
58 #define ROOT_DEF_CTOR_WITH_INIT(classname,basename) \
59  classname() : basename() { init(); }
60 
61 // macro which expands to constructor with name
62 #define ROOT_NAME_CTOR_WITH_INIT(classname,basename) \
63  classname(const Char_t* name) : basename(name) { init(); }
64 
65 // macro which expands to standard ROOT assignment by copy operator definition
66 // using object's Copy(TObject&) const method
67 // place in header file as needed
68 #define ROOT_COPY_ASSIGN_OP(name) \
69  name& operator=(const name& other) \
70  { \
71  if(this != &other) \
72  { \
73  other.Copy(*this); \
74  } \
75  return (*this); \
76  }
77 
78 // macro which expands to standard ROOT copy constructor definition
79 // using object's Copy(TObject&) const method
80 // place in header file as needed
81 #define ROOT_COPY_CTOR(classname,basename) \
82  classname(const classname& other) \
83  : basename() \
84  { \
85  other.Copy(*this); \
86  }
87 
88 // provide set of constructors (default, named, copy) & a default destructor,
89 // plus copy assignment operator
90 #define ROOT_FULL_SET(classname,basename) \
91  ROOT_DEF_CTOR(classname,basename) \
92  ROOT_NAME_CTOR(classname,basename) \
93  ROOT_COPY_CTOR(classname,basename) \
94  ROOT_COPY_ASSIGN_OP(classname)
95 
96 // provide set of constructors (default, copy),
97 // plus copy assignment operator
98 #define ROOT_FULL_SET_UNNAMED(classname,basename) \
99  ROOT_DEF_CTOR(classname,basename) \
100  ROOT_COPY_CTOR(classname,basename) \
101  ROOT_COPY_ASSIGN_OP(classname)
102 
103 // provide set of constructors (default, named, copy),
104 // plus copy assignment operator, default & named ctors call init()
105 #define ROOT_FULL_SET_WITH_INIT(classname,basename) \
106  ROOT_DEF_CTOR_WITH_INIT(classname,basename) \
107  ROOT_NAME_CTOR_WITH_INIT(classname,basename) \
108  ROOT_COPY_CTOR(classname,basename) \
109  ROOT_COPY_ASSIGN_OP(classname)
110 
111 // avoid warnings from clang static analyzer
112 #define AUTO_NEW_CTOR(classname,ptr) \
113  auto ptr = new classname
114 
115 //-----------------------------------ROOT-version dependent compiler flags
116 //-----------------------------------to handle backwards compatibility
117 //
118 // if your code uses these functionalities, beware !!
119 // backwards compatibility is not assured !
120 // some solutions are given...
121 
122 
123 //---------------------------TGButton::SetEnabled available from v5.02/00 onwards
124 //SOLUTION:
125 //Include the following lines at the beginning of the code
126 //where SetEnabled is used:
127 // #ifdef __WITHOUT_TGBUTTON_SETENABLED
128 /* #undef SetEnabled */
129 // SetState( flag ? kButtonUp : kButtonDisabled )
130 // #endif
131 //and then after the code add the following:
132 // #ifdef __WITHOUT_TGBUTTON_SETENABLED
133 // #undef SetEnabled
134 // #endif
135 //Make sure that the argument is given even for default
136 //i.e. you must have SetEnabled(kTRUE), not SetEnabled()
137 //
138 //N.B. for signals and slots such as
139 // obj->Connect("Toggled(Bool_t)", "TGTextButton", text_button, "SetEnabled(Bool_t)");
140 //you need to write your own intermediate slot which will receive
141 //the emitted signal and set the button state accordingly, as in this example:
142 //
143 // #ifdef __WITHOUT_TGBUTTON_SETENABLED
144 // void KVINDRARunSheetGUI::SetViewTreeEnabled(Bool_t on)
145 // {
146 // fViewTreeButton->SetState(on ? kButtonUp : kButtonDisabled );
147 // }
148 // #endif
149 //
150 // #ifdef __WITHOUT_TGBUTTON_SETENABLED
151 // cb->Connect("Toggled(Bool_t)", "KVINDRARunSheetGUI", this, "SetViewTreeEnabled(Bool_t)");
152 // fViewTreeButton = tb;
153 // #else
154 // cb->Connect("Toggled(Bool_t)", "TGTextButton", tb, "SetEnabled(Bool_t)");
155 // #endif
156 /* #undef __WITHOUT_TGBUTTON_SETENABLED */
157 
158 //----------------------------TMacro class available from v5.04/00 onwards
159 /* #undef __WITHOUT_TMACRO */
160 
161 //--------------------------------TSystem::FindFile available from v5.12/00 onwards
162 //SOLUTION: use static method KVBase::FindFile (same arguments and conventions)
163 /* #undef __WITHOUT_TSYSTEM_FINDFILE */
164 
165 //--------------------------------------Corrections to KVString::IsDigit & IsFloat
166 //The original KaliVeda versions of IsDigit and IsFloat were corrected
167 //in ROOT version 5.13/05. The versions in KVString correspond to these
168 //corrected versions, and should be used instead of TString for ROOT
169 //versions anterior to 5.13/05
170 //SOLUTION: use KVString instead of TString
171 /* #undef __WITH_KVSTRING_ISDIGIT */
172 /* #undef __WITH_KVSTRING_ISFLOAT */
173 
174 //--------Extended KaliVeda TString::Atoi, Atof and IsWhitespace are in TString from ROOT v5.08/00 onwards
175 //SOLUTION: use KVString instead of TString
176 /* #undef __WITH_KVSTRING_ATOI */
177 /* #undef __WITH_KVSTRING_ATOF */
178 /* #undef __WITH_KVSTRING_ISWHITESPACE */
179 
180 //-------------------------TNetSystem(const char*, Bool_t = kTRUE) exists from v5.10 onwards
181 /* #undef __WITHOUT_TNETSYSTEM_CTOR_BOOL_T */
182 
183 //-------------------------TGNumberEntry::SetNumStyle & SetNumAttr exist from v5.11.02 onwards
184 /* #undef __WITHOUT_TGNUMBERENTRY_SETNUMSTYLE */
185 /* #undef __WITHOUT_TGNUMBERENTRY_SETNUMATTR */
186 
187 //-------------------------TGComboBox::RemoveAll & Select(Int_t, Bool_t=kTRUE) exist from v5.12.00 onwards
188 /* #undef __WITHOUT_TGCOMBOBOX_REMOVEALL */
189 /* #undef __WITHOUT_TGCOMBOBOX_SELECT_BOOL_T */
190 
191 //------------------THtml::SetProductName added in v5.17.00 (? - check this)
192 /* #undef __WITHOUT_THTML_SETPRODUCTNAME */
193 
194 //------------------TRefArray ctors and AddAt modified in v5.20.00
195 /* #undef __WITH_OLD_TREFARRAY */
196 
197 //------------------------New TCollection::Print methods in v5.21.02
198 #define __WITH_NEW_TCOLLECTION_PRINT
199 
200 //------------------------TCollection::Print(wildcard,option) from v4.01.04 to v5.20.00
201 /* #undef __WITH_TCOLLECTION_PRINT_WILDCARD */
202 
203 //------------------TClonesArray::ConstructedAt method from v5.32.00 onwards
204 /* #undef __WITHOUT_TCA_CONSTRUCTED_AT */
205 
206 //--------TString::IsBin/Oct/Dec, Itoa, Ltoa etc. are in TString from ROOT v5.33.02 onwards
207 //SOLUTION: use KVString instead of TString
208 /* #undef __WITH_KVSTRING_ITOA */
209 
210 //--------Bug in TIter::operator*() before ROOT v5.34.28
211 /* #undef __WITH_TITER_BUG */
212 
213 #endif