// $Id$
/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * This file is property of and copyright by the ALICE HLT Project *
+ * ALICE Experiment at CERN, All rights reserved. *
* *
- * Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
- * Timm Steinbeck <timm@kip.uni-heidelberg.de> *
- * Jochen Thaeder <thaeder@kip.uni-heidelberg.de> *
- * for The ALICE Off-line Project. *
+ * Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
+ * Timm Steinbeck <timm@kip.uni-heidelberg.de> *
+ * Jochen Thaeder <thaeder@kip.uni-heidelberg.de> *
+ * for The ALICE HLT Project. *
* *
* Permission to use, copy, modify and distribute this software and its *
* documentation strictly for non-commercial purposes is hereby granted *
* provided "as is" without express or implied warranty. *
**************************************************************************/
-///////////////////////////////////////////////////////////////////////////////
-// //
-// class for reading unpacked data for the HLT //
-// //
-///////////////////////////////////////////////////////////////////////////////
+/** @file AliHLTTPCDigitReaderUnpacked.cxx
+ @author Timm Steinbeck, Jochen Thaeder, Matthias Richter
+ @date
+ @brief A digit reader implementation for unpacked TPC data.
+*/
#if __GNUC__== 3
using namespace std;
#include "AliHLTTPCDigitReaderUnpacked.h"
#include "AliHLTTPCDigitData.h"
#include "AliHLTTPCRawDataFormat.h"
+#include "AliHLTTPCTransform.h"
+#include "AliHLTStdIncludes.h"
-#include "AliHLTTPCLogging.h"
+ClassImp(AliHLTTPCDigitReaderUnpacked)
-#include <stdlib.h>
-#include <errno.h>
+AliHLTTPCDigitReaderUnpacked::AliHLTTPCDigitReaderUnpacked()
+ :
+ fDigitRowData(NULL),
+ fActRowData(NULL),
+ fData(NULL),
+ fPtr(NULL),
+ fSize(0),
+ fBin(0),
+ fRow(0),
+ fFirstRow(0),
+ fLastRow(0)
+{
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+}
-ClassImp(AliHLTTPCDigitReaderUnpacked)
+AliHLTTPCDigitReaderUnpacked::AliHLTTPCDigitReaderUnpacked(const AliHLTTPCDigitReaderUnpacked& src)
+ :
+ fDigitRowData(NULL),
+ fActRowData(NULL),
+ fData(NULL),
+ fPtr(NULL),
+ fSize(0),
+ fBin(0),
+ fRow(0),
+ fFirstRow(0),
+ fLastRow(0)
+{
+ // see header file for class documentation
+ HLTFatal("copy constructor not for use");
+}
-AliHLTTPCDigitReaderUnpacked::AliHLTTPCDigitReaderUnpacked(){
- fBin = 0;
- fRow = 0;
- fFirstRow = 0;
- fLastRow = 0;
+AliHLTTPCDigitReaderUnpacked& AliHLTTPCDigitReaderUnpacked::operator=(const AliHLTTPCDigitReaderUnpacked& src)
+{
+ // see header file for class documentation
+ fDigitRowData=NULL;
+ fActRowData=NULL;
+ fData=NULL;
+ fPtr=NULL;
+ fSize=0;
+ fBin=0;
+ fRow=0;
+ fFirstRow=0;
+ fLastRow=0;
+ HLTFatal("assignment operator not for use");
+ return (*this);
}
AliHLTTPCDigitReaderUnpacked::~AliHLTTPCDigitReaderUnpacked(){
+ // see header file for class documentation
}
-int AliHLTTPCDigitReaderUnpacked::InitBlock(void* ptr,unsigned long size, Int_t firstrow, Int_t lastrow){
- AliHLTTPCUnpackedRawData *tmpptr;
+int AliHLTTPCDigitReaderUnpacked::InitBlock(void* ptr,unsigned long size, Int_t patch, Int_t slice){
+ // see header file for class documentation
+ AliHLTTPCUnpackedRawData *tmpptr=NULL;
fPtr = ptr;
fSize = size;
fBin = -1;
- fFirstRow = firstrow;
- fLastRow = lastrow;
+ fFirstRow=AliHLTTPCTransform::GetFirstRow(patch);
+ fLastRow=AliHLTTPCTransform::GetLastRow(patch);
+
return 0;
fRow = fFirstRow;
if ((Int_t)fActRowData->fRow != fRow){
- LOG(AliHLTTPCLog::kWarning,"AliHLTTPCDigitReaderUnpacked::Next","Digits") << "Row number should match!" << fActRowData->fRow << " " << fRow << ENDLOG;
+ HLTWarning("Row number should match! fActRowData->fRow=%d fRow=%d", fActRowData->fRow, fRow);
}
}
bool AliHLTTPCDigitReaderUnpacked::Next(){
+ // see header file for class documentation
bool rreadvalue = true;
fBin++;
}
if ((Int_t)fActRowData->fRow != fRow){
- LOG(AliHLTTPCLog::kWarning,"AliHLTTPCDigitReaderUnpacked::Next","Digits") << "Row number should match!" << fActRowData->fRow << " " << fRow << ENDLOG;
+ HLTWarning("Row number should match! fActRowData->fRow=%d fRow=%d", fActRowData->fRow, fRow);
}
}
}
int AliHLTTPCDigitReaderUnpacked::GetRow(){
+ // see header file for class documentation
int rrow;
rrow = fRow;
return rrow;
}
int AliHLTTPCDigitReaderUnpacked::GetPad(){
+ // see header file for class documentation
int rpad;
rpad = (int)fData[fBin].fPad;
return rpad ;
}
int AliHLTTPCDigitReaderUnpacked::GetSignal(){
+ // see header file for class documentation
int rsignal;
rsignal = (int)fData[fBin].fCharge;
return rsignal;
}
int AliHLTTPCDigitReaderUnpacked::GetTime(){
+ // see header file for class documentation
int rtime;
rtime = (int)fData[fBin].fTime;
return rtime;