]>
Commit | Line | Data |
---|---|---|
b08ffe98 | 1 | #ifndef ALIHLTMUONCHANNELSBLOCKSTRUCT_H |
2 | #define ALIHLTMUONCHANNELSBLOCKSTRUCT_H | |
cfcef7ba | 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 AliHLTMUONChannelsBlockStruct.h | |
10 | * @author Artur Szostak <artursz@iafrica.com> | |
11 | * @date | |
12 | * @brief Definition of internal dimuon HLT block structure containing | |
13 | * debugging information about channels that belong to reconstructed | |
14 | * hit clusters. | |
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 <ostream> | |
22 | ||
23 | extern "C" | |
24 | { | |
25 | ||
26 | /** | |
27 | * Gives the fired channel/pad information which was considered during | |
28 | * hit reconstruction and correlated into a common cluster. | |
29 | */ | |
30 | struct AliHLTMUONChannelStruct | |
31 | { | |
b08ffe98 | 32 | AliHLTInt32_t fClusterId; // ID corresponding to the cluster this |
33 | // channel is part of. -1 == invalid. | |
cfcef7ba | 34 | |
35 | AliHLTUInt16_t fManu; // The MANU address on electronics. | |
36 | AliHLTUInt16_t fChannelAddress; // The channel address on electronics. | |
f7e4a627 | 37 | AliHLTUInt32_t fSignal; // ADC value of signal. |
cfcef7ba | 38 | AliHLTUInt32_t fRawDataWord; // The raw data word as found in the DDL stream. |
39 | }; | |
40 | ||
41 | /** | |
42 | * AliHLTMUONChannelBlockStruct defines the format of the internal channel | |
43 | * data block corresponding to clusters on the tracking chambers. | |
44 | */ | |
45 | struct AliHLTMUONChannelsBlockStruct | |
46 | { | |
47 | AliHLTMUONDataBlockHeader fHeader; // Common data block header | |
48 | ||
b08ffe98 | 49 | // Array of cluster channels/pads. |
23ad6161 | 50 | //AliHLTMUONChannelStruct fChannel[/*fHeader.fNrecords*/]; |
cfcef7ba | 51 | }; |
52 | ||
53 | } // extern "C" | |
54 | ||
55 | ||
56 | /** | |
57 | * Stream operator for usage with std::ostream classes which prints the | |
58 | * AliHLTMUONChannelStruct in the following format: | |
59 | * {fClusterId = xx, fManu = yy, fChannelAddress = zz, fSignal = ww, | |
60 | * fRawDataWord = 0xXXXXXXXX} | |
61 | */ | |
62 | std::ostream& operator << ( | |
63 | std::ostream& stream, const AliHLTMUONChannelStruct& channel | |
64 | ); | |
65 | ||
66 | /** | |
67 | * Stream operator for usage with std::ostream classes which prints the | |
68 | * AliHLTMUONChannelsBlockStruct in the following format: | |
69 | * {fHeader = xx, fChannel[] = [{..}, {..}, ...]} | |
70 | */ | |
71 | std::ostream& operator << ( | |
72 | std::ostream& stream, const AliHLTMUONChannelsBlockStruct& block | |
73 | ); | |
74 | ||
75 | ||
76 | inline bool operator == ( | |
77 | const AliHLTMUONChannelStruct& a, | |
78 | const AliHLTMUONChannelStruct& b | |
79 | ) | |
80 | { | |
81 | return a.fClusterId == b.fClusterId and a.fManu == b.fManu and | |
82 | a.fChannelAddress == b.fChannelAddress and | |
83 | a.fSignal == b.fSignal and a.fRawDataWord == b.fRawDataWord; | |
84 | } | |
85 | ||
86 | inline bool operator != ( | |
87 | const AliHLTMUONChannelStruct& a, | |
88 | const AliHLTMUONChannelStruct& b | |
89 | ) | |
90 | { | |
91 | return not operator == (a, b); | |
92 | } | |
93 | ||
94 | ||
95 | bool operator == ( | |
96 | const AliHLTMUONChannelsBlockStruct& a, | |
97 | const AliHLTMUONChannelsBlockStruct& b | |
98 | ); | |
99 | ||
100 | inline bool operator != ( | |
101 | const AliHLTMUONChannelsBlockStruct& a, | |
102 | const AliHLTMUONChannelsBlockStruct& b | |
103 | ) | |
104 | { | |
105 | return not operator == (a, b); | |
106 | } | |
107 | ||
b08ffe98 | 108 | #endif // ALIHLTMUONCHANNELSBLOCKSTRUCT_H |