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