//* 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"
#include "AliHLTTPCSpacePointData.h"
#include "AliHLTTPCTrackArray.h"
#include "AliHLTTPCMemHandler.h"
+#include "TMath.h"
#if __GNUC__ >= 3
using namespace std;
}
}
-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
// 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;
fEtaMinTimeBin[i] = (Int_t)xyz[2];
- if(eta[0]==0)
+ if(TMath::Abs(eta[0])<.00001)
fEtaMaxTimeBin[i] = 445;
else
{
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
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;
// @(#) $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;
class AliRunLoader;
class AliRawEvent;
-#include "AliTPCRawStream.h"
+class AliTPCRawStream;
/**
* @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();
////////////////////////////////////////////////////////////////////////////////////
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:
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);