AliRoot Core  edcc906 (edcc906)
AliFstream.h
Go to the documentation of this file.
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 using std::fstream;
18 
19 class AliFstream : public TObject {
20 public:
21  AliFstream();
22  AliFstream(const char *fileName);
23  virtual ~AliFstream();
24 
25  void Seekp(UInt_t position);
26  UInt_t Tellp();
27  void WriteBuffer(const char *buffer, UInt_t size, Bool_t force = kFALSE);
28 
29 private:
30 
31  AliFstream(const AliFstream &source);
32  AliFstream &operator =(const AliFstream& source);
33 
34  UInt_t Swap(UInt_t x);
35 
36  fstream *fFile; // Output file stream
37  UInt_t *fBuffer; // Pointer to the internal buffer
38  UInt_t fBufferSize; // Internal buffer size
39 
40  ClassDef(AliFstream,0)
41 };
42 
43 #endif
UInt_t Swap(UInt_t x)
Definition: AliFstream.cxx:94
AliFstream & operator=(const AliFstream &source)
UInt_t fBufferSize
Definition: AliFstream.h:38
UInt_t Tellp()
Definition: AliFstream.cxx:84
TString fileName(const char *dir, int runNumber, const char *da, int i, const char *type)
fstream * fFile
Definition: AliFstream.h:36
virtual ~AliFstream()
Definition: AliFstream.cxx:64
void WriteBuffer(const char *buffer, UInt_t size, Bool_t force=kFALSE)
Definition: AliFstream.cxx:103
UInt_t * fBuffer
Definition: AliFstream.h:37
void Seekp(UInt_t position)
Definition: AliFstream.cxx:76