]>
Commit | Line | Data |
---|---|---|
cfcef7ba | 1 | #ifndef ALIHLTMUONCLUSTERSBLOCKSTRUCT_H |
2 | #define ALIHLTMUONCLUSTERSBLOCKSTRUCT_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 AliHLTMUONClustersBlockStruct.h | |
10 | * @author Artur Szostak <artursz@iafrica.com> | |
11 | * @date | |
12 | * @brief Definition of internal dimuon HLT block structure containing | |
13 | * debugging information about clusters and their corresponding | |
14 | * reconstructed hits. | |
15 | * | |
16 | * The structures are defined with C linkage since C generally gives us more | |
17 | * binary compatibility between compilers. | |
18 | */ | |
19 | ||
20 | #include "AliHLTMUONDataTypes.h" | |
21 | #include "AliHLTMUONRecHitsBlockStruct.h" | |
22 | #include <ostream> | |
23 | ||
24 | extern "C" | |
25 | { | |
26 | ||
27 | /** | |
28 | * Debugging information about a cluster and its reconstructed hit. | |
29 | */ | |
30 | struct AliHLTMUONClusterStruct | |
31 | { | |
b08ffe98 | 32 | AliHLTInt32_t fId; // Unique ID for the cluster. It must be at |
33 | // least unique for any given event. -1 == invalid. | |
cfcef7ba | 34 | |
35 | AliHLTMUONRecHitStruct fHit; // Corresponding reconstructed hit. | |
36 | ||
37 | AliHLTInt32_t fDetElemId; // Detector ID number from AliRoot geometry | |
38 | // on which the cluster was found. | |
39 | ||
40 | AliHLTUInt32_t fNchannels; // Number of channels/pads in the cluster. | |
41 | }; | |
42 | ||
43 | /** | |
44 | * AliHLTMUONClusterBlockStruct defines the format of the internal cluster | |
45 | * data block. | |
46 | */ | |
47 | struct AliHLTMUONClustersBlockStruct | |
48 | { | |
49 | AliHLTMUONDataBlockHeader fHeader; // Common data block header | |
50 | ||
51 | // Array of clusters. | |
e83e889b | 52 | #ifndef __SUNPRO_CC |
cfcef7ba | 53 | AliHLTMUONClusterStruct fCluster[/*fHeader.fNrecords*/]; |
e83e889b | 54 | #else |
55 | AliHLTMUONClusterStruct fCluster[1]; | |
56 | #endif | |
cfcef7ba | 57 | }; |
58 | ||
59 | } // extern "C" | |
60 | ||
61 | ||
62 | /** | |
63 | * Stream operator for usage with std::ostream classes which prints the | |
64 | * AliHLTMUONClusterStruct in the following format: | |
65 | * {fId = xx, fHit = {...}, fDetElemId = yy, fNchannels = zz} | |
66 | */ | |
67 | std::ostream& operator << ( | |
68 | std::ostream& stream, const AliHLTMUONClusterStruct& cluster | |
69 | ); | |
70 | ||
71 | /** | |
72 | * Stream operator for usage with std::ostream classes which prints the | |
73 | * AliHLTMUONClustersBlockStruct in the following format: | |
74 | * {fHeader = xx, fCluster[] = [{..}, {..}, ...]} | |
75 | */ | |
76 | std::ostream& operator << ( | |
77 | std::ostream& stream, const AliHLTMUONClustersBlockStruct& block | |
78 | ); | |
79 | ||
80 | ||
81 | inline bool operator == ( | |
82 | const AliHLTMUONClusterStruct& a, | |
83 | const AliHLTMUONClusterStruct& b | |
84 | ) | |
85 | { | |
86 | return a.fId == b.fId and a.fHit == b.fHit and | |
87 | a.fDetElemId == b.fDetElemId and a.fNchannels == b.fNchannels; | |
88 | } | |
89 | ||
90 | inline bool operator != ( | |
91 | const AliHLTMUONClusterStruct& a, | |
92 | const AliHLTMUONClusterStruct& b | |
93 | ) | |
94 | { | |
95 | return not operator == (a, b); | |
96 | } | |
97 | ||
98 | ||
99 | bool operator == ( | |
100 | const AliHLTMUONClustersBlockStruct& a, | |
101 | const AliHLTMUONClustersBlockStruct& b | |
102 | ); | |
103 | ||
104 | inline bool operator != ( | |
105 | const AliHLTMUONClustersBlockStruct& a, | |
106 | const AliHLTMUONClustersBlockStruct& b | |
107 | ) | |
108 | { | |
109 | return not operator == (a, b); | |
110 | } | |
111 | ||
112 | #endif // ALIHLTMUONCLUSTERSBLOCKSTRUCT_H |