]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/MUON/AliHLTMUONTrigRecsDebugBlockStruct.h
Applying fixes and updates (Indra)
[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 #ifndef __SUNPRO_CC
51         AliHLTMUONTrigRecInfoStruct fTrigRecInfo[/*fHeader.fNrecords*/];
52 #else
53         AliHLTMUONTrigRecInfoStruct fTrigRecInfo[1];
54 #endif
55 };
56
57 } // extern "C"
58
59
60 /**
61  * Stream operator for usage with std::ostream classes which prints the trigger
62  * record debug information in the following format:
63  *  {fTrigRecId = xx, fDetElemId = yy, fZmiddle = zz, fBl = ww}
64  */
65 std::ostream& operator << (
66                 std::ostream& stream, const AliHLTMUONTrigRecInfoStruct& info
67         );
68
69 /**
70  * Stream operator for usage with std::ostream classes which prints the
71  * AliHLTMUONTrigRecsDebugBlockStruct in the following format:
72  *   {fHeader = xx, fTrigRecInfo[] = [{..}, {..}, ...]}
73  */
74 std::ostream& operator << (
75                 std::ostream& stream, const AliHLTMUONTrigRecsDebugBlockStruct& block
76         );
77
78
79 inline bool operator == (
80                 const AliHLTMUONTrigRecInfoStruct& a,
81                 const AliHLTMUONTrigRecInfoStruct& b
82         )
83 {
84         return a.fTrigRecId == b.fTrigRecId and a.fDetElemId == b.fDetElemId
85                 and a.fZmiddle == b.fZmiddle and a.fBl == b.fBl;
86 }
87
88 inline bool operator != (
89                 const AliHLTMUONTrigRecInfoStruct& a,
90                 const AliHLTMUONTrigRecInfoStruct& b
91         )
92 {
93         return not operator == (a, b);
94 }
95
96
97 bool operator == (
98                 const AliHLTMUONTrigRecsDebugBlockStruct& a,
99                 const AliHLTMUONTrigRecsDebugBlockStruct& b
100         );
101
102 inline bool operator != (
103                 const AliHLTMUONTrigRecsDebugBlockStruct& a,
104                 const AliHLTMUONTrigRecsDebugBlockStruct& b
105         )
106 {
107         return not operator == (a, b);
108 }
109
110 #endif // ALIHLTMUONTRIGRECSDEBUGBLOCKSTRUCT_H