ROOT logo
#ifndef ALIFSTREAM_H
#define ALIFSTREAM_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

//-------------------------------------------------------------------------
// This is the class which is to be used during the writing of
// simulated raw data (DDL files format).
// It is using the root functionality in order to deal correctly
// with little/big endian issue. By convention the detector raw
// data payload is stored always with little endian (this corresponds
// to the real life situation when the detector data is coming from
// the hardware).
//-------------------------------------------------------------------------

#include <TObject.h>
using std::fstream;

class AliFstream : public TObject {
public:
  AliFstream();
  AliFstream(const char *fileName);
  virtual ~AliFstream();

  void   Seekp(UInt_t position);
  UInt_t Tellp();
  void   WriteBuffer(const char *buffer, UInt_t size, Bool_t force = kFALSE);

private:

  AliFstream(const AliFstream &source);
  AliFstream &operator =(const AliFstream& source);

  UInt_t Swap(UInt_t x);

  fstream *fFile;       // Output file stream
  UInt_t  *fBuffer;     // Pointer to the internal buffer
  UInt_t   fBufferSize; // Internal buffer size

  ClassDef(AliFstream,0)
};

#endif
 AliFstream.h:1
 AliFstream.h:2
 AliFstream.h:3
 AliFstream.h:4
 AliFstream.h:5
 AliFstream.h:6
 AliFstream.h:7
 AliFstream.h:8
 AliFstream.h:9
 AliFstream.h:10
 AliFstream.h:11
 AliFstream.h:12
 AliFstream.h:13
 AliFstream.h:14
 AliFstream.h:15
 AliFstream.h:16
 AliFstream.h:17
 AliFstream.h:18
 AliFstream.h:19
 AliFstream.h:20
 AliFstream.h:21
 AliFstream.h:22
 AliFstream.h:23
 AliFstream.h:24
 AliFstream.h:25
 AliFstream.h:26
 AliFstream.h:27
 AliFstream.h:28
 AliFstream.h:29
 AliFstream.h:30
 AliFstream.h:31
 AliFstream.h:32
 AliFstream.h:33
 AliFstream.h:34
 AliFstream.h:35
 AliFstream.h:36
 AliFstream.h:37
 AliFstream.h:38
 AliFstream.h:39
 AliFstream.h:40
 AliFstream.h:41
 AliFstream.h:42
 AliFstream.h:43