]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/MUON/AliHLTMUONUtils.h
TOF preprocessor behaviour modified when trying to compute online delays with not...
[u/mrichter/AliRoot.git] / HLT / MUON / AliHLTMUONUtils.h
CommitLineData
26a4668d 1#ifndef ALIHLTMUONUTILS_H
2#define ALIHLTMUONUTILS_H
3/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
6253e09b 8///
9/// @file AliHLTMUONUtils.h
10/// @author Artur Szostak <artursz@iafrica.com>
dba14d7d 11/// @date 17 May 2007
6253e09b 12/// @brief Class containing various dimuon HLT utility routines and macros.
13///
26a4668d 14
33b1e2f2 15#include "TObject.h"
c8ec7c7e 16#include "AliHLTMUONDataTypes.h"
878cb83d 17#include <ostream>
c8ec7c7e 18
19// Forward declare structures.
20extern "C" {
90a74d7a 21struct AliHLTMUONTriggerRecordStruct;
c8ec7c7e 22struct AliHLTMUONTriggerRecordsBlockStruct;
dba14d7d 23struct AliHLTMUONTrigRecInfoStruct;
c8ec7c7e 24struct AliHLTMUONTrigRecsDebugBlockStruct;
a090ff22 25struct AliHLTMUONRecHitStruct;
c8ec7c7e 26struct AliHLTMUONRecHitsBlockStruct;
dba14d7d 27struct AliHLTMUONClusterStruct;
c8ec7c7e 28struct AliHLTMUONClustersBlockStruct;
dba14d7d 29struct AliHLTMUONChannelStruct;
c8ec7c7e 30struct AliHLTMUONChannelsBlockStruct;
90a74d7a 31struct AliHLTMUONMansoTrackStruct;
32struct AliHLTMUONMansoTracksBlockStruct;
dba14d7d 33struct AliHLTMUONMansoCandidateStruct;
90a74d7a 34struct AliHLTMUONMansoCandidatesBlockStruct;
35struct AliHLTMUONTrackDecisionStruct;
36struct AliHLTMUONSinglesDecisionBlockStruct;
37struct AliHLTMUONPairDecisionStruct;
38struct AliHLTMUONPairsDecisionBlockStruct;
c8ec7c7e 39} // extern "C"
26a4668d 40
41/**
42 * AliHLTMUONUtils contains arbitrary utility methods to be used in various
43 * parts of the dimuon HLT system.
44 * These include methods to perform basic sanity checks on the integrity of
45 * data blocks.
46 */
47class AliHLTMUONUtils
48{
49public:
b727f838 50 /**
51 * This packs the given parameters into the bits of a word appropriate
52 * for AliHLTMUONTriggerRecordStruct::fFlags.
53 * @param sign The particle sign.
54 * @param hitset Flags to indicate if the corresponding fHits[i] elements
55 * was set/filled.
56 * @return Returns the 32 bit packed word.
57 */
58 static AliHLTUInt32_t PackTriggerRecordFlags(
e6357f88 59 AliHLTMUONParticleSign sign, const bool hitset[4]
b727f838 60 );
61
62 /**
63 * This unpacks the AliHLTMUONTriggerRecordStruct::fFlags bits into
64 * its component fields.
65 * @param flags The flags from an AliHLTMUONTriggerRecordStruct structure.
66 * @param sign Sets this to the particle sign.
67 * @param hitset Sets the array elements to indicate if the corresponding
68 * fHits[i] element was set/filled.
69 */
70 static void UnpackTriggerRecordFlags(
71 AliHLTUInt32_t flags, // [in]
72 AliHLTMUONParticleSign& sign, // [out]
73 bool hitset[4] // [out]
74 );
a090ff22 75
76 /**
77 * This packs the given parameters into the bits of a word appropriate
78 * for AliHLTMUONRecHitStruct::fFlags.
79 * @param chamber The chamber number in the range [0..13].
80 * @param detElemId Detector element ID number.
81 * @return Returns the 32 bit packed word.
82 */
83 static AliHLTUInt32_t PackRecHitFlags(
84 AliHLTUInt8_t chamber, AliHLTUInt16_t detElemId
85 );
86
87 /**
88 * This unpacks the AliHLTMUONRecHitStruct::fFlags bits into
89 * its component fields.
90 * [in] @param flags The flags from an AliHLTMUONRecHitStruct structure.
91 * [out] @param chamber Sets the chamber number in the range [0..13].
92 * [out] @param detElemId Sets the detector element ID number.
93 */
94 static void UnpackRecHitFlags(
95 AliHLTUInt32_t flags, // [in]
96 AliHLTUInt8_t& chamber, // [out]
97 AliHLTUInt16_t& detElemId // [out]
98 );
b727f838 99
100 /**
101 * This packs the given parameters into the bits of a word appropriate
102 * for AliHLTMUONMansoTrackStruct::fFlags.
103 * @param sign The particle sign.
104 * @param hitset Flags to indicate if the corresponding fHits[i] elements
105 * was set/filled.
106 * @return Returns the 32 bit packed word.
107 */
108 static AliHLTUInt32_t PackMansoTrackFlags(
e6357f88 109 AliHLTMUONParticleSign sign, const bool hitset[4]
b727f838 110 )
111 {
112 return PackTriggerRecordFlags(sign, hitset);
113 }
114
115 /**
116 * This unpacks the AliHLTMUONMansoTrackStruct::fFlags bits into
117 * its component fields.
118 * @param flags The flags from an AliHLTMUONMansoTrackStruct structure.
119 * @param sign Sets this to the particle sign.
120 * @param hitset Sets the array elements to indicate if the corresponding
121 * fHits[i] element was set/filled.
122 */
123 static void UnpackMansoTrackFlags(
124 AliHLTUInt32_t flags, // [in]
125 AliHLTMUONParticleSign& sign, // [out]
126 bool hitset[4] // [out]
127 )
128 {
129 UnpackTriggerRecordFlags(flags, sign, hitset);
130 }
90a74d7a 131
132 /**
133 * This packs the given parameters into the bits of a word appropriate
134 * for AliHLTMUONTrackDecisionStruct::fTriggerBits.
135 * @param highPt Has the track passed the high pt cut.
136 * @param lowPt Has the track passed the low pt cut.
137 * @return Returns the 32 bit packed word.
138 */
139 static AliHLTUInt32_t PackTrackDecisionBits(bool highPt, bool lowPt);
140
141 /**
142 * This unpacks the AliHLTMUONTrackDecisionStruct::fTriggerBits bits into
143 * its component fields.
144 * @param bits The trigger bits from an AliHLTMUONTrackDecisionStruct
145 * structure.
146 * @param highPt Sets this to the value of the high pt cut bit.
147 * @param lowPt Sets this to the value of the low pt cut bit.
148 */
149 static void UnpackTrackDecisionBits(
150 AliHLTUInt32_t bits, // [in]
151 bool& highPt, // [out]
152 bool& lowPt // [out]
153 );
154
155 /**
156 * This packs the given parameters into the bits of a word appropriate
157 * for AliHLTMUONPairDecisionStruct::fTriggerBits.
158 *
159 * @param highMass Has the track pair passed the high invariant mass cut.
160 * @param lowMass Has the track pair passed the low invariant mass cut.
161 * @param unlike Does the track pair have unlike signs.
162 * @param highPtCount The number of tracks that passed the high pt cut
163 * in the pair.
164 * @param lowPtCount The number of tracks that passed the low pt cut
165 * in the pair.
166 * @return Returns the 32 bit packed word.
167 *
168 * Note: Must have highPtCount + lowPtCount <= 2 and unlike == true if
169 * highMass or lowMass is true.
170 */
171 static AliHLTUInt32_t PackPairDecisionBits(
172 bool highMass, bool lowMass, bool unlike,
173 AliHLTUInt8_t highPtCount, AliHLTUInt8_t lowPtCount
174 );
175
176 /**
177 * This unpacks the AliHLTMUONPairDecisionStruct::fTriggerBits bits into
178 * its component fields.
179 * @param bits The trigger bits from an AliHLTMUONPairDecisionStruct
180 * structure.
181 * @param highMass Sets this to the value of the high invariant mass cut bit.
182 * @param lowMass Sets this to the value of the low invariant mass cut bit.
183 * @param unlike Sets this if the pair is unlike sign.
184 * @param highPtCount Sets this to the high pt count bits.
185 * @param lowPtCount Sets this to the low pt count bits.
186 */
187 static void UnpackPairDecisionBits(
188 AliHLTUInt32_t bits, // [in]
189 bool& highMass, // [out]
190 bool& lowMass, // [out]
191 bool& unlike, // [out]
192 AliHLTUInt8_t& highPtCount, // [out]
193 AliHLTUInt8_t& lowPtCount // [out]
194 );
e6357f88 195
196 /**
197 * This packs the given parameters into the 32bit Pub/Sub specification
198 * word in the data block descriptor.
199 *
200 * @param ddl The list of DDLs forming part of the readout. ddl[0]
201 * indicates DDL number 2560, ddl[1] is for DDL 2561 and so
202 * on up to ddl[19]. ddl[20] and ddl[21] will be for the
203 * trigger DDLs 2816 and 2817 respectively.
204 * @return Returns the 32 bit packed specification word.
205 */
206 static AliHLTUInt32_t PackSpecBits(
207 const bool ddl[22]
208 );
209
210 /**
211 * This unpacks the AliHLTMUONPairDecisionStruct::fTriggerBits bits into
212 * its component fields.
213 * @param bits The Pub/Sub specification word from a data block descriptor.
214 * @param ddl The output list of DDLs forming part of the readout. ddl[0]
215 * indicates DDL number 2560, ddl[1] is for DDL 2561 and so
216 * on up to ddl[19]. ddl[20] and ddl[21] will be for the
217 * trigger DDLs 2816 and 2817 respectively.
218 */
219 static void UnpackSpecBits(
220 AliHLTUInt32_t bits, // [in]
221 bool ddl[22] // [out]
222 );
26a4668d 223
86b774d9 224 /**
225 * This method converts the DDL number for the muon spectrometer in the
226 * range [0..21] to the equipment ID number.
227 * @param ddlNo The DDL number in the range [0..21].
228 * @return Returns the equipment ID number or -1 if ddlNo was invalid.
229 */
230 static AliHLTInt32_t DDLNumberToEquipId(AliHLTInt32_t ddlNo);
231
232 /**
233 * This method converts the equipment ID number for a muon spectrometer
234 * DDL to the DDL number in the range [0..21].
235 * @param id The equipment ID of the DDL.
236 * @return Returns the DDL number in the range [0..21] or -1 if the
237 * equipment ID was invalid.
238 */
239 static AliHLTInt32_t EquipIdToDDLNumber(AliHLTInt32_t id);
240
241 /**
242 * This method converts a 32 bit data block specification for a MUON-HLT
243 * data block into its corresponding DDL equipment ID number.
244 * It is assumed that the specification is for a data block comming from
245 * a single DDL source. If more than one DDL contributed to the data block
246 * then -1 is returned.
247 * @param spec The 32 bit specification for a data block.
248 * @return Returns the equipment ID corresponding to the specification
249 * or -1 if the specification was invalid.
250 */
251 static AliHLTInt32_t SpecToEquipId(AliHLTUInt32_t spec);
252
253 /**
254 * This method converts a equipment ID number for a DDL into its corresponding
255 * 32 bit data block specification for the MUON-HLT.
256 * @param id The equipment ID number of the DDL.
257 * @return Returns the 32 bit data block specification or 0x0 if the
258 * equipment ID was invalid.
259 */
260 static AliHLTUInt32_t EquipIdToSpec(AliHLTInt32_t id);
261
262 /**
263 * This method converts a 32 bit data block specification for a MUON-HLT
264 * data block into its corresponding DDL number in the range [0..21].
265 * It is assumed that the specification is for a data block comming from
266 * a single DDL source. If more than one DDL contributed to the data block
267 * then -1 is returned.
268 * @param spec The 32 bit specification for a data block.
269 * @return Returns the corresponding DDL number for the specification
270 * or -1 if the specification was invalid.
271 */
272 static AliHLTInt32_t SpecToDDLNumber(AliHLTUInt32_t spec);
273
274 /**
275 * This method converts a DDL number in the range [0..21] into its
276 * corresponding 32 bit data block specification for the MUON-HLT.
277 * @param ddlNo The equipment ID number of the DDL.
278 * @return Returns the 32 bit data block specification or 0x0 if the
279 * DDL number was invalid (out of range).
280 */
281 static AliHLTUInt32_t DDLNumberToSpec(AliHLTInt32_t ddlNo);
282
668eee9f 283 /**
284 * Returns true if the given specification was for a single trigger DDL.
285 */
286 static bool IsTriggerDDL(AliHLTUInt32_t spec)
287 {
288 AliHLTInt32_t ddl = SpecToDDLNumber(spec);
289 return (20 <= ddl and ddl <= 21);
290 }
291
292 /**
293 * Returns true if the given specification was for a single tracker DDL.
294 */
295 static bool IsTrackerDDL(AliHLTUInt32_t spec)
296 {
297 AliHLTInt32_t ddl = SpecToDDLNumber(spec);
298 return (0 <= ddl and ddl <= 19);
299 }
dba14d7d 300
301 /**
302 * Returns true if the given specification is in principle valid.
303 * It checks if the bits that should be zero are indeed zero.
304 */
305 static bool IsSpecValid(AliHLTUInt32_t spec)
306 {
307 AliHLTUInt32_t mask = ~((1 << 22) - 1); // First 22 bits indicate DDL number.
308 return (spec & mask) == 0x0;
309 }
310
311 /**
312 * Returns true if the data specification indicates the data block contains
313 * information generated from a trigger DDL or data fragments thereof.
314 */
315 static bool ContainsDataFromTrigger(AliHLTUInt32_t spec)
316 {
317 AliHLTUInt32_t mask = ((1 << 22) - 1) & ~((1 << 20) - 1);
318 return (spec & mask) != 0x0;
319 }
320
321 /**
322 * Returns true if the data specification indicates the data block contains
323 * information generated from a tracker DDL or data fragments thereof.
324 */
325 static bool ContainsDataFromTracker(AliHLTUInt32_t spec)
326 {
327 AliHLTUInt32_t mask = ((1 << 20) - 1);
328 return (spec & mask) != 0x0;
329 }
f68b4e0e 330
331 /**
887a669c 332 * Parses the string containing the type name of a dHLT data block and
333 * returns the corresponding AliHLTMUONDataBlockType value.
334 * \param type The string containing the type name.
335 * \returns The data block type or kUnknownDataBlock if the type name
336 * is invalid.
337 */
f68b4e0e 338 static AliHLTMUONDataBlockType ParseCommandLineTypeString(const char* type);
dba14d7d 339
887a669c 340 /**
341 * Converts a type ID to a type string to be used for the dHLT FilePublisher
342 * component configuration parameters for example.
343 */
344 static const char* DataBlockTypeToString(AliHLTMUONDataBlockType type);
345
698c9498 346 /**
347 * These codes indicate the reason why a data block failed its
348 * validity check.
349 */
350 enum WhyNotValid
351 {
878cb83d 352 kNoReason, ///< There was no reason for failure.
353 kHeaderContainsWrongType, ///< The common header contains an incorrect type ID.
354 kHeaderContainsWrongRecordWidth, ///< The common header contains an incorrect data record width.
dba14d7d 355 kInvalidIdValue, ///< The structure identifier does not have a valid value.
356 kInvalidTriggerIdValue, ///< The trigger structure identifier does not have a valid value.
357 kInvalidTrackIdValue, ///< The track structure identifier does not have a valid value.
878cb83d 358 kReservedBitsNotZero, ///< Reserved bits have not been set to zero.
359 kParticleSignBitsNotValid, ///< The particle sign bits are not a valid value.
360 kHitNotMarkedAsNil, ///< A hit was marked as not found, but the corresponding hit structure was not set to nil.
dba14d7d 361 kInvalidDetElementNumber, ///< An invalid detector element ID was found.
a090ff22 362 kInvalidChamberNumber, ///< An invalid chamber number was found.
dba14d7d 363 kHitIsNil, ///< The hit cannot be set to a nil value.
66622a82 364 kInvalidChannelCountB, ///< The number of channels in the bending plane indicated is zero or outside the valid range.
365 kInvalidChannelCountNB, ///< The number of channels in the non-bending plane indicated is zero or outside the valid range.
366 kInvalidChargeB, ///< The charge for the bending plane does not have a valid value.
367 kInvalidChargeNB, ///< The charge for the non-bending plane does not have a valid value.
dba14d7d 368 kInvalidBusPatchId, ///< The bus patch ID is outside the valid range.
369 kInvalidManuId, ///< The MANU ID is outside the valid range.
370 kInvalidChannelAddress, ///< The MANU channel address is outside the valid range.
371 kInvalidSignal, ///< The ADC signal value is outside the valid range.
372 kDataWordDifferent, ///< The raw data word is different from the unpacked values.
373 kChiSquareInvalid, ///< The chi squared value must be a positive value or -1 indicating a fitting error.
374 kMomentumVectorNotZero, ///< The chi sqaured value is set to -1, but momentum vector not zero.
375 kRoiRadiusInvalid, ///< The region of interest radius is invalid.
376 kHitNotWithinRoi, ///< A tracks hit is not within the corresponding region of interest.
878cb83d 377 kPtValueNotValid, ///< The pT value is not positive nor -1 indicating an invalid value.
878cb83d 378 kPairTrackIdsAreIdentical, ///< The track IDs of the track pair are identical.
379 kMassValueNotValid, ///< The invariant mass value is not positive nor -1 indicating an invalid value.
380 kLowPtCountInvalid, ///< The low pT trigger count is greater than 2, which is invalid.
dba14d7d 381 kHighPtCountInvalid, ///< The high pT trigger count is greater than 2, which is invalid.
382 kFoundDuplicateIDs, ///< Found duplicate identifiers, but they should all be unique.
383 kFoundDuplicateHits, ///< Found duplicate hits.
384 kFoundDuplicateTriggers ///< Found duplicate trigger decisions.
698c9498 385 };
878cb83d 386
387 /**
388 * This method converts the WhyNotValid enumeration to a string representation.
389 */
390 static const char* FailureReasonToString(WhyNotValid reason);
391
392 /**
393 * This method returns a string containing a user readable message explaining
394 * the reason for failure described by the WhyNotValid enumeration.
395 */
396 static const char* FailureReasonToMessage(WhyNotValid reason);
698c9498 397
dba14d7d 398 /**
399 * Method used to check if the header information corresponds to the
400 * supposed type of the trigger records data block.
401 * This method will return either kHeaderContainsWrongType or
402 * kHeaderContainsWrongRecordWidth as the reason code.
403 * [in] \param block The data block to check.
404 * [out] \param reason If this is not NULL, then the variable pointed to
405 * by this pointer will be filled with the reason code describing why
406 * the header is not valid, if and only if a problem is found with
407 * the data.
408 * \returns true if there is no problem with the header and false otherwise.
409 */
410 static bool HeaderOk(const AliHLTMUONTriggerRecordsBlockStruct& block, WhyNotValid* reason = NULL)
411 {
412 AliHLTUInt32_t count = 1;
413 return HeaderOk(block, reason, count);
414 }
415
416 /**
417 * Method used to check if the header information corresponds to the
418 * supposed type of the trigger debug information data block.
419 * This method will return either kHeaderContainsWrongType or
420 * kHeaderContainsWrongRecordWidth as the reason code.
421 * [in] \param block The data block to check.
422 * [out] \param reason If this is not NULL, then the variable pointed to
423 * by this pointer will be filled with the reason code describing why
424 * the header is not valid, if and only if a problem is found with
425 * the data.
426 * \returns true if there is no problem with the header and false otherwise.
427 */
428 static bool HeaderOk(const AliHLTMUONTrigRecsDebugBlockStruct& block, WhyNotValid* reason = NULL)
429 {
430 AliHLTUInt32_t count = 1;
431 return HeaderOk(block, reason, count);
432 }
433
dba14d7d 434 /**
435 * Method used to check if the header information corresponds to the
436 * supposed type of the reconstructed hits data block.
437 * This method will return either kHeaderContainsWrongType or
438 * kHeaderContainsWrongRecordWidth as the reason code.
439 * [in] \param block The data block to check.
440 * [out] \param reason If this is not NULL, then the variable pointed to
441 * by this pointer will be filled with the reason code describing why
442 * the header is not valid, if and only if a problem is found with
443 * the data.
444 * \returns true if there is no problem with the header and false otherwise.
445 */
446 static bool HeaderOk(const AliHLTMUONRecHitsBlockStruct& block, WhyNotValid* reason = NULL)
447 {
448 AliHLTUInt32_t count = 1;
449 return HeaderOk(block, reason, count);
450 }
451
452 /**
453 * Method used to check if the header information corresponds to the
454 * supposed type of the clusters data block.
455 * This method will return either kHeaderContainsWrongType or
456 * kHeaderContainsWrongRecordWidth as the reason code.
457 * [in] \param block The data block to check.
458 * [out] \param reason If this is not NULL, then the variable pointed to
459 * by this pointer will be filled with the reason code describing why
460 * the header is not valid, if and only if a problem is found with
461 * the data.
462 * \returns true if there is no problem with the header and false otherwise.
463 */
464 static bool HeaderOk(const AliHLTMUONClustersBlockStruct& block, WhyNotValid* reason = NULL)
465 {
466 AliHLTUInt32_t count = 1;
467 return HeaderOk(block, reason, count);
468 }
469
470 /**
471 * Method used to check if the header information corresponds to the
472 * supposed type of the channels data block.
473 * This method will return either kHeaderContainsWrongType or
474 * kHeaderContainsWrongRecordWidth as the reason code.
475 * [in] \param block The data block to check.
476 * [out] \param reason If this is not NULL, then the variable pointed to
477 * by this pointer will be filled with the reason code describing why
478 * the header is not valid, if and only if a problem is found with
479 * the data.
480 * \returns true if there is no problem with the header and false otherwise.
481 */
482 static bool HeaderOk(const AliHLTMUONChannelsBlockStruct& block, WhyNotValid* reason = NULL)
483 {
484 AliHLTUInt32_t count = 1;
485 return HeaderOk(block, reason, count);
486 }
487
488 /**
489 * Method used to check if the header information corresponds to the
490 * supposed type of the Manso tracks data block.
491 * This method will return either kHeaderContainsWrongType or
492 * kHeaderContainsWrongRecordWidth as the reason code.
493 * [in] \param block The data block to check.
494 * [out] \param reason If this is not NULL, then the variable pointed to
495 * by this pointer will be filled with the reason code describing why
496 * the header is not valid, if and only if a problem is found with
497 * the data.
498 * \returns true if there is no problem with the header and false otherwise.
499 */
500 static bool HeaderOk(const AliHLTMUONMansoTracksBlockStruct& block, WhyNotValid* reason = NULL)
501 {
502 AliHLTUInt32_t count = 1;
503 return HeaderOk(block, reason, count);
504 }
505
506 /**
507 * Method used to check if the header information corresponds to the
508 * supposed type of the Manso candidates data block.
509 * This method will return either kHeaderContainsWrongType or
510 * kHeaderContainsWrongRecordWidth as the reason code.
511 * [in] \param block The data block to check.
512 * [out] \param reason If this is not NULL, then the variable pointed to
513 * by this pointer will be filled with the reason code describing why
514 * the header is not valid, if and only if a problem is found with
515 * the data.
516 * \returns true if there is no problem with the header and false otherwise.
517 */
518 static bool HeaderOk(const AliHLTMUONMansoCandidatesBlockStruct& block, WhyNotValid* reason = NULL)
519 {
520 AliHLTUInt32_t count = 1;
521 return HeaderOk(block, reason, count);
522 }
523
524 /**
525 * Method used to check if the header information corresponds to the
526 * supposed type of the single tracks dHLT trigger decision data block.
527 * This method will return either kHeaderContainsWrongType or
528 * kHeaderContainsWrongRecordWidth as the reason code.
529 * [in] \param block The data block to check.
530 * [out] \param reason If this is not NULL, then the variable pointed to
531 * by this pointer will be filled with the reason code describing why
532 * the header is not valid, if and only if a problem is found with
533 * the data.
534 * \returns true if there is no problem with the header and false otherwise.
535 */
536 static bool HeaderOk(const AliHLTMUONSinglesDecisionBlockStruct& block, WhyNotValid* reason = NULL)
537 {
538 AliHLTUInt32_t count = 1;
539 return HeaderOk(block, reason, count);
540 }
541
542 /**
543 * Method used to check if the header information corresponds to the
544 * supposed type of the track pairs dHLT trigger decision data block.
545 * This method will return either kHeaderContainsWrongType or
546 * kHeaderContainsWrongRecordWidth as the reason code.
547 * [in] \param block The data block to check.
548 * [out] \param reason If this is not NULL, then the variable pointed to
549 * by this pointer will be filled with the reason code describing why
550 * the header is not valid, if and only if a problem is found with
551 * the data.
552 * \returns true if there is no problem with the header and false otherwise.
553 */
554 static bool HeaderOk(const AliHLTMUONPairsDecisionBlockStruct& block, WhyNotValid* reason = NULL)
555 {
556 AliHLTUInt32_t count = 1;
557 return HeaderOk(block, reason, count);
558 }
559
26a4668d 560 /**
b727f838 561 * Methods used to check if the header information corresponds to the
562 * supposed type of the data block.
dba14d7d 563 * If the 'reason' parameter should point to an array which will store
564 * the reason codes indicating the problems with the data block.
565 * The 'reasonCount' parameter should initialy contain the number of
566 * elements that can be stored in reason. When the method exits it will
567 * store the number of elements in the 'reason' array actually filled.
568 */
569 static bool HeaderOk(
570 const AliHLTMUONTriggerRecordsBlockStruct& block,
571 WhyNotValid* reason, AliHLTUInt32_t& reasonCount
572 );
573
574 static bool HeaderOk(
575 const AliHLTMUONTrigRecsDebugBlockStruct& block,
576 WhyNotValid* reason, AliHLTUInt32_t& reasonCount
577 );
578
579 static bool HeaderOk(
580 const AliHLTMUONRecHitsBlockStruct& block,
581 WhyNotValid* reason, AliHLTUInt32_t& reasonCount
582 );
583
584 static bool HeaderOk(
585 const AliHLTMUONClustersBlockStruct& block,
586 WhyNotValid* reason, AliHLTUInt32_t& reasonCount
587 );
588
589 static bool HeaderOk(
590 const AliHLTMUONChannelsBlockStruct& block,
591 WhyNotValid* reason, AliHLTUInt32_t& reasonCount
592 );
593
594 static bool HeaderOk(
595 const AliHLTMUONMansoTracksBlockStruct& block,
596 WhyNotValid* reason, AliHLTUInt32_t& reasonCount
597 );
598
599 static bool HeaderOk(
600 const AliHLTMUONMansoCandidatesBlockStruct& block,
601 WhyNotValid* reason, AliHLTUInt32_t& reasonCount
602 );
603
604 static bool HeaderOk(
605 const AliHLTMUONSinglesDecisionBlockStruct& block,
606 WhyNotValid* reason, AliHLTUInt32_t& reasonCount
607 );
608
609 static bool HeaderOk(
610 const AliHLTMUONPairsDecisionBlockStruct& block,
611 WhyNotValid* reason, AliHLTUInt32_t& reasonCount
612 );
613
614 /**
615 * This method is used to check more extensively if the integrity of the
616 * trigger record structure is OK and returns true in that case.
617 * [in] \param tr The trigger record structure to check.
618 * [out] \param reason If this is not NULL, then it will be filled with
619 * the reason code describing why the structure is not valid, if and
620 * only if a problem is found with the data.
621 * \returns true if there is no problem with the structure and false otherwise.
622 */
623 static bool IntegrityOk(
624 const AliHLTMUONTriggerRecordStruct& tr,
625 WhyNotValid* reason = NULL
626 )
627 {
628 AliHLTUInt32_t count = 1;
629 return IntegrityOk(tr, reason, count);
630 }
631
632 /**
633 * This method is used to check more extensively if the integrity of the
634 * dHLT raw internal data block is OK and returns true in that case.
635 * [in] \param block The trigger record data block to check.
636 * [out] \param reason If this is not NULL, then it will be filled with
637 * the reason code describing why the data block is not valid, if and
638 * only if a problem is found with the data.
639 * [out] \param recordNum If this is not NULL, then it will be filled with
640 * the number of the trigger record that had a problem. This value will
641 * only contain a valid value if the method RecordNumberWasSet(*reason)
642 * returns true. Thus, 'reason' must be set.
643 * \returns true if there is no problem with the data and false otherwise.
644 */
645 static bool IntegrityOk(
646 const AliHLTMUONTriggerRecordsBlockStruct& block,
647 WhyNotValid* reason = NULL, AliHLTUInt32_t* recordNum = NULL
648 )
649 {
650 AliHLTUInt32_t count = 1;
651 return IntegrityOk(block, reason, recordNum, count);
652 }
653
654 /**
655 * This method is used to check more extensively if the integrity of the
656 * trigger record debug information structure is OK and returns true in that case.
657 * [in] \param trigInfo The trigger record debug information structure to check.
658 * [out] \param reason If this is not NULL, then it will be filled with
659 * the reason code describing why the structure is not valid, if and
660 * only if a problem is found with the data.
661 * \returns true if there is no problem with the structure and false otherwise.
662 */
663 static bool IntegrityOk(
664 const AliHLTMUONTrigRecInfoStruct& trigInfo,
665 WhyNotValid* reason = NULL
666 )
667 {
668 AliHLTUInt32_t count = 1;
669 return IntegrityOk(trigInfo, reason, count);
670 }
671
672 /**
673 * This method is used to check more extensively if the integrity of the
674 * dHLT raw internal data block is OK and returns true in that case.
675 * [in] \param block The trigger record debugging information data block to check.
676 * [out] \param reason If this is not NULL, then it will be filled with
677 * the reason code describing why the data block is not valid, if and
678 * only if a problem is found with the data.
679 * [out] \param recordNum If this is not NULL, then it will be filled with
680 * the number of the trigger record debug information structure that had
681 * a problem. This value will only contain a valid value if the method
682 * RecordNumberWasSet(*reason) returns true. Thus, 'reason' must be set.
683 * \returns true if there is no problem with the data and false otherwise.
684 */
685 static bool IntegrityOk(
686 const AliHLTMUONTrigRecsDebugBlockStruct& block,
687 WhyNotValid* reason = NULL, AliHLTUInt32_t* recordNum = NULL
688 )
689 {
690 AliHLTUInt32_t count = 1;
691 return IntegrityOk(block, reason, recordNum, count);
692 }
693
a090ff22 694 /**
695 * This method is used to check more extensively if the integrity of the
696 * reconstructed hit structure is OK and returns true in that case.
697 * [in] \param hit The reconstructed hit structure to check.
698 * [out] \param reason If this is not NULL, then it will be filled with
699 * the reason code describing why the structure is not valid, if and
700 * only if a problem is found with the data.
701 * \returns true if there is no problem with the data and false otherwise.
702 */
703 static bool IntegrityOk(
704 const AliHLTMUONRecHitStruct& hit,
705 WhyNotValid* reason = NULL
706 )
707 {
708 AliHLTUInt32_t count = 1;
709 return IntegrityOk(hit, reason, count);
710 }
dba14d7d 711
712 /**
713 * This method is used to check more extensively if the integrity of the
714 * dHLT raw internal data block is OK and returns true in that case.
715 * [in] \param block The reconstructed hits data block to check.
716 * [out] \param reason If this is not NULL, then it will be filled with
717 * the reason code describing why the data block is not valid, if and
718 * only if a problem is found with the data.
a090ff22 719 * [out] \param recordNum If this is not NULL, then it will be filled with
720 * the number of the cluster structure that had a problem. This value
721 * will only contain a valid value if the method
722 * RecordNumberWasSet(*reason) returns true. Thus, 'reason' must be set.
dba14d7d 723 * \returns true if there is no problem with the data and false otherwise.
724 */
725 static bool IntegrityOk(
726 const AliHLTMUONRecHitsBlockStruct& block,
a090ff22 727 WhyNotValid* reason = NULL, AliHLTUInt32_t* recordNum = NULL
dba14d7d 728 )
729 {
730 AliHLTUInt32_t count = 1;
a090ff22 731 return IntegrityOk(block, reason, recordNum, count);
dba14d7d 732 }
733
734 /**
735 * This method is used to check more extensively if the integrity of the
736 * cluster data structure is OK and returns true in that case.
737 * [in] \param cluster The cluster structure to check.
738 * [out] \param reason If this is not NULL, then it will be filled with
739 * the reason code describing why the structure is not valid, if and
740 * only if a problem is found with the data.
741 * \returns true if there is no problem with the data and false otherwise.
742 */
743 static bool IntegrityOk(
744 const AliHLTMUONClusterStruct& cluster,
745 WhyNotValid* reason = NULL
746 )
747 {
748 AliHLTUInt32_t count = 1;
749 return IntegrityOk(cluster, reason, count);
750 }
751
752 /**
753 * This method is used to check more extensively if the integrity of the
754 * dHLT raw internal data block is OK and returns true in that case.
755 * [in] \param block The clusters data block to check.
756 * [out] \param reason If this is not NULL, then it will be filled with
757 * the reason code describing why the data block is not valid, if and
758 * only if a problem is found with the data.
759 * [out] \param recordNum If this is not NULL, then it will be filled with
760 * the number of the cluster structure that had a problem. This value
761 * will only contain a valid value if the method
762 * RecordNumberWasSet(*reason) returns true. Thus, 'reason' must be set.
763 * \returns true if there is no problem with the data and false otherwise.
764 */
765 static bool IntegrityOk(
766 const AliHLTMUONClustersBlockStruct& block,
767 WhyNotValid* reason = NULL, AliHLTUInt32_t* recordNum = NULL
768 )
769 {
770 AliHLTUInt32_t count = 1;
771 return IntegrityOk(block, reason, recordNum, count);
772 }
773
774 /**
775 * This method is used to check more extensively if the integrity of the
776 * channel data structure is OK and returns true in that case.
777 * [in] \param cluster The channel structure to check.
778 * [out] \param reason If this is not NULL, then it will be filled with
779 * the reason code describing why the structure is not valid, if and
780 * only if a problem is found with the data.
781 * \returns true if there is no problem with the data and false otherwise.
782 */
783 static bool IntegrityOk(
784 const AliHLTMUONChannelStruct& channel,
785 WhyNotValid* reason = NULL
786 )
787 {
788 AliHLTUInt32_t count = 1;
789 return IntegrityOk(channel, reason, count);
790 }
791
792 /**
793 * This method is used to check more extensively if the integrity of the
794 * dHLT raw internal data block is OK and returns true in that case.
795 * [in] \param block The ADC channels data block to check.
796 * [out] \param reason If this is not NULL, then it will be filled with
797 * the reason code describing why the data block is not valid, if and
798 * only if a problem is found with the data.
799 * [out] \param recordNum If this is not NULL, then it will be filled with
800 * the number of the channel structure that had a problem. This value
801 * will only contain a valid value if the method
802 * RecordNumberWasSet(*reason) returns true. Thus, 'reason' must be set.
803 * \returns true if there is no problem with the data and false otherwise.
804 */
805 static bool IntegrityOk(
806 const AliHLTMUONChannelsBlockStruct& block,
807 WhyNotValid* reason = NULL, AliHLTUInt32_t* recordNum = NULL
808 )
809 {
810 AliHLTUInt32_t count = 1;
811 return IntegrityOk(block, reason, recordNum, count);
812 }
813
814 /**
815 * This method is used to check more extensively if the integrity of the
816 * Manso track structure is OK and returns true in that case.
817 * [in] \param track The Manso track structure to check.
818 * [out] \param reason If this is not NULL, then it will be filled with
819 * the reason code describing why the structure is not valid, if and
820 * only if a problem is found with the data.
821 * \returns true if there is no problem with the structure and false otherwise.
822 */
823 static bool IntegrityOk(
824 const AliHLTMUONMansoTrackStruct& track,
825 WhyNotValid* reason = NULL
826 )
827 {
828 AliHLTUInt32_t count = 1;
829 return IntegrityOk(track, reason, count);
830 }
831
832 /**
833 * This method is used to check more extensively if the integrity of the
834 * dHLT raw internal data block is OK and returns true in that case.
835 * [in] \param block The Manso track data block to check.
836 * [out] \param reason If this is not NULL, then it will be filled with
837 * the reason code describing why the data block is not valid, if and
838 * only if a problem is found with the data.
839 * [out] \param recordNum If this is not NULL, then it will be filled with
840 * the number of the Manso track structure that had a problem.
841 * This value will only contain a valid value if the method
842 * RecordNumberWasSet(*reason) returns true. Thus, 'reason' must be set.
843 * \returns true if there is no problem with the data and false otherwise.
844 */
845 static bool IntegrityOk(
846 const AliHLTMUONMansoTracksBlockStruct& block,
847 WhyNotValid* reason = NULL, AliHLTUInt32_t* recordNum = NULL
848 )
849 {
850 AliHLTUInt32_t count = 1;
851 return IntegrityOk(block, reason, recordNum, count);
852 }
853
854 /**
855 * This method is used to check more extensively if the integrity of the
856 * Manso track candidate structure is OK and returns true in that case.
857 * [in] \param candidate The Manso track candidate structure to check.
858 * [out] \param reason If this is not NULL, then it will be filled with
859 * the reason code describing why the structure is not valid, if and
860 * only if a problem is found with the data.
861 * \returns true if there is no problem with the structure and false otherwise.
862 */
863 static bool IntegrityOk(
864 const AliHLTMUONMansoCandidateStruct& candidate,
865 WhyNotValid* reason = NULL
866 )
867 {
868 AliHLTUInt32_t count = 1;
869 return IntegrityOk(candidate, reason, count);
870 }
871
872 /**
873 * This method is used to check more extensively if the integrity of the
874 * dHLT raw internal data block is OK and returns true in that case.
875 * [in] \param block The Manso track candidate data block to check.
876 * [out] \param reason If this is not NULL, then it will be filled with
877 * the reason code describing why the data block is not valid, if and
878 * only if a problem is found with the data.
879 * [out] \param recordNum If this is not NULL, then it will be filled with
880 * the number of the Manso track candidate structure that had a problem.
881 * This value will only contain a valid value if the method
882 * RecordNumberWasSet(*reason) returns true. Thus, 'reason' must be set.
883 * \returns true if there is no problem with the data and false otherwise.
884 */
885 static bool IntegrityOk(
886 const AliHLTMUONMansoCandidatesBlockStruct& block,
887 WhyNotValid* reason = NULL, AliHLTUInt32_t* recordNum = NULL
888 )
889 {
890 AliHLTUInt32_t count = 1;
891 return IntegrityOk(block, reason, recordNum, count);
892 }
893
894 /**
895 * This method is used to check more extensively if the integrity of the
896 * single track trigger decision structure is OK and returns true in that case.
897 * [in] \param decision The trigger decision structure to check.
898 * [out] \param reason If this is not NULL, then it will be filled with
899 * the reason code describing why the structure is not valid, if and
900 * only if a problem is found with the data.
901 * \returns true if there is no problem with the structure and false otherwise.
902 */
903 static bool IntegrityOk(
904 const AliHLTMUONTrackDecisionStruct& decision,
905 WhyNotValid* reason = NULL
906 )
907 {
908 AliHLTUInt32_t count = 1;
909 return IntegrityOk(decision, reason, count);
910 }
911
912 /**
913 * This method is used to check more extensively if the integrity of the
914 * dHLT raw internal data block is OK and returns true in that case.
915 * [in] \param block The single track trigger decision data block to check.
916 * [out] \param reason If this is not NULL, then it will be filled with
917 * the reason code describing why the data block is not valid, if and
918 * only if a problem is found with the data.
919 * [out] \param recordNum If this is not NULL, then it will be filled with
920 * the number of the single track trigger decision structure that had
921 * a problem. This value will only contain a valid value if the method
922 * RecordNumberWasSet(*reason) returns true. Thus, 'reason' must be set.
923 * \returns true if there is no problem with the data and false otherwise.
924 */
925 static bool IntegrityOk(
926 const AliHLTMUONSinglesDecisionBlockStruct& block,
927 WhyNotValid* reason = NULL, AliHLTUInt32_t* recordNum = NULL
928 )
929 {
930 AliHLTUInt32_t count = 1;
931 return IntegrityOk(block, reason, recordNum, count);
932 }
933
934 /**
935 * This method is used to check more extensively if the integrity of the
936 * track pair trigger decision structure is OK and returns true in that case.
937 * [in] \param decision The trigger decision structure to check.
938 * [out] \param reason If this is not NULL, then it will be filled with
939 * the reason code describing why the structure is not valid, if and
940 * only if a problem is found with the data.
941 * \returns true if there is no problem with the structure and false otherwise.
942 */
943 static bool IntegrityOk(
944 const AliHLTMUONPairDecisionStruct& decision,
945 WhyNotValid* reason = NULL
946 )
947 {
948 AliHLTUInt32_t count = 1;
949 return IntegrityOk(decision, reason, count);
950 }
951
952 /**
953 * This method is used to check more extensively if the integrity of the
954 * dHLT raw internal data block is OK and returns true in that case.
955 * [in] \param block The track pair trigger decision data block to check.
956 * [out] \param reason If this is not NULL, then it will be filled with
957 * the reason code describing why the data block is not valid, if and
958 * only if a problem is found with the data.
959 * [out] \param recordNum If this is not NULL, then it will be filled with
960 * the number of the track pairs trigger decision structure that had
961 * a problem. This value will only contain a valid value if the method
962 * RecordNumberWasSet(*reason) returns true. Thus, 'reason' must be set.
963 * \returns true if there is no problem with the data and false otherwise.
964 */
965 static bool IntegrityOk(
966 const AliHLTMUONPairsDecisionBlockStruct& block,
967 WhyNotValid* reason = NULL, AliHLTUInt32_t* recordNum = NULL
968 )
969 {
970 AliHLTUInt32_t count = 1;
971 return IntegrityOk(block, reason, recordNum, count);
972 }
b727f838 973
974 /**
90a74d7a 975 * Methods used to check more extensively if the integrity of various
976 * types of data blocks are Ok and returns true in that case.
b727f838 977 * These can be slow and should generally only be used for debugging.
dba14d7d 978 * The methods are able to return multiple reasons for the problems related
979 * to the data block under test.
b727f838 980 */
dba14d7d 981 static bool IntegrityOk(
982 const AliHLTMUONTriggerRecordStruct& tr,
983 WhyNotValid* reason, AliHLTUInt32_t& reasonCount
984 );
878cb83d 985
986 static bool IntegrityOk(
987 const AliHLTMUONTriggerRecordsBlockStruct& block,
dba14d7d 988 WhyNotValid* reason, AliHLTUInt32_t* recordNum,
989 AliHLTUInt32_t& reasonCount
990 );
991
992 static bool IntegrityOk(
993 const AliHLTMUONTrigRecInfoStruct& trigInfo,
994 WhyNotValid* reason, AliHLTUInt32_t& reasonCount
995 );
996
997 static bool IntegrityOk(
998 const AliHLTMUONTrigRecsDebugBlockStruct& block,
999 WhyNotValid* reason, AliHLTUInt32_t* recordNum,
1000 AliHLTUInt32_t& reasonCount
1001 );
1002
1003 static bool IntegrityOk(
a090ff22 1004 const AliHLTMUONRecHitStruct& hit,
dba14d7d 1005 WhyNotValid* reason, AliHLTUInt32_t& reasonCount
a090ff22 1006 );
1007
1008 static bool IntegrityOk(
1009 const AliHLTMUONRecHitsBlockStruct& block,
1010 WhyNotValid* reason, AliHLTUInt32_t* recordNum,
1011 AliHLTUInt32_t& reasonCount
dba14d7d 1012 );
1013
1014 static bool IntegrityOk(
1015 const AliHLTMUONClusterStruct& cluster,
1016 WhyNotValid* reason, AliHLTUInt32_t& reasonCount
1017 );
1018
1019 static bool IntegrityOk(
1020 const AliHLTMUONClustersBlockStruct& block,
1021 WhyNotValid* reason, AliHLTUInt32_t* recordNum,
1022 AliHLTUInt32_t& reasonCount
1023 );
1024
1025 static bool IntegrityOk(
1026 const AliHLTMUONChannelStruct& channel,
1027 WhyNotValid* reason, AliHLTUInt32_t& reasonCount
1028 );
1029
1030 static bool IntegrityOk(
1031 const AliHLTMUONChannelsBlockStruct& block,
1032 WhyNotValid* reason, AliHLTUInt32_t* recordNum,
1033 AliHLTUInt32_t& reasonCount
1034 );
1035
1036 static bool IntegrityOk(
1037 const AliHLTMUONMansoTrackStruct& track,
1038 WhyNotValid* reason, AliHLTUInt32_t& reasonCount
878cb83d 1039 );
878cb83d 1040
1041 static bool IntegrityOk(
1042 const AliHLTMUONMansoTracksBlockStruct& block,
dba14d7d 1043 WhyNotValid* reason, AliHLTUInt32_t* recordNum,
1044 AliHLTUInt32_t& reasonCount
1045 );
1046
1047 static bool IntegrityOk(
1048 const AliHLTMUONMansoCandidateStruct& candidate,
1049 WhyNotValid* reason, AliHLTUInt32_t& reasonCount
878cb83d 1050 );
1051
1052 static bool IntegrityOk(
1053 const AliHLTMUONMansoCandidatesBlockStruct& block,
dba14d7d 1054 WhyNotValid* reason, AliHLTUInt32_t* recordNum,
1055 AliHLTUInt32_t& reasonCount
878cb83d 1056 );
1057
dba14d7d 1058 static bool IntegrityOk(
1059 const AliHLTMUONTrackDecisionStruct& decision,
1060 WhyNotValid* reason, AliHLTUInt32_t& reasonCount
1061 );
878cb83d 1062
1063 static bool IntegrityOk(
1064 const AliHLTMUONSinglesDecisionBlockStruct& block,
dba14d7d 1065 WhyNotValid* reason, AliHLTUInt32_t* recordNum,
1066 AliHLTUInt32_t& reasonCount
878cb83d 1067 );
1068
dba14d7d 1069 static bool IntegrityOk(
1070 const AliHLTMUONPairDecisionStruct& decision,
1071 WhyNotValid* reason, AliHLTUInt32_t& reasonCount
1072 );
878cb83d 1073
1074 static bool IntegrityOk(
1075 const AliHLTMUONPairsDecisionBlockStruct& block,
dba14d7d 1076 WhyNotValid* reason, AliHLTUInt32_t* recordNum,
1077 AliHLTUInt32_t& reasonCount
878cb83d 1078 );
dba14d7d 1079
1080 /**
1081 * Returns true if the \em recordNum in the corresponding IntegrityOk method
1082 * would have been set, if it returned false and a reason was set.
1083 * This helper method makes it easy to test if the \em recordNum parameter
1084 * is filled with a valid value or not.
1085 */
1086 static bool RecordNumberWasSet(WhyNotValid reason);
26a4668d 1087
1088private:
213499f0 1089
33b1e2f2 1090 // Should never have to create, copy or destroy this object.
213499f0 1091 AliHLTMUONUtils() {}
33b1e2f2 1092 AliHLTMUONUtils(const AliHLTMUONUtils& obj);
213499f0 1093 virtual ~AliHLTMUONUtils() {}
33b1e2f2 1094 AliHLTMUONUtils& operator = (const AliHLTMUONUtils& obj);
1095
1096 ClassDef(AliHLTMUONUtils, 0); // Interface for helpful dHLT utility methods.
26a4668d 1097};
1098
b727f838 1099//_____________________________________________________________________________
1100
878cb83d 1101inline std::ostream& operator << (std::ostream& stream, AliHLTMUONUtils::WhyNotValid reason)
1102{
1103 /// Stream operator for the WhyNotValid enumeration for usage with
1104 /// std::ostream classes. Allows usages such as:
1105 /// AliHLTMUONUtils::WhyNotValid r; std::cout << r;
1106
1107 stream << AliHLTMUONUtils::FailureReasonToString(reason);
1108 return stream;
1109}
1110
1111//_____________________________________________________________________________
1112
b727f838 1113// Since c++ is missing a finally "keyword" we define one. Its usage is identical
1114// to a try..finally statement in Java etc.. however, since it is officialy a macro
1115// one must use the ( ) brackets instead of { }
1116// If the compiler supports __finally use it otherwise make our own.
1117#if defined(__BORLANDC__)
1118# define finally(str) __finally{str}
1119#else
1120# define finally(code) \
1121 catch(...) \
1122 { \
1123 code \
1124 throw; \
1125 }; \
1126 code
1127#endif // __BORLANDC__
1128
b727f838 1129// Here we define the DebugTrace(message) macro for easy embedding of debug
1130// information into the dimuon HLT code. Its usage is meant to be for generating
1131// traces of the program which are only useful during full scale debugging.
1132// Log messages should use the standard HLT logging mechanisms.
1133// The output is only generated in programs compiled with the DEBUG directive
1134// defined. Here is a usage example:
1135//
1136// // statements...
1137// DebugTrace("some debug information.");
1138// // statements...
1139//
1140// One can also use C++ ostream operators and manipulators like so:
1141//
1142// // statements...
1143// int x, y;
b12fe461 1144// DebugTrace("x = " << x << " and y = 0x" << std::hex << y );
b727f838 1145// // statements...
1146//
1147#ifdef DEBUG
b4dfa1c8 1148# include <iostream>
b727f838 1149# define DebugTrace(message) {std::cout << message << std::endl;}
1150#else // DEBUG
1151# define DebugTrace(message)
1152#endif // DEBUG
1153
1154
26a4668d 1155#endif // ALIHLTMUONUTILS_H