]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/MUON/AliHLTMUONTrigRecsDebugBlockStruct.h
Adding internal HLT data blocks for debugging information from the trigger chambers.
[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;  // Detector ID number from AliRoot geometry
34                                    // on which the hit clusters were found.
35
36         // The parameters used for momentum estimation:
37         AliHLTFloat32_t fZmiddle; // Particle momentum X component in GeV/c.
38         AliHLTFloat32_t fBl; // The integrated magnetic field in (T.m) tesla metres.
39 };
40
41 /**
42  * AliHLTMUONTrigRecsDebugBlockStruct defines the format of the internal
43  * data block for storing debugging information for trigger records.
44  */
45 struct AliHLTMUONTrigRecsDebugBlockStruct
46 {
47         AliHLTMUONDataBlockHeader fHeader; // Common data block header
48
49         // Array of trigger records.
50         AliHLTMUONTrigRecInfoStruct fTrigRecInfo[/*fHeader.fNrecords*/];
51 };
52
53 } // extern "C"
54
55
56 /**
57  * Stream operator for usage with std::ostream classes which prints the trigger
58  * record debug information in the following format:
59  *  {fTrigRecId = xx, fDetElemId = yy, fZmiddle = zz, fBl = ww}
60  */
61 std::ostream& operator << (
62                 std::ostream& stream, const AliHLTMUONTrigRecInfoStruct& info
63         );
64
65 /**
66  * Stream operator for usage with std::ostream classes which prints the
67  * AliHLTMUONTrigRecsDebugBlockStruct in the following format:
68  *   {fHeader = xx, fTrigRecInfo[] = [{..}, {..}, ...]}
69  */
70 std::ostream& operator << (
71                 std::ostream& stream, const AliHLTMUONTrigRecsDebugBlockStruct& block
72         );
73
74
75 inline bool operator == (
76                 const AliHLTMUONTrigRecInfoStruct& a,
77                 const AliHLTMUONTrigRecInfoStruct& b
78         )
79 {
80         return a.fTrigRecId == b.fTrigRecId and a.fDetElemId == b.fDetElemId
81                 and a.fZmiddle == b.fZmiddle and a.fBl == b.fBl;
82 }
83
84 inline bool operator != (
85                 const AliHLTMUONTrigRecInfoStruct& a,
86                 const AliHLTMUONTrigRecInfoStruct& b
87         )
88 {
89         return not operator == (a, b);
90 }
91
92
93 bool operator == (
94                 const AliHLTMUONTrigRecsDebugBlockStruct& a,
95                 const AliHLTMUONTrigRecsDebugBlockStruct& b
96         );
97
98 inline bool operator != (
99                 const AliHLTMUONTrigRecsDebugBlockStruct& a,
100                 const AliHLTMUONTrigRecsDebugBlockStruct& b
101         )
102 {
103         return not operator == (a, b);
104 }
105
106 #endif // ALIHLTMUONTRIGRECSDEBUGBLOCKSTRUCT_H