]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/MUON/AliHLTMUONSinglesDecisionBlockStruct.h
Update From Debojit
[u/mrichter/AliRoot.git] / HLT / MUON / AliHLTMUONSinglesDecisionBlockStruct.h
CommitLineData
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
1d8ae082 6// $Id$
90a74d7a 7
8/**
9 * @file AliHLTMUONSinglesDecisionBlockStruct.h
10 * @author Artur Szostak <artursz@iafrica.com>
1d8ae082 11 * @date 21 May 2007
90a74d7a 12 * @brief Definition of internal dimuon HLT trigger decision data structure
13 * containing decision information for single tracks.
1d8ae082 14 *
90a74d7a 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
21extern "C"
22{
23
24/**
25 * Structure contains information about the trigger decision for a single track.
26 */
27struct 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;
c9537879 38
39 AliHLTFloat32_t fPt; // The calculated transverse momentum of the track in (GeV/c).
90a74d7a 40};
41
42/**
43 * AliHLTMUONSinglesDecisionBlockStruct defines the format of the internal
44 * dimuon HLT decision data block for individual tracks.
45 */
46struct AliHLTMUONSinglesDecisionBlockStruct
47{
48 AliHLTMUONDataBlockHeader fHeader; // Common data block header.
49 AliHLTUInt32_t fNlowPt; // Number of low pt triggers.
50 AliHLTUInt32_t fNhighPt; // Number of high pt triggers.
51
52 // Array of decisions for individual tracks.
23ad6161 53 //AliHLTMUONTrackDecisionStruct fDecision[/*fHeader.fNrecords*/];
90a74d7a 54};
55
56} // extern "C"
57
58
59/**
60 * Stream operator for usage with std::ostream classes which prints the
61 * trigger decision information for individual tracks in the following format:
62 * {fTrackId = xx, fTriggerBits = 0xYY}
63 */
64inline std::ostream& operator << (
65 std::ostream& stream, const AliHLTMUONTrackDecisionStruct& trig
66 )
67{
710ddf4b 68 std::ios::fmtflags oldflags = stream.flags();
90a74d7a 69 stream << "{fTrackId = " << trig.fTrackId << ", fTriggerBits = "
70 << std::showbase << std::hex << trig.fTriggerBits << std::dec
c9537879 71 << ", fPt = " << trig.fPt
90a74d7a 72 << "}";
710ddf4b 73 stream.flags(oldflags);
90a74d7a 74 return stream;
75}
76
77/**
78 * Stream operator for usage with std::ostream classes which prints the
79 * AliHLTMUONSinglesDecisionBlockStruct in the following format:
80 * {fHeader = xx, fNlowPt = yy, fNhighPt = zz, fDecision[] = [{..}, {..}, ...]}
81 */
82std::ostream& operator << (
83 std::ostream& stream,
84 const AliHLTMUONSinglesDecisionBlockStruct& block
85 );
86
87
88inline bool operator == (
89 const AliHLTMUONTrackDecisionStruct& a,
90 const AliHLTMUONTrackDecisionStruct& b
91 )
92{
c9537879 93 return a.fTrackId == b.fTrackId and a.fTriggerBits == b.fTriggerBits
94 and a.fPt == b.fPt;
90a74d7a 95}
96
97inline bool operator != (
98 const AliHLTMUONTrackDecisionStruct& a,
99 const AliHLTMUONTrackDecisionStruct& b
100 )
101{
102 return not operator == (a, b);
103}
104
105
106bool operator == (
107 const AliHLTMUONSinglesDecisionBlockStruct& a,
108 const AliHLTMUONSinglesDecisionBlockStruct& b
109 );
110
111inline bool operator != (
112 const AliHLTMUONSinglesDecisionBlockStruct& a,
113 const AliHLTMUONSinglesDecisionBlockStruct& b
114 )
115{
116 return not operator == (a, b);
117}
118
119#endif // ALIHLTMUONSINGLESDECISIONBLOCKSTRUCT_H