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