]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/test/testDefaultDataTypes.C
Adding the new detector MFT (Antonio Uras)
[u/mrichter/AliRoot.git] / HLT / BASE / test / testDefaultDataTypes.C
CommitLineData
ad2fa36b 1// $Id$
2
3/**************************************************************************
4 * This file is property of and copyright by the ALICE HLT Project *
5 * ALICE Experiment at CERN, All rights reserved. *
6 * *
7 * Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8 * for The ALICE HLT Project. *
9 * *
10 * Permission to use, copy, modify and distribute this software and its *
11 * documentation strictly for non-commercial purposes is hereby granted *
12 * without fee, provided that the above copyright notice appears in all *
13 * copies and that both the copyright notice and this permission notice *
14 * appear in the supporting documentation. The authors make no claims *
15 * about the suitability of this software for any purpose. It is *
16 * provided "as is" without express or implied warranty. *
17 **************************************************************************/
18
19/** @file testDefaultDataTypes.C
20 @author Matthias Richter
21 @date
22 @brief Test program for default data types
23 */
24
25#include "AliHLTDataTypes.h"
26#include "AliHLTComponent.h"
27
28int main(int /*argc*/, const char** /*argv*/)
29{
30 /** multiple output data types */
31 const AliHLTComponentDataType kAliHLTMultipleDataTypeTest = {
32 sizeof(AliHLTComponentDataType),
33 {'M','U','L','T','I','P','L','E'},
34 {'P','R','I','V'}
35 };
36
37 /** data to file exchange subscriber */
38 const AliHLTComponentDataType kAliHLTDataTypeFXSCalibTest = {
39 sizeof(AliHLTComponentDataType),
40 {'F','X','S','_','C','A','L',' '},
41 {'H','L','T',' '}
42 };
43
44 /** DDL list data type */
45 const AliHLTComponentDataType kAliHLTDataTypeDDLTest = {
46 sizeof(AliHLTComponentDataType),
47 {'D','D','L','L','I','S','T',' '},
48 {'H','L','T',' '}
49 };
50
51 /** SOR data type */
52 const AliHLTComponentDataType kAliHLTDataTypeSORTest = {
53 sizeof(AliHLTComponentDataType),
54 {'S','T','A','R','T','O','F','R'},
55 {'P','R','I','V'}
56 };
57
58 /** EOR data type */
59 const AliHLTComponentDataType kAliHLTDataTypeEORTest = {
60 sizeof(AliHLTComponentDataType),
61 {'E','N','D','O','F','R','U','N'},
62 {'P','R','I','V'}
63 };
64
65 /** run type data block */
66 const AliHLTComponentDataType kAliHLTDataTypeRunTypeTest = {
67 sizeof(AliHLTComponentDataType),
68 {'R','U','N','T','Y','P','E',' '},
69 {'P','R','I','V'}
70 };
71
72 /** Event type specification */
73 const AliHLTComponentDataType kAliHLTDataTypeEventTest = {
74 sizeof(AliHLTComponentDataType),
75 {'E','V','E','N','T','T','Y','P'},
76 {'P','R','I','V'}
77 };
78
79 /** Configuration event data type */
80 const AliHLTComponentDataType kAliHLTDataTypeComConfTest = {
81 sizeof(AliHLTComponentDataType),
82 {'C','O','M','_','C','O','N','F'},
83 {'P','R','I','V'}
84 };
85
86 /** DCS value update event */
87 const AliHLTComponentDataType kAliHLTDataTypeUpdtDCSTest = {
88 sizeof(AliHLTComponentDataType),
89 {'U','P','D','T','_','D','C','S'},
90 {'P','R','I','V'}
91 };
92
93 /** RAW DDL data specification, data publisher will set type id and origin correctly */
94 const AliHLTComponentDataType kAliHLTDataTypeDDLRawTest = {
95 sizeof(AliHLTComponentDataType),
96 {'D','D','L','_','R','A','W',' '},
97 {'*','*','*','\0'}
98 };
99
100 /** ESD data specification */
101 const AliHLTComponentDataType kAliHLTDataTypeESDObjectTest = {
102 sizeof(AliHLTComponentDataType),
103 {'A','L','I','E','S','D','V','0'},
104 {'*','*','*','\0'}
105 };
106
107 /** ESD tree data specification */
108 const AliHLTComponentDataType kAliHLTDataTypeESDTreeTest = {
109 sizeof(AliHLTComponentDataType),
110 {'E','S','D','_','T','R','E','E'},
111 {'*','*','*','\0'}
112 };
113
114 /** AliRoot TreeD data specification */
115 const AliHLTComponentDataType kAliHLTDataTypeAliTreeDTest = {
116 sizeof(AliHLTComponentDataType),
117 {'A','L','I','T','R','E','E','D'},
118 {'*','*','*','\0'}
119 };
120
121 /** AliRoot TreeR data specification */
122 const AliHLTComponentDataType kAliHLTDataTypeAliTreeRTest = {
123 sizeof(AliHLTComponentDataType),
124 {'A','L','I','T','R','E','E','R'},
125 {'*','*','*','\0'}
126 };
127
128 /** 16 bit Hardware address selection data specification, origin is 'any' */
129 const AliHLTComponentDataType kAliHLTDataTypeHwAddr16Test = {
130 sizeof(AliHLTComponentDataType),
131 {'H','W','A','D','D','R','1','6'},
132 {'*','*','*','\0'}
133 };
134
135 /** Event statistics */
136 const AliHLTComponentDataType kAliHLTDataTypeEventStatisticsTest = {
137 sizeof(AliHLTComponentDataType),
138 {'E','V','_','S','T','A','T','I'},
139 {'*','*','*','\0'}
140 };
141
142 /** Event summary */
143 const AliHLTComponentDataType kAliHLTDataTypeEventSummaryTest = {
144 sizeof(AliHLTComponentDataType),
145 {'E','V','_','S','U','M','M','A'},
146 {'H','L','T',' '}
147 };
148
149 /** Run statistics */
150 const AliHLTComponentDataType kAliHLTDataTypeRunStatisticsTest = {
151 sizeof(AliHLTComponentDataType),
152 {'R','U','N','S','T','A','T','I'},
153 {'*','*','*','\0'}
154 };
155
156 /** Run summary */
157 const AliHLTComponentDataType kAliHLTDataTypeRunSummaryTest = {
158 sizeof(AliHLTComponentDataType),
159 {'R','U','N','S','U','M','M','A'},
160 {'H','L','T',' '}
161 };
162
163 /** Component statistics */
164 const AliHLTComponentDataType kAliHLTDataTypeComponentStatisticsTest = {
165 sizeof(AliHLTComponentDataType),
166 {'C','O','M','P','S','T','A','T'},
167 {'P','R','I','V'}
168 };
169
170 /** Component table */
171 const AliHLTComponentDataType kAliHLTDataTypeComponentTableTest = {
172 sizeof(AliHLTComponentDataType),
173 {'C','O','M','P','T','A','B','L'},
174 {'P','R','I','V'}
175 };
176
177 /** general ROOT TObject */
178 const AliHLTComponentDataType kAliHLTDataTypeTObjectTest = {
179 sizeof(AliHLTComponentDataType),
180 {'R','O','O','T','T','O','B','J'},
181 {'*','*','*','\0'}
182 };
183
184 /** ROOT TObjArray */
185 const AliHLTComponentDataType kAliHLTDataTypeTObjArrayTest = {
186 sizeof(AliHLTComponentDataType),
187 {'R','O','O','T','O','B','A','R'},
188 {'*','*','*','\0'}
189 };
190
191 /** ROOT TTree */
192 const AliHLTComponentDataType kAliHLTDataTypeTTreeTest = {
193 sizeof(AliHLTComponentDataType),
194 {'R','O','O','T','T','R','E','E'},
195 {'*','*','*','\0'}
196 };
197
198 /** ROOT TH1 (can be used for all histograms, they derive from TH1) */
199 const AliHLTComponentDataType kAliHLTDataTypeHistogramTest = {
200 sizeof(AliHLTComponentDataType),
201 {'R','O','O','T','H','I','S','T'},
202 {'*','*','*','\0'}
203 };
204
205 /** ROOT TNtuple */
206 const AliHLTComponentDataType kAliHLTDataTypeTNtupleTest = {
207 sizeof(AliHLTComponentDataType),
208 {'R','O','O','T','T','U','P','L'},
209 {'*','*','*','\0'}
210 };
211
212 ////////////////////////
213
214
215 if (kAliHLTMultipleDataTypeTest!=kAliHLTMultipleDataType) {
216 cerr << "missmatch comparing kAliHLTMultipleDataType: ";
217 cerr << AliHLTComponent::DataType2Text(kAliHLTMultipleDataType).c_str() << " vs. ";
218 cerr << AliHLTComponent::DataType2Text(kAliHLTMultipleDataTypeTest).c_str() << endl;
219 return -1;
220 }
221
222 if (kAliHLTDataTypeFXSCalibTest!=kAliHLTDataTypeFXSCalib) {
223 cerr << "missmatch comparing kAliHLTDataTypeFXSCalib: ";
224 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeFXSCalib).c_str() << " vs. ";
225 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeFXSCalibTest).c_str() << endl;
226 return -1;
227 }
228
229 if (kAliHLTDataTypeDDLTest!=kAliHLTDataTypeDDL) {
230 cerr << "missmatch comparing kAliHLTDataTypeDDL: ";
231 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeDDL).c_str() << " vs. ";
232 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeDDLTest).c_str() << endl;
233 return -1;
234 }
235
236 if (kAliHLTDataTypeSORTest!=kAliHLTDataTypeSOR) {
237 cerr << "missmatch comparing kAliHLTDataTypeSOR: ";
238 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeSOR).c_str() << " vs. ";
239 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeSORTest).c_str() << endl;
240 return -1;
241 }
242
243 if (kAliHLTDataTypeEORTest!=kAliHLTDataTypeEOR) {
244 cerr << "missmatch comparing kAliHLTDataTypeEOR: ";
245 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeEOR).c_str() << " vs. ";
246 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeEORTest).c_str() << endl;
247 return -1;
248 }
249
250 if (kAliHLTDataTypeRunTypeTest!=kAliHLTDataTypeRunType) {
251 cerr << "missmatch comparing kAliHLTDataTypeRunType: ";
252 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeRunType).c_str() << " vs. ";
253 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeRunTypeTest).c_str() << endl;
254 return -1;
255 }
256
257 if (kAliHLTDataTypeEventTest!=kAliHLTDataTypeEvent) {
258 cerr << "missmatch comparing kAliHLTDataTypeEvent: ";
259 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeEvent).c_str() << " vs. ";
260 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeEventTest).c_str() << endl;
261 return -1;
262 }
263
264 if (kAliHLTDataTypeComConfTest!=kAliHLTDataTypeComConf) {
265 cerr << "missmatch comparing kAliHLTDataTypeComConf: ";
266 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeComConf).c_str() << " vs. ";
267 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeComConfTest).c_str() << endl;
268 return -1;
269 }
270
271 if (kAliHLTDataTypeUpdtDCSTest!=kAliHLTDataTypeUpdtDCS) {
272 cerr << "missmatch comparing kAliHLTDataTypeUpdtDCS: ";
273 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeUpdtDCS).c_str() << " vs. ";
274 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeUpdtDCSTest).c_str() << endl;
275 return -1;
276 }
277
278 /*, data publisher will set type id and origin correctly */
279 if (kAliHLTDataTypeDDLRawTest!=kAliHLTDataTypeDDLRaw) {
280 cerr << "missmatch comparing kAliHLTDataTypeDDLRaw: ";
281 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeDDLRaw).c_str() << " vs. ";
282 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeDDLRawTest).c_str() << endl;
283 return -1;
284 }
285
286 if (kAliHLTDataTypeESDObjectTest!=kAliHLTDataTypeESDObject) {
287 cerr << "missmatch comparing kAliHLTDataTypeESDObject: ";
288 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeESDObject).c_str() << " vs. ";
289 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeESDObjectTest).c_str() << endl;
290 return -1;
291 }
292
293 if (kAliHLTDataTypeESDTreeTest!=kAliHLTDataTypeESDTree) {
294 cerr << "missmatch comparing kAliHLTDataTypeESDTree: ";
295 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeESDTree).c_str() << " vs. ";
296 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeESDTreeTest).c_str() << endl;
297 return -1;
298 }
299
300 if (kAliHLTDataTypeAliTreeDTest!=kAliHLTDataTypeAliTreeD) {
301 cerr << "missmatch comparing kAliHLTDataTypeAliTreeD: ";
302 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeAliTreeD).c_str() << " vs. ";
303 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeAliTreeDTest).c_str() << endl;
304 return -1;
305 }
306
307 if (kAliHLTDataTypeAliTreeRTest!=kAliHLTDataTypeAliTreeR) {
308 cerr << "missmatch comparing kAliHLTDataTypeAliTreeR: ";
309 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeAliTreeR).c_str() << " vs. ";
310 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeAliTreeRTest).c_str() << endl;
311 return -1;
312 }
313
314 /*, origin is 'any' */
315 if (kAliHLTDataTypeHwAddr16Test!=kAliHLTDataTypeHwAddr16) {
316 cerr << "missmatch comparing kAliHLTDataTypeHwAddr16: ";
317 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeHwAddr16).c_str() << " vs. ";
318 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeHwAddr16Test).c_str() << endl;
319 return -1;
320 }
321
322 if (kAliHLTDataTypeEventStatisticsTest!=kAliHLTDataTypeEventStatistics) {
323 cerr << "missmatch comparing kAliHLTDataTypeEventStatistics: ";
324 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeEventStatistics).c_str() << " vs. ";
325 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeEventStatisticsTest).c_str() << endl;
326 return -1;
327 }
328
329 if (kAliHLTDataTypeEventSummaryTest!=kAliHLTDataTypeEventSummary) {
330 cerr << "missmatch comparing kAliHLTDataTypeEventSummary: ";
331 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeEventSummary).c_str() << " vs. ";
332 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeEventSummaryTest).c_str() << endl;
333 return -1;
334 }
335
336 if (kAliHLTDataTypeRunStatisticsTest!=kAliHLTDataTypeRunStatistics) {
337 cerr << "missmatch comparing kAliHLTDataTypeRunStatistics: ";
338 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeRunStatistics).c_str() << " vs. ";
339 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeRunStatisticsTest).c_str() << endl;
340 return -1;
341 }
342
343 if (kAliHLTDataTypeRunSummaryTest!=kAliHLTDataTypeRunSummary) {
344 cerr << "missmatch comparing kAliHLTDataTypeRunSummary: ";
345 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeRunSummary).c_str() << " vs. ";
346 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeRunSummaryTest).c_str() << endl;
347 return -1;
348 }
349
350 if (kAliHLTDataTypeComponentStatisticsTest!=kAliHLTDataTypeComponentStatistics) {
351 cerr << "missmatch comparing kAliHLTDataTypeComponentStatistics: ";
352 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeComponentStatistics).c_str() << " vs. ";
353 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeComponentStatisticsTest).c_str() << endl;
354 return -1;
355 }
356
357 if (kAliHLTDataTypeComponentTableTest!=kAliHLTDataTypeComponentTable) {
358 cerr << "missmatch comparing kAliHLTDataTypeComponentTable: ";
359 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeComponentTable).c_str() << " vs. ";
360 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeComponentTableTest).c_str() << endl;
361 return -1;
362 }
363
364 if (kAliHLTDataTypeTObjectTest!=kAliHLTDataTypeTObject) {
365 cerr << "missmatch comparing kAliHLTDataTypeTObject: ";
366 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeTObject).c_str() << " vs. ";
367 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeTObjectTest).c_str() << endl;
368 return -1;
369 }
370
371 if (kAliHLTDataTypeTObjArrayTest!=kAliHLTDataTypeTObjArray) {
372 cerr << "missmatch comparing kAliHLTDataTypeTObjArray: ";
373 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeTObjArray).c_str() << " vs. ";
374 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeTObjArrayTest).c_str() << endl;
375 return -1;
376 }
377
378 if (kAliHLTDataTypeTTreeTest!=kAliHLTDataTypeTTree) {
379 cerr << "missmatch comparing kAliHLTDataTypeTTree: ";
380 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeTTree).c_str() << " vs. ";
381 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeTTreeTest).c_str() << endl;
382 return -1;
383 }
384
385 if (kAliHLTDataTypeHistogramTest!=kAliHLTDataTypeHistogram) {
386 cerr << "missmatch comparing kAliHLTDataTypeHistogram: ";
387 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeHistogram).c_str() << " vs. ";
388 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeHistogramTest).c_str() << endl;
389 return -1;
390 }
391
392 if (kAliHLTDataTypeTNtupleTest!=kAliHLTDataTypeTNtuple) {
393 cerr << "missmatch comparing kAliHLTDataTypeTNtuple: ";
394 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeTNtuple).c_str() << " vs. ";
395 cerr << AliHLTComponent::DataType2Text(kAliHLTDataTypeTNtupleTest).c_str() << endl;
396 return -1;
397 }
398
399 return 0;
400}