]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCMonitorDateFile.h
Last(?) extrusion corrected
[u/mrichter/AliRoot.git] / TPC / AliTPCMonitorDateFile.h
1 #ifndef ALITPCMONITORDATEFILE_H
2 #define ALITPCMONITORDATEFILE_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
9
10 ////////////////////////////////////////////////////////////////////////
11 ////
12 //// AliTPCMonitorDateFile class
13 //// 
14 //// Class for handling the data structure in a DATE file
15 //// 
16 //// Authors: Roland Bramm
17 ////          Stefan Kniege, IKF, Frankfurt
18 ////       
19 ////
20 /////////////////////////////////////////////////////////////////////////
21
22
23 #include <string>
24 #include "TNamed.h"
25
26 using namespace std;
27
28 class AliTPCMonitorDateFile : public TNamed {
29         public: 
30         AliTPCMonitorDateFile();
31         AliTPCMonitorDateFile(const  AliTPCMonitorDateFile &datefile);
32         AliTPCMonitorDateFile& operator= (const AliTPCMonitorDateFile& datefile);
33         ~AliTPCMonitorDateFile();
34         
35         void    AllocateArray(int size);
36         void    CloseDateFile();
37         
38         Int_t   GetAllocatedSizeofArray() const;
39         Int_t   GetFileSize() const; 
40         Int_t   GetFilePosition() const;
41         Char_t* GetMemoryPointer();
42         
43         Bool_t  IsLastEvent() const;
44         Bool_t  IsEventValid() const;
45         
46         Bool_t  IsDateFileOpen();
47         void    OpenDateFile(string name);
48         
49         void    ReadEvent();
50         void    ResetFilePos();
51
52
53
54
55         private:
56         
57         void SetFileSize();
58
59         Int_t          ffilePos;                       // position in file
60         Char_t*        fbigMem;                        // array for event data
61         UInt_t         fbigMemsize;                    // size of data array
62         Bool_t         fisBigMemAllocated;             // flag for already allocated array
63         Int_t          ffileSize;                      // size of DATE file
64         string         ffilename;                      // name of DATE file
65         Bool_t         finitFile;                      // flag for opened file
66         Bool_t         freadPosOverflow;               // data position overflow flag 
67         ifstream *     fin;                            // file to be read
68         
69         ClassDef(AliTPCMonitorDateFile,1);
70 };
71
72 #endif
73