]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliStream.h
Rename lib file
[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 "TObjString.h"
19 #include "TString.h"
20 #include "TArrayI.h"
21 #include "TClonesArray.h"
22 #include "TFile.h"
23
24 // --- AliRoot header files ---
25
26 class AliStream: public TNamed {
27
28 public:
29   AliStream();
30   AliStream(Option_t *option);
31   virtual ~AliStream();
32   void AddFile(const char *fileName);
33   Bool_t NextEventInStream(Int_t &eventNr);
34   Bool_t OpenNextFile();
35   Bool_t ImportgAlice();
36   TFile* CurrentFile() { return fCurrentFile;}
37   void ChangeMode(Option_t* option);     // reset READ or UPDATE mode
38   Int_t GetNInputFiles() const {return fFileNames->GetLast()+1;}          
39   TString GetFileName(const Int_t order) const; 
40   
41 private:  
42   Int_t fLastEventSerialNr;
43   Int_t fLastEventNr;
44   Int_t fCurrentFileIndex;
45   Int_t fEvents;                //! nr. of events in the current file
46   TString fMode;                // = 0 for READONLY, = 1 for READWRITE
47   TFile *fCurrentFile;          //! pointer to current open file
48   TObjArray * fFileNames;       // storage for TStrings with file names
49   
50   ClassDef(AliStream,1)
51 };
52
53 #endif // ALISTREAM_H