]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/MUON/AliHLTMUONTrigRecsDebugBlockStruct.h
The high performance decoder is now under MUON/
[u/mrichter/AliRoot.git] / HLT / MUON / AliHLTMUONTrigRecsDebugBlockStruct.h
1 #ifndef ALIHLTMUONTRIGRECSDEBUGBLOCKSTRUCT_H
2 #define ALIHLTMUONTRIGRECSDEBUGBLOCKSTRUCT_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   AliHLTMUONTrigRecsDebugBlockStruct.h
10  * @author Artur Szostak <artursz@iafrica.com>
11  * @date   
12  * @brief  Definition of internal dimuon HLT data structures for storing debugging
13  *         information about 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
21 extern "C"
22 {
23
24 /**
25  * Debug trigger record structures contain debug information about the trigger
26  * records that were decoded from the dimuon hardware trigger electronics.
27  */
28 struct AliHLTMUONTrigRecInfoStruct
29 {
30         AliHLTInt32_t fTrigRecId; // The corresponding trigger record ID this
31                                   // debug information corresponds to. -1 == invalid.
32
33         AliHLTInt32_t fDetElemId[4];  // Detector ID numbers from AliRoot geometry
34                                    // on which the hit clusters were found.
35                                    // fDetElemId[0] is for chamber 11, fDetElemId[1]
36                                    // for chamber 12 etc.
37
38         // The parameters used for momentum estimation:
39         AliHLTFloat32_t fZmiddle; // Particle momentum X component in GeV/c.
40         AliHLTFloat32_t fBl; // The integrated magnetic field in (T.m) tesla metres.
41 };
42
43 /**
44  * AliHLTMUONTrigRecsDebugBlockStruct defines the format of the internal
45  * data block for storing debugging information for trigger records.
46  */
47 struct AliHLTMUONTrigRecsDebugBlockStruct
48 {
49         AliHLTMUONDataBlockHeader fHeader; // Common data block header
50
51         // Array of trigger records.
52 #ifndef __SUNPRO_CC
53         AliHLTMUONTrigRecInfoStruct fTrigRecInfo[/*fHeader.fNrecords*/];
54 #else
55         AliHLTMUONTrigRecInfoStruct fTrigRecInfo[1];
56 #endif
57 };
58
59 } // extern "C"
60
61
62 /**
63  * Stream operator for usage with std::ostream classes which prints the trigger
64  * record debug information in the following format:
65  *  {fTrigRecId = xx, fDetElemId = [aa, bb, cc, dd], fZmiddle = yy, fBl = zz}
66  */
67 std::ostream& operator << (
68                 std::ostream& stream, const AliHLTMUONTrigRecInfoStruct& info
69         );
70
71 /**
72  * Stream operator for usage with std::ostream classes which prints the
73  * AliHLTMUONTrigRecsDebugBlockStruct in the following format:
74  *   {fHeader = xx, fTrigRecInfo[] = [{..}, {..}, ...]}
75  */
76 std::ostream& operator << (
77                 std::ostream& stream, const AliHLTMUONTrigRecsDebugBlockStruct& block
78         );
79
80
81 inline bool operator == (
82                 const AliHLTMUONTrigRecInfoStruct& a,
83                 const AliHLTMUONTrigRecInfoStruct& b
84         )
85 {
86         return a.fTrigRecId == b.fTrigRecId and a.fDetElemId == b.fDetElemId
87                 and a.fZmiddle == b.fZmiddle and a.fBl == b.fBl;
88 }
89
90 inline bool operator != (
91                 const AliHLTMUONTrigRecInfoStruct& a,
92                 const AliHLTMUONTrigRecInfoStruct& b
93         )
94 {
95         return not operator == (a, b);
96 }
97
98
99 bool operator == (
100                 const AliHLTMUONTrigRecsDebugBlockStruct& a,
101                 const AliHLTMUONTrigRecsDebugBlockStruct& b
102         );
103
104 inline bool operator != (
105                 const AliHLTMUONTrigRecsDebugBlockStruct& a,
106                 const AliHLTMUONTrigRecsDebugBlockStruct& b
107         )
108 {
109         return not operator == (a, b);
110 }
111
112 #endif // ALIHLTMUONTRIGRECSDEBUGBLOCKSTRUCT_H