#ifndef ALIHLTMUONRECHITSBLOCKSTRUCT_H
#define ALIHLTMUONRECHITSBLOCKSTRUCT_H
-/**************************************************************************
- * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
- * *
- * Author: The ALICE Off-line Project. *
- * Contributors are mentioned in the code where appropriate. *
- * *
- * Permission to use, copy, modify and distribute this software and its *
- * documentation strictly for non-commercial purposes is hereby granted *
- * without fee, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission notice *
- * appear in the supporting documentation. The authors make no claims *
- * about the suitability of this software for any purpose. It is *
- * provided "as is" without express or implied warranty. *
- **************************************************************************/
-
-/* $Id$ */
+/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+// $Id$
/**
* @file AliHLTMUONRecHitsBlockStruct.h
* @author Indranil Das <indra.das@saha.ac.in>,
* Artur Szostak <artursz@iafrica.com>
- * @date
- * @brief Definition of internal dimuon HLT reconstructed hit block structure.
- *
+ * @date 17 May 2007
+ * @brief Definition of internal dimuon HLT reconstructed hit data block structure.
+ *
* The structures are defined with C linkage since C generally gives us more
* binary compatibility between compilers.
*/
*/
struct AliHLTMUONRecHitStruct
{
+ // The flags word constains the following bit fields (bit 31 is most
+ // significant):
+ //
+ // bits: [ 31 -- 16 ][ 15 -- 12 ][ 11 --- 0 ]
+ // field: reserved chamber detElemId
+ //
+ // Where we have,
+ // reserved bits must be set to zero.
+ // chamber - specifies the chamber number in the range [0..13], 0xF for invalid.
+ // detElemId - specifies the detector element ID number.
+ AliHLTUInt32_t fFlags;
+
AliHLTFloat32_t fX; // X coordinate.
AliHLTFloat32_t fY; // Y coordinate.
AliHLTFloat32_t fZ; // Z coordinate.
*/
struct AliHLTMUONRecHitsBlockStruct
{
- AliHLTUInt32_t fNhits; // Number of hits in this block.
- AliHLTMUONRecHitStruct fHit[/*fNhits*/]; // Array of reconstructed hits.
+ AliHLTMUONDataBlockHeader fHeader; // Common data block header
+
+ // Array of reconstructed hits.
+ //AliHLTMUONRecHitStruct fHit[/*fHeader.fNrecords*/];
};
} // extern "C"
std::ostream& stream, const AliHLTMUONRecHitStruct& hit
)
{
- stream << "{fX = " << hit.fX << ", fY = " << hit.fY << ", fZ = "
- << hit.fZ << "}";
+ std::ios::fmtflags oldflags = stream.flags();
+ stream << "{fFlags = " << std::showbase << std::hex
+ << hit.fFlags << std::dec << ", fX = " << hit.fX
+ << ", fY = " << hit.fY << ", fZ = " << hit.fZ << "}";
+ stream.flags(oldflags);
return stream;
}
/**
* Stream operator for usage with std::ostream classes which prints the
* AliHLTMUONRecHitsBlockStruct in the following format:
- * {fNhits = xx, fHit[] = [{..}, {..}, ...]}
+ * {fHeader = xx, fHit[] = [{..}, {..}, ...]}
*/
-inline std::ostream& operator << (
+std::ostream& operator << (
std::ostream& stream, const AliHLTMUONRecHitsBlockStruct& block
- )
-{
- stream << "{fNhits = " << block.fNhits << ", fHit[] = [";
- if (block.fNhits > 0) stream << block.fHit[0];
- for (AliHLTUInt32_t i = 1; i < block.fNhits; i++)
- stream << ", " << block.fHit[i];
- stream << "]}";
- return stream;
-}
+ );
inline bool operator == (
const AliHLTMUONRecHitStruct& a, const AliHLTMUONRecHitStruct& b
)
{
- return a.fX == b.fX and a.fY == b.fY and a.fZ == b.fZ;
+ return a.fFlags == b.fFlags and a.fX == b.fX and a.fY == b.fY and a.fZ == b.fZ;
}
inline bool operator != (
}
-inline bool operator == (
- const AliHLTMUONRecHitsBlockStruct& a, const AliHLTMUONRecHitsBlockStruct& b
- )
-{
- // First check if the blocks have the same number of hits. If they do then
- // check if every hit is the same. In either case if we find a difference
- // return false.
- if (a.fNhits != b.fNhits) return false;
- for (AliHLTUInt32_t i = 0; i < a.fNhits; i++)
- if (a.fHit[i] != b.fHit[i]) return false;
- return true;
-}
+bool operator == (
+ const AliHLTMUONRecHitsBlockStruct& a,
+ const AliHLTMUONRecHitsBlockStruct& b
+ );
inline bool operator != (
- const AliHLTMUONRecHitsBlockStruct& a, const AliHLTMUONRecHitsBlockStruct& b
+ const AliHLTMUONRecHitsBlockStruct& a,
+ const AliHLTMUONRecHitsBlockStruct& b
)
{
return not operator == (a, b);