1 ////////////////////////////////////////////////
2 // RawData classes for set:ITS //
3 ////////////////////////////////////////////////
6 #include "AliITSRawData.h"
8 ClassImp(AliITSRawData)
10 ClassImp(AliITSInStream)
12 //_____________________________________________________________________________
14 AliITSInStream::AliITSInStream():
19 //_____________________________________________________________________________
21 AliITSInStream::AliITSInStream(UInt_t length):
25 // Creates a stream of unsigned chars
28 fInStream = new UChar_t[length];
33 //_____________________________________________________________________________
34 AliITSInStream::~AliITSInStream()
37 if (fInStream) delete[] fInStream;
40 //__________________________________________________________________________
41 AliITSInStream::AliITSInStream(const AliITSInStream &source) : TObject(source),
42 fStreamLen(source.fStreamLen),
43 fInStream(source.fInStream){
48 //_________________________________________________________________________
50 AliITSInStream::operator=(const AliITSInStream &source) {
51 // Assignment operator
52 if(&source == this) return *this;
53 this->fStreamLen = source.fStreamLen;
54 this->fInStream = source.fInStream;
58 //_____________________________________________________________________________
59 void AliITSInStream::ClearStream()
62 memset(fInStream,0,sizeof(UChar_t)*fStreamLen);
66 //_____________________________________________________________________________
67 Bool_t AliITSInStream::CheckCount(UInt_t count) {
69 if (count <= (UInt_t)fStreamLen) return kTRUE;
71 Error("CheckCount", "actual size is %d, the necessary size is %d",fStreamLen,count);
77 ClassImp(AliITSOutStream)
79 //_______________________________________________________________________
81 AliITSOutStream::AliITSOutStream():
88 //__________________________________________________________________________
90 AliITSOutStream::AliITSOutStream(UInt_t length):
94 // Creates a stream of unsigned chars
97 fOutStream = new UInt_t[length];
102 //_____________________________________________________________________________
103 AliITSOutStream::~AliITSOutStream()
106 if (fOutStream) delete[] fOutStream;
109 //__________________________________________________________________________
110 AliITSOutStream::AliITSOutStream(const AliITSOutStream &source):TObject(source),
111 fStreamLen(source.fStreamLen),
112 fOutStream(source.fOutStream){
117 //_________________________________________________________________________
119 AliITSOutStream::operator=(const AliITSOutStream &source) {
120 // Assignment operator
121 if(&source == this) return *this;
122 this->fStreamLen = source.fStreamLen;
123 this->fOutStream = source.fOutStream;
127 //_____________________________________________________________________________
128 void AliITSOutStream::ClearStream()
131 memset(fOutStream,0,sizeof(UInt_t)*fStreamLen);
134 //_____________________________________________________________________________
135 Bool_t AliITSOutStream::CheckCount(UInt_t count)
138 if (count < fStreamLen) return kTRUE;
140 Error("CheckCount", "actual size is %d, the necessary size is %d",fStreamLen,count);