Fixing warnings
[u/mrichter/AliRoot.git] / HLT / MUON / AliHLTMUONClustersBlockStruct.h
CommitLineData
cfcef7ba 1#ifndef ALIHLTMUONCLUSTERSBLOCKSTRUCT_H
2#define ALIHLTMUONCLUSTERSBLOCKSTRUCT_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$
cfcef7ba 7
8/**
9 * @file AliHLTMUONClustersBlockStruct.h
10 * @author Artur Szostak <artursz@iafrica.com>
83d66053 11 * @date 18 May 2007
12 * @brief Definition of internal dimuon HLT block structure.
13 *
14 * The structure contains extra information about a cluster and its corresponding
15 * reconstructed hit, such as total charge and number of channels.
16 * The individual channel information is contained in AliHLTMUONChannelStruct structures.
17 * The extra information is useful for debugging purposes.
18 *
cfcef7ba 19 * The structures are defined with C linkage since C generally gives us more
20 * binary compatibility between compilers.
21 */
22
23#include "AliHLTMUONDataTypes.h"
24#include "AliHLTMUONRecHitsBlockStruct.h"
25#include <ostream>
26
27extern "C"
28{
29
30/**
83d66053 31 * Extra debugging information about a cluster and its reconstructed hit.
cfcef7ba 32 */
33struct AliHLTMUONClusterStruct
34{
b08ffe98 35 AliHLTInt32_t fId; // Unique ID for the cluster. It must be at
36 // least unique for any given event. -1 == invalid.
cfcef7ba 37
38 AliHLTMUONRecHitStruct fHit; // Corresponding reconstructed hit.
39
40 AliHLTInt32_t fDetElemId; // Detector ID number from AliRoot geometry
41 // on which the cluster was found.
42
66622a82 43 AliHLTUInt16_t fNchannelsB; // Number of channels/pads in the cluster in bending plane.
44 AliHLTUInt16_t fNchannelsNB; // Number of channels/pads in the cluster in non-bending plane.
83d66053 45
66622a82 46 AliHLTFloat32_t fChargeB; // Cluster charge in bending plane. Can be -1 if invalid or uncomputed.
47 AliHLTFloat32_t fChargeNB; // Cluster charge in non-bending plane. Can be -1 if invalid or uncomputed.
cfcef7ba 48};
49
50/**
51 * AliHLTMUONClusterBlockStruct defines the format of the internal cluster
52 * data block.
53 */
54struct AliHLTMUONClustersBlockStruct
55{
56 AliHLTMUONDataBlockHeader fHeader; // Common data block header
57
58 // Array of clusters.
23ad6161 59 //AliHLTMUONClusterStruct fCluster[/*fHeader.fNrecords*/];
cfcef7ba 60};
61
62} // extern "C"
63
64
65/**
66 * Stream operator for usage with std::ostream classes which prints the
67 * AliHLTMUONClusterStruct in the following format:
68 * {fId = xx, fHit = {...}, fDetElemId = yy, fNchannels = zz}
69 */
70std::ostream& operator << (
71 std::ostream& stream, const AliHLTMUONClusterStruct& cluster
72 );
73
74/**
75 * Stream operator for usage with std::ostream classes which prints the
76 * AliHLTMUONClustersBlockStruct in the following format:
77 * {fHeader = xx, fCluster[] = [{..}, {..}, ...]}
78 */
79std::ostream& operator << (
80 std::ostream& stream, const AliHLTMUONClustersBlockStruct& block
81 );
82
83
84inline bool operator == (
85 const AliHLTMUONClusterStruct& a,
86 const AliHLTMUONClusterStruct& b
87 )
88{
89 return a.fId == b.fId and a.fHit == b.fHit and
66622a82 90 a.fDetElemId == b.fDetElemId and a.fNchannelsB == b.fNchannelsB and
91 a.fNchannelsNB == b.fNchannelsNB and a.fChargeB == b.fChargeB and
92 a.fChargeNB == b.fChargeNB;
cfcef7ba 93}
94
95inline bool operator != (
96 const AliHLTMUONClusterStruct& a,
97 const AliHLTMUONClusterStruct& b
98 )
99{
100 return not operator == (a, b);
101}
102
103
104bool operator == (
105 const AliHLTMUONClustersBlockStruct& a,
106 const AliHLTMUONClustersBlockStruct& b
107 );
108
109inline bool operator != (
110 const AliHLTMUONClustersBlockStruct& a,
111 const AliHLTMUONClustersBlockStruct& b
112 )
113{
114 return not operator == (a, b);
115}
116
117#endif // ALIHLTMUONCLUSTERSBLOCKSTRUCT_H