]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RAW/AliAltroBufferV3.h
bug fix
[u/mrichter/AliRoot.git] / RAW / AliAltroBufferV3.h
CommitLineData
5ca4e0a0 1/* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
4/////////////////////////////////////////////////////
5// Class used for read-write the ALTRO data format //
6/////////////////////////////////////////////////////
7
8/*This class is an interface between the altro format file and the
9 user, and can be used in write or read mode
10 In the write mode a new altro file is created and filled using the method FillBuffer().
11 The name of the file is specified as parameter in the constructor as well as the type mode.
12 In the Read mode the specified file is open and the values can be read using the
13 methods GetNext() and GetNextBackWord().
14 The first method is used to read the file forward while the second is used to read backward
15*/
16
17#ifndef AliALTROBUFFERV3_H
18#define AliALTROBUFFERV3_H
19
20#include "AliAltroBuffer.h"
21
22class AliAltroBufferV3: public AliAltroBuffer {
23 public:
24 AliAltroBufferV3(const char* fileName, AliAltroMapping *mapping = NULL);
25 virtual ~AliAltroBufferV3();
26
27 virtual void FillBuffer(Int_t val);
28 //this method stores a word into the buffer
29
30 virtual void WriteTrailer(Int_t wordsNumber, Short_t hwAddress);
31 //this method is used to write the trailer
32
b73dbf18 33 virtual UChar_t WriteRCUTrailer(Int_t rcuId);
5ca4e0a0 34 //this method is used to write the RCU trailer
35
36 enum { kMaxWords = 1024 };
37
38 protected:
39 void ReverseAndWrite();
40 //this method reverse the altro data order and write the buffer to the file
41
42 AliAltroBufferV3(const AliAltroBufferV3& source);
43 AliAltroBufferV3& operator = (const AliAltroBufferV3& source);
44
45 UShort_t fArray[kMaxWords]; // Temporary array needed in reverting data order
46 Int_t fN; // Size of the temporary array
47
48 ClassDef(AliAltroBufferV3,0) // Interface to the Altro format
49};
50
51#endif