]>
Commit | Line | Data |
---|---|---|
c8ec7c7e | 1 | #ifndef ALIHLTMUONTRIGGERCHANNELSBLOCKSTRUCT_H |
2 | #define ALIHLTMUONTRIGGERCHANNELSBLOCKSTRUCT_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 AliHLTMUONTriggerChannelsBlockStruct.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 trigger records. | |
14 | * | |
15 | * The structures are defined with C linkage since C generally gives us more | |
16 | * binary compatibility between compilers. | |
17 | */ | |
18 | ||
19 | #include "AliHLTMUONDataTypes.h" | |
20 | #include <ostream> | |
21 | ||
22 | extern "C" | |
23 | { | |
24 | ||
25 | /** | |
26 | * Gives the fired channel/strip information which was considered during | |
27 | * hit reconstruction on trigger chambers and correlated into a common cluster. | |
28 | */ | |
29 | struct AliHLTMUONTriggerChannelStruct | |
30 | { | |
31 | AliHLTInt32_t fTrigRecId; // ID corresponding to the trigger records this | |
32 | // channel is part of. -1 == invalid. | |
23ad6161 | 33 | |
c8ec7c7e | 34 | AliHLTUInt16_t fChamber; // The chamber this hit corresponds to. |
35 | // In the range [11..14]. | |
23ad6161 | 36 | |
c8ec7c7e | 37 | AliHLTUInt16_t fSignal; // ADC value of signal. |
38 | AliHLTUInt32_t fRawDataWord; // The raw data word as found in the DDL stream. | |
39 | }; | |
40 | ||
41 | /** | |
42 | * AliHLTMUONTriggerChannelsBlockStruct defines the format of the internal | |
43 | * channel data block corresponding to clusters on the trigger chambers. | |
44 | */ | |
45 | struct AliHLTMUONTriggerChannelsBlockStruct | |
46 | { | |
47 | AliHLTMUONDataBlockHeader fHeader; // Common data block header | |
48 | ||
49 | // Array of trigger channels/strips. | |
23ad6161 | 50 | //AliHLTMUONTriggerChannelStruct fChannel[/*fHeader.fNrecords*/]; |
c8ec7c7e | 51 | }; |
52 | ||
53 | } // extern "C" | |
54 | ||
55 | ||
56 | /** | |
57 | * Stream operator for usage with std::ostream classes which prints the | |
58 | * AliHLTMUONTriggerChannelStruct in the following format: | |
59 | * {fTrigRecId = xx, fChamber = yy, fSignal = zz, fRawDataWord = 0xXXXXXXXX} | |
60 | */ | |
61 | std::ostream& operator << ( | |
62 | std::ostream& stream, const AliHLTMUONTriggerChannelStruct& channel | |
63 | ); | |
64 | ||
65 | /** | |
66 | * Stream operator for usage with std::ostream classes which prints the | |
67 | * AliHLTMUONTriggerChannelsBlockStruct in the following format: | |
68 | * {fHeader = xx, fChannel[] = [{..}, {..}, ...]} | |
69 | */ | |
70 | std::ostream& operator << ( | |
71 | std::ostream& stream, | |
72 | const AliHLTMUONTriggerChannelsBlockStruct& block | |
73 | ); | |
74 | ||
75 | ||
76 | inline bool operator == ( | |
77 | const AliHLTMUONTriggerChannelStruct& a, | |
78 | const AliHLTMUONTriggerChannelStruct& b | |
79 | ) | |
80 | { | |
81 | return a.fTrigRecId == b.fTrigRecId and a.fChamber == b.fChamber and | |
82 | a.fSignal == b.fSignal and a.fRawDataWord == b.fRawDataWord; | |
83 | } | |
84 | ||
85 | inline bool operator != ( | |
86 | const AliHLTMUONTriggerChannelStruct& a, | |
87 | const AliHLTMUONTriggerChannelStruct& b | |
88 | ) | |
89 | { | |
90 | return not operator == (a, b); | |
91 | } | |
92 | ||
93 | ||
94 | bool operator == ( | |
95 | const AliHLTMUONTriggerChannelsBlockStruct& a, | |
96 | const AliHLTMUONTriggerChannelsBlockStruct& b | |
97 | ); | |
98 | ||
99 | inline bool operator != ( | |
100 | const AliHLTMUONTriggerChannelsBlockStruct& a, | |
101 | const AliHLTMUONTriggerChannelsBlockStruct& b | |
102 | ) | |
103 | { | |
104 | return not operator == (a, b); | |
105 | } | |
106 | ||
107 | #endif // ALIHLTMUONTRIGGERCHANNELSBLOCKSTRUCT_H |