]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RAW/AliFstream.h
Adding MUONraw to the list of libraries
[u/mrichter/AliRoot.git] / RAW / AliFstream.h
CommitLineData
18de460b 1#ifndef ALIFSTREAM_H
2#define ALIFSTREAM_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6//-------------------------------------------------------------------------
7// This is the class which is to be used during the writing of
8// simulated raw data (DDL files format).
9// It is using the root functionality in order to deal correctly
10// with little/big endian issue. By convention the detector raw
11// data payload is stored always with little endian (this corresponds
12// to the real life situation when the detector data is coming from
13// the hardware).
14//-------------------------------------------------------------------------
15
16#include <TObject.h>
17
18class AliFstream : public TObject {
19public:
20 AliFstream();
21 AliFstream(const char *fileName);
22 AliFstream(const AliFstream &source);
23 AliFstream& operator= (const AliFstream &source);
24 virtual ~AliFstream();
25
26 void Seekg(UInt_t position);
27 UInt_t Tellg();
28 void WriteBuffer(const char *buffer, UInt_t size, Bool_t force = kFALSE);
29
30private:
31
32 fstream *fFile; // Output file stream
33 UChar_t *fBuffer; // Pointer to the internal buffer
34 UInt_t fBufferSize; // Internal buffer size
35 Bool_t fSwap; // Big or little endian
36
37 ClassDef(AliFstream,0)
38};
39
40#endif