]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
coding conventions
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 17 Mar 2010 23:11:33 +0000 (23:11 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 17 Mar 2010 23:11:33 +0000 (23:11 +0000)
HLT/TPCLib/AliHLTTPCMemHandler.cxx
HLT/TPCLib/AliHLTTPCMemHandler.h

index 8ffa9c0bd6bdceac166721bb65758b3f002552a4..674f3f0549293326f5f5f15b2fa81cf87c9bb58c 100644 (file)
 //* provided "as is" without express or implied warranty.                  *
 //**************************************************************************
 
-/** @file   AliHLTTPCMemHandler.cxx
-    @author U. Frankenfeld, A. Vestbo, C. Loizides, maintained by
-            Matthias Richter
-    @date   
-    @brief  input interface base class for the TPC tracking code before
-            migration to the HLT component framework
-*/
-
+//  @file   AliHLTTPCMemHandler.cxx
+//  @author U. Frankenfeld, A. Vestbo, C. Loizides, maintained by
+//          Matthias Richter
+//  @date   
+//  @brief  input interface base class for the TPC tracking code before
+//          migration to the HLT component framework
 
 #include <cassert>
 #include "AliHLTTPCRootTypes.h"
@@ -36,6 +34,7 @@
 #include "AliHLTTPCSpacePointData.h"
 #include "AliHLTTPCTrackArray.h"
 #include "AliHLTTPCMemHandler.h"
+#include "TMath.h"
 
 #if __GNUC__ >= 3
 using namespace std;
@@ -110,7 +109,7 @@ void AliHLTTPCMemHandler::ResetROI()
     }
 }
 
-void AliHLTTPCMemHandler::SetROI(Float_t *eta,Int_t */*slice*/)
+void AliHLTTPCMemHandler::SetROI(const Float_t *eta,Int_t */*slice*/)
 {
   // Init the Look-up table for the Region of Interest mode.
   //   Here you can specify a certain etaregion, - all data
@@ -121,7 +120,7 @@ void AliHLTTPCMemHandler::SetROI(Float_t *eta,Int_t */*slice*/)
   //   slice[1] = maximum slice
 
 
-  if(eta[1]==0)
+  if(TMath::Abs(eta[1])<.00001)
     {
       LOG(AliHLTTPCLog::kWarning,"AliHLTTPCMemHandler::SetROI","Eta Values")
        <<"Bad ROI parameters."<<ENDLOG;
@@ -148,7 +147,7 @@ void AliHLTTPCMemHandler::SetROI(Float_t *eta,Int_t */*slice*/)
       
       fEtaMinTimeBin[i] = (Int_t)xyz[2];
       
-      if(eta[0]==0)
+      if(TMath::Abs(eta[0])<.00001)
        fEtaMaxTimeBin[i] = 445;
       else
        {
@@ -588,7 +587,7 @@ UShort_t AliHLTTPCMemHandler::Read(UInt_t *comp, UInt_t & index, UInt_t & subind
   return value;
 }
 
-UShort_t AliHLTTPCMemHandler::Test(UInt_t *comp, 
+UShort_t AliHLTTPCMemHandler::Test(const UInt_t *comp, 
                               UInt_t index, UInt_t  subindex) const
 {
   //supi dupi test
@@ -1226,7 +1225,7 @@ Int_t  AliHLTTPCMemHandler::ComparePoints(UInt_t /*row*/,UShort_t pad,UShort_t t
   return 1;
 }
 
-Int_t AliHLTTPCMemHandler::CompareDigits(AliHLTTPCRandomDigitData *a,AliHLTTPCRandomDigitData *b) const
+Int_t AliHLTTPCMemHandler::CompareDigits(const AliHLTTPCRandomDigitData *a,const AliHLTTPCRandomDigitData *b) const
 {
   //compare two digits
   if(a->fPad==b->fPad && a->fTime == b->fTime) return 0;
index 9c2ace4e9a5ada94697ff9d2042107174d4c095a..f045adcbe6f7c518dfdc64a7249c3a2b860cc3e4 100644 (file)
@@ -1,18 +1,17 @@
 // @(#) $Id$
 // Original: AliHLTMemHandler.h,v 1.30 2004/10/06 08:51:20 cvetan 
-#ifndef ALIHLTTPC_MEMHANDLER_H
-#define ALIHLTTPC_MEMHANDLER_H
+#ifndef ALIHLTTPCMEMHANDLER_H
+#define ALIHLTTPCMEMHANDLER_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   AliHLTTPCMemHandler.h
-    @author U. Frankenfeld, A. Vestbo, C. Loizides, maintained by
-            Matthias Richter
-    @date   
-    @brief  input interface base class for the TPC tracking code before
-            migration to the HLT component framework
-*/
+//  @file   AliHLTTPCMemHandler.h
+//  @author U. Frankenfeld, A. Vestbo, C. Loizides, maintained by
+//          Matthias Richter
+//  @date   
+//  @brief  input interface base class for the TPC tracking code before
+//          migration to the HLT component framework
 
 class AliHLTTPCDigitData;
 class AliHLTTPCSpacePointData;
@@ -24,7 +23,7 @@ class AliHLTTPCRandomDigitData;
 
 class AliRunLoader;
 class AliRawEvent;
-#include "AliTPCRawStream.h"
+class AliTPCRawStream;
 
 /**
  * @class AliHLTTPCMemHandler
@@ -112,7 +111,7 @@ class AliHLTTPCMemHandler {
   void Generate(Int_t row);
   void SetNGenerate(Int_t number){(number>fNRandom)?fNGenerate=fNRandom:fNGenerate = number;}
 
-  void SetROI(Float_t *eta,Int_t *slice);
+  void SetROI(const Float_t *eta,Int_t *slice);
   void ResetROI();
 
   ////////////////////////////////////////////////////////////////////////////////////
@@ -181,8 +180,8 @@ class AliHLTTPCMemHandler {
   Byte_t *Allocate(UInt_t size);
   Byte_t *Allocate();  // allocate size of Binary Input File
   Byte_t *Allocate(AliHLTTPCTrackArray *array);
-  Byte_t *GetDataPointer(UInt_t &size) {size = fSize; return fPt;}
-  FILE *GetFilePointer() {return fInBinary;}
+  Byte_t *GetDataPointer(UInt_t &size) const {size = fSize; return fPt;}
+  FILE *GetFilePointer() const {return fInBinary;}
   void   Free();
   
   //Getters:
@@ -281,12 +280,12 @@ class AliHLTTPCMemHandler {
 
   void Write(UInt_t *comp, UInt_t & index, UInt_t & subindex, UShort_t value) const;
   UShort_t Read(UInt_t *comp, UInt_t & index, UInt_t & subindex) const;
-  UShort_t Test(UInt_t *comp, UInt_t index, UInt_t subindex) const; 
+  UShort_t Test(const UInt_t *comp, UInt_t index, UInt_t subindex) const; 
   
   void DigitizePoint(Int_t row,Int_t pad, Int_t time,Int_t charge);
   void QSort(AliHLTTPCRandomDigitData **a, Int_t first, Int_t last);
   Int_t ComparePoints(UInt_t row,UShort_t pad,UShort_t time) const ;
-  Int_t CompareDigits(AliHLTTPCRandomDigitData *a,AliHLTTPCRandomDigitData *b) const;
+  Int_t CompareDigits(const AliHLTTPCRandomDigitData *a, const AliHLTTPCRandomDigitData *b) const;
   void AddData(AliHLTTPCDigitData *data,UInt_t & ndata,
                       UInt_t row,UShort_t pad,UShort_t time,UShort_t charge) const;
   void AddRandom(AliHLTTPCDigitData *data,UInt_t & ndata);