]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TRD/AliHLTTRDCluster.h
ALIROOT-5600 - skip non-participating detector modules
[u/mrichter/AliRoot.git] / HLT / TRD / AliHLTTRDCluster.h
index 7b3658f185e7828ae0db595475a82bc218996770..a96052d6ce6e0946d7de148d3b28efa3ccbbc316 100644 (file)
@@ -1,46 +1,99 @@
+//-*- Mode: C++ -*-
+// $Id$
+
 #ifndef ALIHLTTRDCLUSTER_H
 #define ALIHLTTRDCLUSTER_H
+//* This file is property of and copyright by the ALICE HLT Project        * 
+//* ALICE Experiment at CERN, All rights reserved.                         *
+//* See cxx source for full Copyright notice                               *
+
+/** @file   AliHLTTRDCluster.h
+    @author Thedoor Rascanu
+    @date   
+    @brief  A datacontainer for clusters fitting component for the HLT. 
+*/
 
 #include "AliTRDcluster.h"
 #include "AliHLTDataTypes.h"
 
 class AliHLTTRDCluster
 {
- public:
+public:
   AliHLTTRDCluster();
-  AliHLTTRDCluster(AliTRDcluster* inCluster);
-  void ExportTRDCluster(AliTRDcluster* outCluster);
-
-  AliHLTUInt8_t *GetEndPointer() // Returns pointer to the end of the cluster
-    { return ((AliHLTUInt8_t *) this + fSize); };
-  AliHLTUInt32_t GetSize(){ return fSize; };
-  void Print();
-  
-  AliHLTUInt32_t fSize; // Size of the Cluster
-      
+  AliHLTTRDCluster(const AliTRDcluster* const inCluster);
+  void ExportTRDCluster(AliTRDcluster* const outCluster) const;
+  static AliHLTUInt32_t SaveAt(AliHLTUInt8_t *const block, const AliTRDcluster* const inClust);
+  static AliHLTUInt32_t LoadFrom(AliTRDcluster *const outClust, const AliHLTUInt8_t *const block);
   
+private:
+  // From AliTRDcluster
+  UInt_t   fSignals;        // Signals in the cluster
+
+  UChar_t  fPadCol;         // Central pad number in column direction 
+  UChar_t  fPadRow;         // Central pad number in row direction 
+  UChar_t  fPadTime;        // Uncalibrated time bin number 
+  UChar_t  fBits;           // Bits of the cluster
+};
+
+// disable warnings to avoid
+// warning: base class ‘class ...’ has a non-virtual destructor
+#if defined __GNUC__
+#if __GNUC__ == 4 && __GNUC_MINOR__ > 3
+#pragma GCC diagnostic ignored "-Weffc++"
+#else
+#pragma GCC system_header 
+#endif
+#elif defined __SUNPRO_CC
+#pragma disable_warn
+#elif defined _MSC_VER
+#pragma warning(push, 1)
+#endif
+
+class AliHLTTRDExtCluster: public AliHLTTRDCluster
+{
+ public:
+  AliHLTTRDExtCluster();
+  AliHLTTRDExtCluster(const AliTRDcluster* const inCluster);
+  void ExportTRDCluster(AliTRDcluster* const outCluster) const;
+  void Print() const;
+
  private:
   // From AliCluster
-  Float_t  fX;        // X of the cluster in the tracking c.s.
-  Float_t  fY;        // Y of the cluster in the tracking c.s.
-  Float_t  fZ;        // Z of the cluster in the tracking c.s.
+  Float_t  fX;             // X of the cluster in the tracking c.s.
+  Float_t  fY;             // Y of the cluster in the tracking c.s.
+  Float_t  fZ;             // Z of the cluster in the tracking c.s.
 
-  Bool_t fIsInChamber;
-  Bool_t fIsShared;
-  Short_t fDetector;       //  TRD detector number
-  Char_t  fLocalTimeBin;   //  T0-calibrated time bin number
-  Float_t fQ;              //  Amplitude 
-  UChar_t fClusterMasking; //  Bit field containing cluster status information;
+  // UChar_t  fClusterMasking; // Bit field containing cluster status information
+  // Char_t   fLocalTimeBin;   // T0-calibrated time bin number
+  // UChar_t  fNPads;          //  Number of pads in cluster 
+  // Float_t  fCenter;         //  Center of the cluster relative to the pad  
 
-  // From AliTRDcluster
-   UChar_t fPadCol;         //  Central pad number in column direction 
-   UChar_t fPadRow;         //  Central pad number in row direction 
-   UChar_t fPadTime;        //  Uncalibrated time bin number 
-   //   Short_t fSignals[7];     //  Signals in the cluster 
-//   UChar_t fNPads;          //  Number of pads in cluster 
-//   Float_t fCenter;         //  Center of the cluster relative to the pad  
-
-   
+};
+
+#if defined __GNUC__
+#if __GNUC__ == 4 && __GNUC_MINOR__ > 3
+#pragma GCC diagnostic warning "-Weffc++"
+#endif
+#elif defined __SUNPRO_CC
+#pragma enable_warn
+#elif defined _MSC_VER
+#pragma warning(pop)
+#endif
+
+struct AliHLTTRDClustersArray {
+#ifdef HAVE_NOT_ALITRD_CLUSTERIZER_r42837
+  typedef AliHLTTRDExtCluster cluster_type;
+#else
+  typedef AliHLTTRDCluster cluster_type;
+#endif
+  AliHLTTRDClustersArray(Int_t det):fDetector(det),fCount(0){}
+  Short_t  fDetector;
+  UShort_t fCount;
+#if defined(__HP_aCC) || defined(__DECCXX) || defined(__SUNPRO_CC)
+  cluster_type fCluster[1];
+#else
+  cluster_type fCluster[0];
+#endif
 };
 
 #endif