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