* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
///////////////////////////////////////////////////////////////////////////////
//
// This is a base class for reading TPC raw data and providing
// information about digits
//
+// It loops over all TPC digits in the raw data given by the AliRawReader.
+// The Next method goes to the next digit. If there are no digits left
+// it returns kFALSE.
+// Several getters provide information about the current digit.
+//
///////////////////////////////////////////////////////////////////////////////
#include "AliTPCRawStream.h"
#include "AliTPCHuffman.h"
+#include "AliRawReader.h"
ClassImp(AliTPCRawStream)
fRawReader = rawReader;
fRawReader->Select(0);
- fData = new UShort_t[kDataMax];
+ fData = new UShort_t[fgkDataMax];
fDataSize = fPosition = 0;
fCount = fBunchLength = 0;
if (!fgRootNode) {
- fgRootNode = new AliTPCHNode*[kNumTables];
- fCompression.CreateTreesFromFile(fgRootNode, kNumTables);
+ fgRootNode = new AliTPCHNode*[fgkNumTables];
+ fCompression.CreateTreesFromFile(fgRootNode, fgkNumTables);
}
fSector = fPrevSector = fRow = fPrevRow = fPad = fPrevPad = fTime = fSignal = -1;
}
+AliTPCRawStream::AliTPCRawStream(const AliTPCRawStream& stream) :
+ TObject(stream)
+{
+ Fatal("AliTPCRawStream", "copy constructor not implemented");
+}
+
+AliTPCRawStream& AliTPCRawStream::operator = (const AliTPCRawStream&
+ /* stream */)
+{
+ Fatal("operator =", "assignment operator not implemented");
+ return *this;
+}
+
AliTPCRawStream::~AliTPCRawStream()
{
// clean up
} while (fRawReader->GetDataSize() == 0);
if (fRawReader->IsCompressed()) { // compressed data
- ULong_t size = 0;
- fCompression.Decompress(fgRootNode, kNumTables,
+ UInt_t size = 0;
+ fCompression.Decompress(fgRootNode, fgkNumTables,
(char*) data, fRawReader->GetDataSize(),
fData, size);
fDataSize = size;
Error("Next", "could not read sample amplitude");
return kFALSE;
}
- fSignal = fData[fPosition++] + kOffset;
+ fSignal = fData[fPosition++] + fgkOffset;
fCount--;
fBunchLength--;
}
-UShort_t AliTPCRawStream::Get10BitWord(UChar_t* buffer, Int_t position)
-// return a word in a 10 bit array as an UShort_t
+UShort_t AliTPCRawStream::Get10BitWord(UChar_t* buffer, Int_t position) const
{
+// return a word in a 10 bit array as an UShort_t
+
Int_t iBit = position * 10;
Int_t iByte = iBit / 8;
Int_t shift = iBit % 8;