1 #ifndef ALIHLTMUONTRIGGERRECORDSBLOCKSTRUCT_H
2 #define ALIHLTMUONTRIGGERRECORDSBLOCKSTRUCT_H
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
9 * @file AliHLTMUONTriggerRecordsBlockStruct.h
10 * @author Artur Szostak <artursz@iafrica.com>
12 * @brief Definition of internal dimuon HLT trigger record data block structure.
14 * The structures are defined with C linkage since C generally gives us more
15 * binary compatibility between compilers.
18 #include "AliHLTMUONRecHitsBlockStruct.h"
24 * Trigger record structures containing information decoded from the dimuon
25 * spectrometer's hardware trigger electronics.
27 struct AliHLTMUONTriggerRecordStruct
29 AliHLTInt32_t fId; // Each trigger record should have an ID number unique
30 // for a given event. -1 == invalid.
32 // The flags word constains the following bit fields (bit 31 is most
34 // bits: [31][30][29 --- 4][ 3 ][ 2 ][ 1 ][ 0 ]
35 // field: - + reserved hst[3] hst[2] hst[1] hst[0]
36 // Where fields hst[i] indicates if fHit[i] has been filled/set.
37 // Reserved bits should be set to zero.
38 // Particle sign: if '-' is set then particle has minus sign.
39 // if '+' is set then particle has negative sign.
40 // Either '+' or '-' should be set and if neither then the particle
42 AliHLTUInt32_t fFlags;
44 AliHLTFloat32_t fPx; // Particle momentum X component in GeV/c.
45 AliHLTFloat32_t fPy; // Particle momentum Y component in GeV/c.
46 AliHLTFloat32_t fPz; // Particle momentum Z component in GeV/c.
48 // Particle hit coordinates on trigger chambers 11 to 14.
49 AliHLTMUONRecHitStruct fHit[4];
53 * AliHLTMUONTriggerRecordsBlockStruct defines the format of the internal
54 * trigger records data block.
56 struct AliHLTMUONTriggerRecordsBlockStruct
58 AliHLTMUONDataBlockHeader fHeader; // Common data block header
60 // Array of trigger records.
61 //AliHLTMUONTriggerRecordStruct fTriggerRecord[/*fHeader.fNrecords*/];
68 * Stream operator for usage with std::ostream classes which prints the trigger
69 * record in the following format:
70 * {fId = xx, fFlags = 0xYY, fPx = uu, fPy = vv, fPz = ww, fHit[0] = {...},
71 * fHit[1] = {...}, fHit[2] = {...}, fHit[3] = {...}}
73 std::ostream& operator << (
74 std::ostream& stream, const AliHLTMUONTriggerRecordStruct& trigrec
78 * Stream operator for usage with std::ostream classes which prints the
79 * AliHLTMUONTriggerRecordsBlockStruct in the following format:
80 * {fHeader = xx, fTriggerRecord[] = [{..}, {..}, ...]}
82 std::ostream& operator << (
83 std::ostream& stream, const AliHLTMUONTriggerRecordsBlockStruct& block
87 inline bool operator == (
88 const AliHLTMUONTriggerRecordStruct& a,
89 const AliHLTMUONTriggerRecordStruct& b
92 return a.fId == b.fId and a.fFlags == b.fFlags
93 and a.fPx == b.fPx and a.fPy == b.fPy and a.fPz == b.fPz
94 and a.fHit[0] == b.fHit[0] and a.fHit[1] == b.fHit[1]
95 and a.fHit[2] == b.fHit[2] and a.fHit[3] == b.fHit[3];
98 inline bool operator != (
99 const AliHLTMUONTriggerRecordStruct& a,
100 const AliHLTMUONTriggerRecordStruct& b
103 return not operator == (a, b);
108 const AliHLTMUONTriggerRecordsBlockStruct& a,
109 const AliHLTMUONTriggerRecordsBlockStruct& b
112 inline bool operator != (
113 const AliHLTMUONTriggerRecordsBlockStruct& a,
114 const AliHLTMUONTriggerRecordsBlockStruct& b
117 return not operator == (a, b);
120 #endif // ALIHLTMUONTRIGGERRECORDSBLOCKSTRUCT_H