]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/MUON/AliHLTMUONRecHitsBlockStruct.h
Getting rid of zero length arrays in the block structure declarations since this...
[u/mrichter/AliRoot.git] / HLT / MUON / AliHLTMUONRecHitsBlockStruct.h
1 #ifndef ALIHLTMUONRECHITSBLOCKSTRUCT_H
2 #define ALIHLTMUONRECHITSBLOCKSTRUCT_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
8 /**
9  * @file   AliHLTMUONRecHitsBlockStruct.h
10  * @author Indranil Das <indra.das@saha.ac.in>,
11  *         Artur Szostak <artursz@iafrica.com>
12  * @date   
13  * @brief  Definition of internal dimuon HLT reconstructed hit data block structure.
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 {
43         AliHLTMUONDataBlockHeader fHeader; // Common data block header
44
45         // Array of reconstructed hits.
46         //AliHLTMUONRecHitStruct fHit[/*fHeader.fNrecords*/];
47 };
48
49 } // extern "C"
50
51
52 /**
53  * Stream operator for usage with std::ostream classes which prints the
54  * reconstructed hit in the following format: {fX = xx, fY = yy, fZ = zz}
55  */
56 inline std::ostream& operator << (
57                 std::ostream& stream, const AliHLTMUONRecHitStruct& hit
58         )
59 {
60         stream  << "{fX = " << hit.fX << ", fY = " << hit.fY << ", fZ = "
61                 << hit.fZ << "}";
62         return stream;
63 }
64
65 /**
66  * Stream operator for usage with std::ostream classes which prints the
67  * AliHLTMUONRecHitsBlockStruct in the following format:
68  *   {fHeader = xx, fHit[] = [{..}, {..}, ...]}
69  */
70 std::ostream& operator << (
71                 std::ostream& stream, const AliHLTMUONRecHitsBlockStruct& block
72         );
73
74
75 inline bool operator == (
76                 const AliHLTMUONRecHitStruct& a, const AliHLTMUONRecHitStruct& b
77         )
78 {
79         return a.fX == b.fX and a.fY == b.fY and a.fZ == b.fZ;
80 }
81
82 inline bool operator != (
83                 const AliHLTMUONRecHitStruct& a, const AliHLTMUONRecHitStruct& b
84         )
85 {
86         return not operator == (a, b);
87 }
88
89
90 bool operator == (
91                 const AliHLTMUONRecHitsBlockStruct& a,
92                 const AliHLTMUONRecHitsBlockStruct& b
93         );
94
95 inline bool operator != (
96                 const AliHLTMUONRecHitsBlockStruct& a,
97                 const AliHLTMUONRecHitsBlockStruct& b
98         )
99 {
100         return not operator == (a, b);
101 }
102
103 #endif // ALIHLTMUONRECHITSBLOCKSTRUCT_H