]>
Commit | Line | Data |
---|---|---|
90a74d7a | 1 | #ifndef ALIHLTMUONSINGLESDECISIONBLOCKSTRUCT_H |
2 | #define ALIHLTMUONSINGLESDECISIONBLOCKSTRUCT_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 AliHLTMUONSinglesDecisionBlockStruct.h | |
10 | * @author Artur Szostak <artursz@iafrica.com> | |
11 | * @date | |
12 | * @brief Definition of internal dimuon HLT trigger decision data structure | |
13 | * containing decision information for single tracks. | |
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 | ||
21 | extern "C" | |
22 | { | |
23 | ||
24 | /** | |
25 | * Structure contains information about the trigger decision for a single track. | |
26 | */ | |
27 | struct AliHLTMUONTrackDecisionStruct | |
28 | { | |
29 | AliHLTInt32_t fTrackId; // The ID number of the track we are referring to. | |
30 | // This could also be a trigger record ID. | |
31 | ||
32 | // The trigger bits have the following meaning: | |
33 | // bit: [31 --- 2][ 1 ][ 0 ] | |
34 | // field: reserved hipt lopt | |
35 | // Reserved bits should be set to zero. | |
36 | // hipt == passed high pt cut. lopt == passed low pt cut. | |
37 | AliHLTUInt32_t fTriggerBits; | |
38 | }; | |
39 | ||
40 | /** | |
41 | * AliHLTMUONSinglesDecisionBlockStruct defines the format of the internal | |
42 | * dimuon HLT decision data block for individual tracks. | |
43 | */ | |
44 | struct AliHLTMUONSinglesDecisionBlockStruct | |
45 | { | |
46 | AliHLTMUONDataBlockHeader fHeader; // Common data block header. | |
47 | AliHLTUInt32_t fNlowPt; // Number of low pt triggers. | |
48 | AliHLTUInt32_t fNhighPt; // Number of high pt triggers. | |
49 | ||
50 | // Array of decisions for individual tracks. | |
e83e889b | 51 | #ifndef __SUNPRO_CC |
90a74d7a | 52 | AliHLTMUONTrackDecisionStruct fDecision[/*fHeader.fNrecords*/]; |
e83e889b | 53 | #else |
54 | AliHLTMUONTrackDecisionStruct fDecision[1]; | |
55 | #endif | |
90a74d7a | 56 | }; |
57 | ||
58 | } // extern "C" | |
59 | ||
60 | ||
61 | /** | |
62 | * Stream operator for usage with std::ostream classes which prints the | |
63 | * trigger decision information for individual tracks in the following format: | |
64 | * {fTrackId = xx, fTriggerBits = 0xYY} | |
65 | */ | |
66 | inline std::ostream& operator << ( | |
67 | std::ostream& stream, const AliHLTMUONTrackDecisionStruct& trig | |
68 | ) | |
69 | { | |
70 | stream << "{fTrackId = " << trig.fTrackId << ", fTriggerBits = " | |
71 | << std::showbase << std::hex << trig.fTriggerBits << std::dec | |
72 | << "}"; | |
73 | return stream; | |
74 | } | |
75 | ||
76 | /** | |
77 | * Stream operator for usage with std::ostream classes which prints the | |
78 | * AliHLTMUONSinglesDecisionBlockStruct in the following format: | |
79 | * {fHeader = xx, fNlowPt = yy, fNhighPt = zz, fDecision[] = [{..}, {..}, ...]} | |
80 | */ | |
81 | std::ostream& operator << ( | |
82 | std::ostream& stream, | |
83 | const AliHLTMUONSinglesDecisionBlockStruct& block | |
84 | ); | |
85 | ||
86 | ||
87 | inline bool operator == ( | |
88 | const AliHLTMUONTrackDecisionStruct& a, | |
89 | const AliHLTMUONTrackDecisionStruct& b | |
90 | ) | |
91 | { | |
92 | return a.fTrackId == b.fTrackId and a.fTriggerBits == b.fTriggerBits; | |
93 | } | |
94 | ||
95 | inline bool operator != ( | |
96 | const AliHLTMUONTrackDecisionStruct& a, | |
97 | const AliHLTMUONTrackDecisionStruct& b | |
98 | ) | |
99 | { | |
100 | return not operator == (a, b); | |
101 | } | |
102 | ||
103 | ||
104 | bool operator == ( | |
105 | const AliHLTMUONSinglesDecisionBlockStruct& a, | |
106 | const AliHLTMUONSinglesDecisionBlockStruct& b | |
107 | ); | |
108 | ||
109 | inline bool operator != ( | |
110 | const AliHLTMUONSinglesDecisionBlockStruct& a, | |
111 | const AliHLTMUONSinglesDecisionBlockStruct& b | |
112 | ) | |
113 | { | |
114 | return not operator == (a, b); | |
115 | } | |
116 | ||
117 | #endif // ALIHLTMUONSINGLESDECISIONBLOCKSTRUCT_H |