]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/MUON/AliHLTMUONRecHitsBlockStruct.h
Disable retireval of DCS data points from AliShuttle for SDD
[u/mrichter/AliRoot.git] / HLT / MUON / AliHLTMUONRecHitsBlockStruct.h
index 5b60a1f4853499174167393d9159ec3d538a9db3..dbe77041ab9e781e25226a080a4e5644ced9eb85 100644 (file)
@@ -1,29 +1,17 @@
 #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.
  */
@@ -41,6 +29,18 @@ extern "C"
  */
 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.
@@ -52,8 +52,10 @@ struct AliHLTMUONRecHitStruct
  */
 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"
@@ -67,34 +69,29 @@ inline std::ostream& operator << (
                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 != (
@@ -105,21 +102,14 @@ 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);