]>
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 | { | |
32 | AliHLTUInt32_t fId; // Unique ID for the cluster. It must be at | |
33 | // least unique for any given event. | |
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. | |
52 | AliHLTMUONClusterStruct fCluster[/*fHeader.fNrecords*/]; | |
53 | }; | |
54 | ||
55 | } // extern "C" | |
56 | ||
57 | ||
58 | /** | |
59 | * Stream operator for usage with std::ostream classes which prints the | |
60 | * AliHLTMUONClusterStruct in the following format: | |
61 | * {fId = xx, fHit = {...}, fDetElemId = yy, fNchannels = zz} | |
62 | */ | |
63 | std::ostream& operator << ( | |
64 | std::ostream& stream, const AliHLTMUONClusterStruct& cluster | |
65 | ); | |
66 | ||
67 | /** | |
68 | * Stream operator for usage with std::ostream classes which prints the | |
69 | * AliHLTMUONClustersBlockStruct in the following format: | |
70 | * {fHeader = xx, fCluster[] = [{..}, {..}, ...]} | |
71 | */ | |
72 | std::ostream& operator << ( | |
73 | std::ostream& stream, const AliHLTMUONClustersBlockStruct& block | |
74 | ); | |
75 | ||
76 | ||
77 | inline bool operator == ( | |
78 | const AliHLTMUONClusterStruct& a, | |
79 | const AliHLTMUONClusterStruct& b | |
80 | ) | |
81 | { | |
82 | return a.fId == b.fId and a.fHit == b.fHit and | |
83 | a.fDetElemId == b.fDetElemId and a.fNchannels == b.fNchannels; | |
84 | } | |
85 | ||
86 | inline bool operator != ( | |
87 | const AliHLTMUONClusterStruct& a, | |
88 | const AliHLTMUONClusterStruct& b | |
89 | ) | |
90 | { | |
91 | return not operator == (a, b); | |
92 | } | |
93 | ||
94 | ||
95 | bool operator == ( | |
96 | const AliHLTMUONClustersBlockStruct& a, | |
97 | const AliHLTMUONClustersBlockStruct& b | |
98 | ); | |
99 | ||
100 | inline bool operator != ( | |
101 | const AliHLTMUONClustersBlockStruct& a, | |
102 | const AliHLTMUONClustersBlockStruct& b | |
103 | ) | |
104 | { | |
105 | return not operator == (a, b); | |
106 | } | |
107 | ||
108 | #endif // ALIHLTMUONCLUSTERSBLOCKSTRUCT_H |