]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSCompressRawDataSDD.h
Add header and implementation file for the new class
[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
7765ca40 12///////////////////////////////////////////////////////////////////
13// //
14// Class to decode the SDD Raw Data from the CarlosRX format to //
15// a compressed format consisting in a word of 32 bit per cell //
16// Origin: F.Prino, Torino, prino@to.infn.it //
17// //
18///////////////////////////////////////////////////////////////////
19
cfe39822 20class AliRawReader;
21
7765ca40 22class AliITSCompressRawDataSDD : public TObject {
23
24 public:
f7bcb379 25 AliITSCompressRawDataSDD();
f7bcb379 26 ~AliITSCompressRawDataSDD();
f7bcb379 27 void SetRawReader(AliRawReader* rd){
28 fRawReader=rd;
29 }
30 void SetPointerToData(UChar_t* pt){
31 fPointerToData=pt;
32 }
33 void SetSize(UInt_t siz){
34 fSizeInMemory=siz;
35 }
36
f7bcb379 37 UInt_t CompressEvent(UChar_t* inputPtr);
7765ca40 38
de075dae 39 static UInt_t MakeDataWord(Int_t carlos, Int_t side, Int_t anode, Int_t tb, Int_t adc){
40 UInt_t word= (carlos<<27) + (side<<26) + (anode<<18) + (tb<<10) + adc;
41 return word;
42 }
43
44 static UInt_t MakeEndOfModuleWord(Int_t carlos){
45 UInt_t word= (15<<28) + carlos;
46 return word;
47 }
48
49 static UInt_t MakeJitterWord(Int_t jitter){
50 UInt_t word= (8<<28) + jitter;
51 return word;
52 }
53
7765ca40 54 protected:
f7bcb379 55
56 private:
57 AliITSCompressRawDataSDD(const AliITSCompressRawDataSDD& /*c*/);
58
59 AliITSCompressRawDataSDD& operator=(const AliITSCompressRawDataSDD& /*c*/);
60
61
62 AliRawReader* fRawReader; // pointer to raw reader
63 UChar_t* fPointerToData; // pointer to the start of data in memory
64 UInt_t fSizeInMemory; // free space in memory in Bytes
7765ca40 65
66 ClassDef(AliITSCompressRawDataSDD, 0)
67};
68
69#endif