3 /**************************************************************************
4 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
7 * Timm Steinbeck <timm@kip.uni-heidelberg.de> *
8 * Jochen Thaeder <thaeder@kip.uni-heidelberg.de> *
9 * for The ALICE Off-line Project. *
11 * Permission to use, copy, modify and distribute this software and its *
12 * documentation strictly for non-commercial purposes is hereby granted *
13 * without fee, provided that the above copyright notice appears in all *
14 * copies and that both the copyright notice and this permission notice *
15 * appear in the supporting documentation. The authors make no claims *
16 * about the suitability of this software for any purpose. It is *
17 * provided "as is" without express or implied warranty. *
18 **************************************************************************/
20 ///////////////////////////////////////////////////////////////////////////////
22 // class for reading packed data for the HLT //
24 ///////////////////////////////////////////////////////////////////////////////
30 #include "AliHLTTPCDigitReaderPacked.h"
31 #include "AliTPCRawStream.h"
32 #include "AliRawReaderMemory.h"
33 #include "AliRawDataHeader.h"
35 #include "AliHLTTPCLogging.h"
40 ClassImp(AliHLTTPCDigitReaderPacked)
42 AliHLTTPCDigitReaderPacked::AliHLTTPCDigitReaderPacked(){
43 fRawMemoryReader = new AliRawReaderMemory;
44 fTPCRawStream = new AliTPCRawStream( fRawMemoryReader );
47 AliHLTTPCDigitReaderPacked::~AliHLTTPCDigitReaderPacked(){
48 if ( fRawMemoryReader )
49 delete fRawMemoryReader;
50 fRawMemoryReader = NULL;
56 int AliHLTTPCDigitReaderPacked::InitBlock(void* ptr,unsigned long size,Int_t firstrow, Int_t lastrow){
57 fRawMemoryReader->SetMemory( reinterpret_cast<UChar_t*>( ptr ), size );
61 bool AliHLTTPCDigitReaderPacked::Next(){
63 rreadvalue = fTPCRawStream->Next();
67 int AliHLTTPCDigitReaderPacked::GetRow(){
69 rrow = (int)fTPCRawStream->GetRow();
73 int AliHLTTPCDigitReaderPacked::GetPad(){
75 rpad = fTPCRawStream->GetPad();
79 int AliHLTTPCDigitReaderPacked::GetSignal(){
81 rsignal = fTPCRawStream->GetSignal();
85 int AliHLTTPCDigitReaderPacked::GetTime(){
87 rtime = fTPCRawStream->GetTime();