]>
Commit | Line | Data |
---|---|---|
26a4668d | 1 | #ifndef ALIHLTMUONRECHITSBLOCKSTRUCT_H |
2 | #define ALIHLTMUONRECHITSBLOCKSTRUCT_H | |
6845529b | 3 | /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
26a4668d | 5 | |
6 | /* $Id$ */ | |
7 | ||
8 | /** | |
9 | * @file AliHLTMUONRecHitsBlockStruct.h | |
10 | * @author Indranil Das <indra.das@saha.ac.in>, | |
11 | * Artur Szostak <artursz@iafrica.com> | |
12 | * @date | |
6845529b | 13 | * @brief Definition of internal dimuon HLT reconstructed hit data block structure. |
26a4668d | 14 | * |
15 | * The structures are defined with C linkage since C generally gives us more | |
16 | * binary compatibility between compilers. | |
17 | */ | |
18 | ||
19 | #include "AliHLTMUONDataTypes.h" | |
20 | ||
21 | extern "C" | |
22 | { | |
23 | ||
24 | /** | |
25 | * A 3D reconstructed hit point structure. | |
26 | * These are used to store the hits reconstructed on the tracking or trigger | |
27 | * chambers. | |
28 | * Reconstructed hit values of (0, 0, 0) indicate an invalid or nil hit. | |
29 | */ | |
30 | struct AliHLTMUONRecHitStruct | |
31 | { | |
32 | AliHLTFloat32_t fX; // X coordinate. | |
33 | AliHLTFloat32_t fY; // Y coordinate. | |
34 | AliHLTFloat32_t fZ; // Z coordinate. | |
35 | }; | |
36 | ||
37 | /** | |
38 | * AliHLTMUONRecHitsBlockStruct defines the format of the internal | |
39 | * reconstructed hit data block. | |
40 | */ | |
41 | struct AliHLTMUONRecHitsBlockStruct | |
42 | { | |
6845529b | 43 | AliHLTMUONDataBlockHeader fHeader; // Common data block header |
44 | ||
45 | // Array of reconstructed hits. | |
e83e889b | 46 | #ifndef __SUNPRO_CC |
6845529b | 47 | AliHLTMUONRecHitStruct fHit[/*fHeader.fNrecords*/]; |
e83e889b | 48 | #else |
49 | AliHLTMUONRecHitStruct fHit[1]; | |
50 | #endif | |
26a4668d | 51 | }; |
52 | ||
53 | } // extern "C" | |
54 | ||
55 | ||
56 | /** | |
57 | * Stream operator for usage with std::ostream classes which prints the | |
58 | * reconstructed hit in the following format: {fX = xx, fY = yy, fZ = zz} | |
59 | */ | |
60 | inline std::ostream& operator << ( | |
61 | std::ostream& stream, const AliHLTMUONRecHitStruct& hit | |
62 | ) | |
63 | { | |
64 | stream << "{fX = " << hit.fX << ", fY = " << hit.fY << ", fZ = " | |
65 | << hit.fZ << "}"; | |
66 | return stream; | |
67 | } | |
68 | ||
69 | /** | |
70 | * Stream operator for usage with std::ostream classes which prints the | |
71 | * AliHLTMUONRecHitsBlockStruct in the following format: | |
6845529b | 72 | * {fHeader = xx, fHit[] = [{..}, {..}, ...]} |
26a4668d | 73 | */ |
6845529b | 74 | std::ostream& operator << ( |
26a4668d | 75 | std::ostream& stream, const AliHLTMUONRecHitsBlockStruct& block |
6845529b | 76 | ); |
26a4668d | 77 | |
78 | ||
79 | inline bool operator == ( | |
80 | const AliHLTMUONRecHitStruct& a, const AliHLTMUONRecHitStruct& b | |
81 | ) | |
82 | { | |
83 | return a.fX == b.fX and a.fY == b.fY and a.fZ == b.fZ; | |
84 | } | |
85 | ||
86 | inline bool operator != ( | |
87 | const AliHLTMUONRecHitStruct& a, const AliHLTMUONRecHitStruct& b | |
88 | ) | |
89 | { | |
90 | return not operator == (a, b); | |
91 | } | |
92 | ||
93 | ||
6845529b | 94 | bool operator == ( |
95 | const AliHLTMUONRecHitsBlockStruct& a, | |
96 | const AliHLTMUONRecHitsBlockStruct& b | |
97 | ); | |
26a4668d | 98 | |
99 | inline bool operator != ( | |
6845529b | 100 | const AliHLTMUONRecHitsBlockStruct& a, |
101 | const AliHLTMUONRecHitsBlockStruct& b | |
26a4668d | 102 | ) |
103 | { | |
104 | return not operator == (a, b); | |
105 | } | |
106 | ||
107 | #endif // ALIHLTMUONRECHITSBLOCKSTRUCT_H |