]>
Commit | Line | Data |
---|---|---|
a38a7850 | 1 | // $Id$ |
2 | ||
3 | /************************************************************************** | |
4 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * * | |
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. * | |
10 | * * | |
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 | **************************************************************************/ | |
19 | ||
20 | /////////////////////////////////////////////////////////////////////////////// | |
21 | // // | |
22 | // class for reading packed data for the HLT // | |
23 | // // | |
24 | /////////////////////////////////////////////////////////////////////////////// | |
25 | ||
26 | #if __GNUC__== 3 | |
27 | using namespace std; | |
28 | #endif | |
29 | ||
74c73e5a | 30 | #if defined(HAVE_ALIRAWDATA) && defined(HAVE_ALITPCRAWSTREAM_H) |
a38a7850 | 31 | #include "AliHLTTPCDigitReaderPacked.h" |
32 | #include "AliTPCRawStream.h" | |
33 | #include "AliRawReaderMemory.h" | |
34 | #include "AliRawDataHeader.h" | |
35 | ||
74c73e5a | 36 | #include "AliHLTStdIncludes.h" |
a38a7850 | 37 | |
38 | ClassImp(AliHLTTPCDigitReaderPacked) | |
39 | ||
40 | AliHLTTPCDigitReaderPacked::AliHLTTPCDigitReaderPacked(){ | |
41 | fRawMemoryReader = new AliRawReaderMemory; | |
42 | fTPCRawStream = new AliTPCRawStream( fRawMemoryReader ); | |
43 | } | |
44 | ||
45 | AliHLTTPCDigitReaderPacked::~AliHLTTPCDigitReaderPacked(){ | |
46 | if ( fRawMemoryReader ) | |
47 | delete fRawMemoryReader; | |
48 | fRawMemoryReader = NULL; | |
49 | if ( fTPCRawStream ) | |
50 | delete fTPCRawStream; | |
51 | fTPCRawStream = NULL; | |
52 | } | |
53 | ||
54 | int AliHLTTPCDigitReaderPacked::InitBlock(void* ptr,unsigned long size,Int_t firstrow, Int_t lastrow){ | |
55 | fRawMemoryReader->SetMemory( reinterpret_cast<UChar_t*>( ptr ), size ); | |
56 | return 0; | |
57 | } | |
58 | ||
59 | bool AliHLTTPCDigitReaderPacked::Next(){ | |
60 | bool rreadvalue; | |
61 | rreadvalue = fTPCRawStream->Next(); | |
62 | return rreadvalue; | |
63 | } | |
64 | ||
65 | int AliHLTTPCDigitReaderPacked::GetRow(){ | |
66 | int rrow; | |
67 | rrow = (int)fTPCRawStream->GetRow(); | |
68 | return rrow; | |
69 | } | |
70 | ||
71 | int AliHLTTPCDigitReaderPacked::GetPad(){ | |
72 | int rpad; | |
73 | rpad = fTPCRawStream->GetPad(); | |
74 | return rpad ; | |
75 | } | |
76 | ||
77 | int AliHLTTPCDigitReaderPacked::GetSignal(){ | |
78 | int rsignal; | |
79 | rsignal = fTPCRawStream->GetSignal(); | |
80 | return rsignal; | |
81 | } | |
82 | ||
83 | int AliHLTTPCDigitReaderPacked::GetTime(){ | |
84 | int rtime; | |
85 | rtime = fTPCRawStream->GetTime(); | |
86 | return rtime; | |
87 | } | |
74c73e5a | 88 | #endif //defined(HAVE_ALIRAWDATA) && defined(HAVE_ALITPCRAWSTREAM_H) |