]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSCompressRawDataSDD.h
Protection against division by zero.
[u/mrichter/AliRoot.git] / ITS / AliITSCompressRawDataSDD.h
CommitLineData
7765ca40 1#ifndef ALIITSCOMPRESSRAWDATASDD_H
2#define ALIITSCOMPRESSRAWDATASDD_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id$ */
8
9#include<TObject.h>
10#include<TString.h>
f7bcb379 11#include"AliRawReader.h"
12
7765ca40 13///////////////////////////////////////////////////////////////////
14// //
15// Class to decode the SDD Raw Data from the CarlosRX format to //
16// a compressed format consisting in a word of 32 bit per cell //
17// Origin: F.Prino, Torino, prino@to.infn.it //
18// //
19///////////////////////////////////////////////////////////////////
20
21class AliITSCompressRawDataSDD : public TObject {
22
23 public:
f7bcb379 24 AliITSCompressRawDataSDD();
7765ca40 25 AliITSCompressRawDataSDD(TString filename);
f7bcb379 26 ~AliITSCompressRawDataSDD();
7765ca40 27 void SetEventRange(Int_t first, Int_t last){
28 fEventRange=kTRUE;
29 fFirstEvent=first;
30 fLastEvent=last;
31 }
f7bcb379 32 void SetRawReader(AliRawReader* rd){
33 fRawReader=rd;
34 }
35 void SetPointerToData(UChar_t* pt){
36 fPointerToData=pt;
37 }
38 void SetSize(UInt_t siz){
39 fSizeInMemory=siz;
40 }
41
7765ca40 42 void Compress();
f7bcb379 43 UInt_t CompressEvent(UChar_t* inputPtr);
7765ca40 44
45 protected:
f7bcb379 46
47 private:
48 AliITSCompressRawDataSDD(const AliITSCompressRawDataSDD& /*c*/);
49
50 AliITSCompressRawDataSDD& operator=(const AliITSCompressRawDataSDD& /*c*/);
51
52
53 AliRawReader* fRawReader; // pointer to raw reader
54 UChar_t* fPointerToData; // pointer to the start of data in memory
55 UInt_t fSizeInMemory; // free space in memory in Bytes
56 Bool_t fEventRange; // flag to select a range of events
57 Int_t fFirstEvent; // first event (used only if fEventRange==kTRUE)
58 Int_t fLastEvent; // first event (used only if fEventRange==kTRUE)
59 TString fNameFile; // name of the raw data file
7765ca40 60
61 ClassDef(AliITSCompressRawDataSDD, 0)
62};
63
64#endif