]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCDigitReaderPacked.cxx
Added total charge histogram, allresiduals histogram and graphs for the residuals...
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCDigitReaderPacked.cxx
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
30 #include "AliHLTTPCDigitReaderPacked.h"
31 #include "AliTPCRawStream.h"
32 #include "AliRawReaderMemory.h"
33 #include "AliRawDataHeader.h"
34
35 #include "AliHLTTPCLogging.h"
36
37 #include <stdlib.h>
38 #include <errno.h>
39
40 ClassImp(AliHLTTPCDigitReaderPacked)
41
42 AliHLTTPCDigitReaderPacked::AliHLTTPCDigitReaderPacked(){
43   fRawMemoryReader = new AliRawReaderMemory;
44   fTPCRawStream = new AliTPCRawStream( fRawMemoryReader );
45 }
46
47 AliHLTTPCDigitReaderPacked::~AliHLTTPCDigitReaderPacked(){
48   if ( fRawMemoryReader )
49     delete fRawMemoryReader;
50   fRawMemoryReader = NULL;
51   if ( fTPCRawStream )
52     delete fTPCRawStream;
53   fTPCRawStream = NULL;
54 }
55
56 int AliHLTTPCDigitReaderPacked::InitBlock(void* ptr,unsigned long size,Int_t firstrow, Int_t lastrow){
57   fRawMemoryReader->SetMemory( reinterpret_cast<UChar_t*>( ptr ), size );
58   return 0;
59 }
60
61 bool AliHLTTPCDigitReaderPacked::Next(){
62   bool rreadvalue;
63   rreadvalue = fTPCRawStream->Next();
64   return rreadvalue;
65 }
66
67 int AliHLTTPCDigitReaderPacked::GetRow(){
68   int rrow;
69   rrow = (int)fTPCRawStream->GetRow();
70   return rrow;
71 }
72
73 int AliHLTTPCDigitReaderPacked::GetPad(){
74   int rpad;
75   rpad = fTPCRawStream->GetPad();
76   return rpad   ;
77 }
78
79 int AliHLTTPCDigitReaderPacked::GetSignal(){ 
80   int rsignal;
81   rsignal = fTPCRawStream->GetSignal();
82   return rsignal;
83 }
84
85 int AliHLTTPCDigitReaderPacked::GetTime(){
86   int rtime;
87   rtime = fTPCRawStream->GetTime();
88   return rtime;
89 }