]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliStream.h
Boost for assymmetric systems added.
[u/mrichter/AliRoot.git] / STEER / AliStream.h
1 #ifndef ALISTREAM_H
2 #define ALISTREAM_H
3 /* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 ////////////////////////////////////////////////////////////////////////
9 //
10 //  Class to handle files on IO
11 //                  
12 //  Author: Jiri Chudoba (CERN), 2001
13 //
14 ////////////////////////////////////////////////////////////////////////
15
16 // --- ROOT system ---
17 #include "TNamed.h"
18 #include "TObjArray.h"
19 #include "TString.h"
20
21 class TFile;
22
23 // --- AliRoot header files ---
24
25 class AliStream: public TNamed {
26
27 public:
28   AliStream();
29   AliStream(Option_t *option);
30   AliStream(const AliStream& str);
31   AliStream & operator=(const AliStream& str) 
32     {str.Copy(*this); return (*this);}
33   virtual ~AliStream();
34   void AddFile(const char *fileName);
35   Bool_t NextEventInStream(Int_t &eventNr);
36   Bool_t OpenNextFile();
37   Bool_t ImportgAlice();
38   TFile* CurrentFile() { return fCurrentFile;}
39   void ChangeMode(Option_t* option);     // reset READ or UPDATE mode
40   Int_t GetNInputFiles() const {return fFileNames->GetLast()+1;}          
41   TString GetFileName(const Int_t order) const; 
42   
43 private:  
44   void Copy(AliStream& str) const;
45
46   Int_t fLastEventSerialNr;     // Serial number of the last event
47   Int_t fLastEventNr;           // Number of the last event
48   Int_t fCurrentFileIndex;      // Index of the current file
49   Int_t fEvents;                //! nr. of events in the current file
50   TString fMode;                // = 0 for READONLY, = 1 for READWRITE
51   TFile *fCurrentFile;          //! pointer to current open file
52   TObjArray * fFileNames;       // storage for TStrings with file names
53   
54   ClassDef(AliStream,1)
55 };
56
57 #endif // ALISTREAM_H